Blender V5.0
Projections.cpp File Reference
#include "Projections.h"
#include <cmath>
#include <algorithm>

Go to the source code of this file.

Functions

static void crossProduct (int64_t res[3], const int64_t a[3], const int64_t b[3])
static void crossProduct (double res[3], const double a[3], const double b[3])
static int64_t dotProduct (const int64_t a[3], const int64_t b[3])
static void normalize (double a[3])
static void create_projection_axes (int64_t axes[NUM_AXES][3], const int64_t tri[3][3])

Variables

const int vertmap [8][3]
const int centmap [3][3][3][2]
const int edgemap [12][2]
const int facemap [6][4]

Function Documentation

◆ create_projection_axes()

void create_projection_axes ( int64_t axes[NUM_AXES][3],
const int64_t tri[3][3] )
static

Definition at line 98 of file Projections.cpp.

References crossProduct(), i, and NUM_AXES.

Referenced by CubeTriangleIsect::CubeTriangleIsect().

◆ crossProduct() [1/2]

void crossProduct ( double res[3],
const double a[3],
const double b[3] )
static

Definition at line 62 of file Projections.cpp.

References b.

◆ crossProduct() [2/2]

void crossProduct ( int64_t res[3],
const int64_t a[3],
const int64_t b[3] )
static

Method to perform cross-product

Definition at line 55 of file Projections.cpp.

References b.

Referenced by create_projection_axes(), and CubeTriangleIsect::CubeTriangleIsect().

◆ dotProduct()

int64_t dotProduct ( const int64_t a[3],
const int64_t b[3] )
static

Method to perform dot product

Definition at line 72 of file Projections.cpp.

References b.

Referenced by CubeTriangleIsect::CubeTriangleIsect().

◆ normalize()

void normalize ( double a[3])
static

Definition at line 77 of file Projections.cpp.

References sqrt.

Variable Documentation

◆ centmap

const int centmap[3][3][3][2]
Initial value:
= {
{{{0, 0}, {0, 1}, {1, 1}}, {{0, 2}, {0, 3}, {1, 3}}, {{2, 2}, {2, 3}, {3, 3}}},
{{{0, 4}, {0, 5}, {1, 5}}, {{0, 6}, {0, 7}, {1, 7}}, {{2, 6}, {2, 7}, {3, 7}}},
{{{4, 4}, {4, 5}, {5, 5}}, {{4, 6}, {4, 7}, {5, 7}}, {{6, 6}, {6, 7}, {7, 7}}}}

Definition at line 21 of file Projections.cpp.

◆ edgemap

const int edgemap[12][2]
Initial value:
= {
{0, 4},
{1, 5},
{2, 6},
{3, 7},
{0, 2},
{1, 3},
{4, 6},
{5, 7},
{0, 1},
{2, 3},
{4, 5},
{6, 7},
}

Definition at line 28 of file Projections.cpp.

◆ facemap

const int facemap[6][4]
Initial value:
= {
{0, 1, 2, 3},
{4, 5, 6, 7},
{0, 1, 4, 5},
{2, 3, 6, 7},
{0, 2, 4, 6},
{1, 3, 5, 7},
}

Definition at line 43 of file Projections.cpp.

◆ vertmap

const int vertmap[8][3]
Initial value:
= {
{0, 0, 0},
{0, 0, 1},
{0, 1, 0},
{0, 1, 1},
{1, 0, 0},
{1, 0, 1},
{1, 1, 0},
{1, 1, 1},
}

Structures and classes for computing projections of triangles onto separating axes during scan conversion

Author
Tao Ju

Definition at line 10 of file Projections.cpp.

Referenced by CubeTriangleIsect::CubeTriangleIsect().