Blender V5.0
octree.cpp File Reference
#include "octree.h"
#include "Queue.h"
#include <Eigen/Dense>
#include <algorithm>
#include <ctime>

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 dualcon/intern/octree.cpp.

◆ dc_printf

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

Definition at line 26 of file dualcon/intern/octree.cpp.

Referenced by Octree::Octree(), and Octree::scanConvert().

Function Documentation

◆ mass_point()

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

Definition at line 2214 of file dualcon/intern/octree.cpp.

References i.

◆ minimize()

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

Definition at line 2238 of file dualcon/intern/octree.cpp.

References float, i, norm(), and solve_least_squares().

◆ pseudoInverse()

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

Definition at line 2184 of file dualcon/intern/octree.cpp.

References result.

Referenced by solve_least_squares().

◆ solve_least_squares()

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

Definition at line 2195 of file dualcon/intern/octree.cpp.

References A, b, i, 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 2855 of file dualcon/intern/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 2840 of file dualcon/intern/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 2885 of file dualcon/intern/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 2889 of file dualcon/intern/octree.cpp.

◆ edgemask

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

Definition at line 2829 of file dualcon/intern/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 2873 of file dualcon/intern/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 2831 of file dualcon/intern/octree.cpp.

Referenced by construct_param_handle_subsurfed(), and modify_mesh().

◆ 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 2868 of file dualcon/intern/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 2864 of file dualcon/intern/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 2879 of file dualcon/intern/octree.cpp.