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

Public Member Functions

 AtomTree (Vector3 b0, Vector3 b1)
 
string GetClosestAtomType (Vector3 pos)
 
Color GetClosestAtomColor (Vector3 pos)
 
void SubGetClosestAtomColor (Vector3 pos)
 
void Print ()
 

Static Public Member Functions

static AtomTree Build ()
 

Private Member Functions

int GetChildIndex (Vector3 p)
 
Vector3 GetOffset (Vector3 b0, Vector3 b1, int i)
 
void AddAtomToLeaf (Vector3 pos, string type, Color col)
 
void Subdivide ()
 
void AddAtom (Vector3 pos, string type, Color col)
 
bool IsEmpty ()
 
AtomTree GetOptimalChild (Vector3 pos)
 

Private Attributes

List< string > types
 
List< Vector3 > positions
 
List< Color > colors
 
Vector3 bound0
 
Vector3 bound1
 
Vector3 split
 
AtomTree[] children
 
bool isLeaf = true
 

Static Private Attributes

static int MAX_ATOMS = 8
 
static Color candidateCol
 
static float candidateDist
 

Detailed Description

Definition at line 6 of file AtomTree.cs.

Constructor & Destructor Documentation

AtomTree.AtomTree ( Vector3  b0,
Vector3  b1 
)

Definition at line 18 of file AtomTree.cs.

Referenced by Build(), and Subdivide().

+ Here is the caller graph for this function:

Member Function Documentation

void AtomTree.AddAtom ( Vector3  pos,
string  type,
Color  col 
)
private

Definition at line 112 of file AtomTree.cs.

References AddAtom(), GetChildIndex(), and Subdivide().

Referenced by AddAtom(), and Build().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AtomTree.AddAtomToLeaf ( Vector3  pos,
string  type,
Color  col 
)
private

Definition at line 76 of file AtomTree.cs.

References Subdivide().

Referenced by Subdivide().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int AtomTree.GetChildIndex ( Vector3  p)
private

Definition at line 28 of file AtomTree.cs.

Referenced by AddAtom(), GetClosestAtomType(), Subdivide(), and SubGetClosestAtomColor().

+ Here is the caller graph for this function:

Color AtomTree.GetClosestAtomColor ( Vector3  pos)

Definition at line 177 of file AtomTree.cs.

References candidateCol, and SubGetClosestAtomColor().

+ Here is the call graph for this function:

string AtomTree.GetClosestAtomType ( Vector3  pos)

Definition at line 151 of file AtomTree.cs.

References GetChildIndex(), GetClosestAtomType(), and GetOptimalChild().

Referenced by SurfaceManager.ColorVertices(), GetClosestAtomType(), and GuidedNavigationManager.NearSpreading().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 41 of file AtomTree.cs.

Referenced by Subdivide().

+ Here is the caller graph for this function:

AtomTree AtomTree.GetOptimalChild ( Vector3  pos)
private

Definition at line 134 of file AtomTree.cs.

References IsEmpty(), and split.

Referenced by GetClosestAtomType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool AtomTree.IsEmpty ( )
private

Definition at line 130 of file AtomTree.cs.

Referenced by GetOptimalChild().

+ Here is the caller graph for this function:

void AtomTree.Print ( )

Definition at line 216 of file AtomTree.cs.

References Print().

Referenced by Print().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AtomTree.Subdivide ( )
private

Definition at line 86 of file AtomTree.cs.

References AddAtomToLeaf(), AtomTree(), bound0, GetChildIndex(), GetOffset(), and MAX_ATOMS.

Referenced by AddAtom(), and AddAtomToLeaf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AtomTree.SubGetClosestAtomColor ( Vector3  pos)

Definition at line 186 of file AtomTree.cs.

References GetChildIndex(), isLeaf, and SubGetClosestAtomColor().

Referenced by GetClosestAtomColor(), and SubGetClosestAtomColor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Vector3 AtomTree.bound0
private

Definition at line 10 of file AtomTree.cs.

Referenced by Subdivide().

Vector3 AtomTree.bound1
private

Definition at line 10 of file AtomTree.cs.

Color AtomTree.candidateCol
staticprivate

Definition at line 15 of file AtomTree.cs.

Referenced by GetClosestAtomColor().

float AtomTree.candidateDist
staticprivate

Definition at line 16 of file AtomTree.cs.

AtomTree [] AtomTree.children
private

Definition at line 11 of file AtomTree.cs.

List<Color> AtomTree.colors
private

Definition at line 9 of file AtomTree.cs.

bool AtomTree.isLeaf = true
private

Definition at line 12 of file AtomTree.cs.

Referenced by SubGetClosestAtomColor().

int AtomTree.MAX_ATOMS = 8
staticprivate

Definition at line 13 of file AtomTree.cs.

Referenced by Subdivide().

List<Vector3> AtomTree.positions
private

Definition at line 8 of file AtomTree.cs.

Vector3 AtomTree.split
private

Definition at line 10 of file AtomTree.cs.

Referenced by GetOptimalChild().

List<string> AtomTree.types
private

Definition at line 7 of file AtomTree.cs.


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