Blender  V3.3
Macros | Functions | Variables
octree.cpp File Reference
#include "octree.h"
#include <Eigen/Dense>
#include <limits>
#include <time.h>

Go to the source code of this file.

Macros

#define DC_DEBUG   0
 
#define dc_printf(...)
 

Functions

static void pseudoInverse (const Eigen::Matrix3f &a, Eigen::Matrix3f &result, float tolerance)
 
static void solve_least_squares (const float halfA[], const float b[], const float midpoint[], float rvalue[])
 
static void mass_point (float mp[3], const float pts[12][3], const int parity[12])
 
static void minimize (float rvalue[3], float mp[3], const float pts[12][3], const float norms[12][3], const int parity[12])
 

Variables

const int edgemask [3] = {5, 3, 6}
 
const int faceMap [6][4]
 
const int cellProcFaceMask [12][3]
 
const int cellProcEdgeMask [6][5]
 
const int faceProcFaceMask [3][4][3]
 
const int faceProcEdgeMask [3][4][6]
 
const int edgeProcEdgeMask [3][2][5]
 
const int processEdgeMask [3][4]
 
const int dirCell [3][4][3]
 
const int dirEdge [3][4]
 

Macro Definition Documentation

◆ DC_DEBUG

#define DC_DEBUG   0

Implementations of Octree member functions.

Author
Tao Ju

Definition at line 19 of file octree.cpp.

◆ dc_printf

#define dc_printf (   ...)
Value:
do { \
} while (0)

Definition at line 26 of file octree.cpp.

Function Documentation

◆ mass_point()

static void mass_point ( float  mp[3],
const float  pts[12][3],
const int  parity[12] 
)
static

Definition at line 2202 of file octree.cpp.

◆ minimize()

static void minimize ( float  rvalue[3],
float  mp[3],
const float  pts[12][3],
const float  norms[12][3],
const int  parity[12] 
)
static

◆ pseudoInverse()

static void pseudoInverse ( const Eigen::Matrix3f &  a,
Eigen::Matrix3f &  result,
float  tolerance 
)
static

Definition at line 2173 of file octree.cpp.

References Freestyle::a, and result.

Referenced by solve_least_squares().

◆ solve_least_squares()

static void solve_least_squares ( const float  halfA[],
const float  b[],
const float  midpoint[],
float  rvalue[] 
)
static

Definition at line 2184 of file octree.cpp.

References A, usdtokens::b(), blender::math::midpoint(), pseudoInverse(), and result.

Referenced by minimize().

Variable Documentation

◆ cellProcEdgeMask

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

Definition at line 2841 of file octree.cpp.

◆ cellProcFaceMask

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

Definition at line 2826 of file octree.cpp.

◆ dirCell

const int dirCell[3][4][3]
Initial value:
= {{{0, -1, -1}, {0, -1, 0}, {0, 0, -1}, {0, 0, 0}},
{{-1, 0, -1}, {-1, 0, 0}, {0, 0, -1}, {0, 0, 0}},
{{-1, -1, 0}, {-1, 0, 0}, {0, -1, 0}, {0, 0, 0}}}

Definition at line 2871 of file octree.cpp.

◆ dirEdge

const int dirEdge[3][4]
Initial value:
= {
{3, 2, 1, 0},
{7, 6, 5, 4},
{11, 10, 9, 8},
}

Definition at line 2875 of file octree.cpp.

◆ edgemask

const int edgemask[3] = {5, 3, 6}

Definition at line 2815 of file octree.cpp.

◆ edgeProcEdgeMask

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

Definition at line 2859 of file octree.cpp.

◆ faceMap

const int faceMap[6][4]
Initial value:
= {
{4, 8, 5, 9},
{6, 10, 7, 11},
{0, 8, 1, 10},
{2, 9, 3, 11},
{0, 4, 2, 6},
{1, 5, 3, 7},
}

Definition at line 2817 of file octree.cpp.

Referenced by construct_param_handle_subsurfed(), modifyMesh(), and set_subsurf_legacy_uv().

◆ faceProcEdgeMask

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

Definition at line 2854 of file octree.cpp.

◆ faceProcFaceMask

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

Definition at line 2850 of file octree.cpp.

◆ processEdgeMask

const int processEdgeMask[3][4]
Initial value:
= {
{3, 2, 1, 0},
{7, 5, 6, 4},
{11, 10, 9, 8},
}

Definition at line 2865 of file octree.cpp.