UnityMol  0.9.6-875
UnityMol viewer / In developement
VertexTree Class Reference
+ Collaboration diagram for VertexTree:

Public Member Functions

 VertexTree (Vector3 b0, Vector3 b1)
 
int AddVertex (Vector3 v, int ind)
 
bool FindOrAddVertex (Vector3 v, int ind)
 
int GetIndex (Vector3 v)
 

Private Member Functions

void AddVertexToLeaf (Vector3 v, int i)
 
Vector3 GetOffset (Vector3 b0, Vector3 b1, int i)
 
int GetChildIndex (Vector3 v)
 
void Subdivide ()
 

Private Attributes

Vector3 bound0
 
Vector3 bound1
 
Vector3 split
 
List< Vector3 > vertices
 
List< int > indices
 
VertexTree[] children
 
bool isLeaf = true
 

Static Private Attributes

static float THRESHOLD = 0.01f
 
static float SQ_THRESHOLD = THRESHOLD * THRESHOLD
 
static int MAX_VERTICES = 16
 

Detailed Description

Definition at line 5 of file VertexTree.cs.

Constructor & Destructor Documentation

VertexTree.VertexTree ( Vector3  b0,
Vector3  b1 
)

Definition at line 20 of file VertexTree.cs.

Referenced by Subdivide().

+ Here is the caller graph for this function:

Member Function Documentation

int VertexTree.AddVertex ( Vector3  v,
int  ind 
)

Definition at line 111 of file VertexTree.cs.

References AddVertex(), AddVertexToLeaf(), and GetChildIndex().

Referenced by AddVertex(), and MarchingCubes.MarchCube().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void VertexTree.AddVertexToLeaf ( Vector3  v,
int  i 
)
private

Definition at line 29 of file VertexTree.cs.

References Subdivide().

Referenced by AddVertex(), FindOrAddVertex(), and Subdivide().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool VertexTree.FindOrAddVertex ( Vector3  v,
int  ind 
)

Definition at line 135 of file VertexTree.cs.

References AddVertexToLeaf(), FindOrAddVertex(), and GetChildIndex().

Referenced by FindOrAddVertex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int VertexTree.GetChildIndex ( Vector3  v)
private

Definition at line 73 of file VertexTree.cs.

Referenced by AddVertex(), FindOrAddVertex(), GetIndex(), and Subdivide().

+ Here is the caller graph for this function:

int VertexTree.GetIndex ( Vector3  v)

Definition at line 158 of file VertexTree.cs.

References GetChildIndex(), and GetIndex().

Referenced by GetIndex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3 VertexTree.GetOffset ( Vector3  b0,
Vector3  b1,
int  i 
)
private

Definition at line 38 of file VertexTree.cs.

Referenced by Subdivide().

+ Here is the caller graph for this function:

void VertexTree.Subdivide ( )
private

Definition at line 86 of file VertexTree.cs.

References AddVertexToLeaf(), bound0, GetChildIndex(), GetOffset(), MAX_VERTICES, and VertexTree().

Referenced by AddVertexToLeaf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Vector3 VertexTree.bound0
private

Definition at line 6 of file VertexTree.cs.

Referenced by Subdivide().

Vector3 VertexTree.bound1
private

Definition at line 6 of file VertexTree.cs.

VertexTree [] VertexTree.children
private

Definition at line 10 of file VertexTree.cs.

List<int> VertexTree.indices
private

Definition at line 9 of file VertexTree.cs.

bool VertexTree.isLeaf = true
private

Definition at line 11 of file VertexTree.cs.

int VertexTree.MAX_VERTICES = 16
staticprivate

Definition at line 16 of file VertexTree.cs.

Referenced by Subdivide().

Vector3 VertexTree.split
private

Definition at line 6 of file VertexTree.cs.

float VertexTree.SQ_THRESHOLD = THRESHOLD * THRESHOLD
staticprivate

Definition at line 15 of file VertexTree.cs.

float VertexTree.THRESHOLD = 0.01f
staticprivate

Definition at line 14 of file VertexTree.cs.

List<Vector3> VertexTree.vertices
private

Definition at line 8 of file VertexTree.cs.


The documentation for this class was generated from the following file: