UnityMol  1.0.25beta
UMol.KDTree Class Reference

Public Member Functions

 KDTree ()
 
int FindNearest (Vector3 pt)
 
float FindNearest_R (Vector3 pt)
 
int FindNearestK (Vector3 pt, int k)
 
int [] FindNearestsK (Vector3 pt, int k)
 
int [] FindNearestsRadius (Vector3 pt, float radius)
 
float FindNearestK_R (Vector3 pt, int k)
 
float [] FindNearestsK_R (Vector3 pt, int k)
 
IdDist [] FindNearestsK_IndicesDistances (Vector3 pt, int k)
 
string Dump (int level)
 

Static Public Member Functions

static KDTree MakeFromPoints (params Vector3[] points)
 
static KDTree MakeFromUnityMolAtoms (List< UnityMolAtom > atoms)
 
static int FindPivotIndexAtoms (List< UnityMolAtom > atoms, int[] inds, int stIndex, int enIndex, int axis)
 
static int FindPivotIndex (Vector3[] points, int[] inds, int stIndex, int enIndex, int axis)
 
static int [] Iota (int num)
 

Public Attributes

KDTree [] lr
 
Vector3 pivot
 
int pivotIndex
 
int axis
 

Constructor & Destructor Documentation

◆ KDTree()

UMol.KDTree.KDTree ( )

Member Function Documentation

◆ Dump()

string UMol.KDTree.Dump ( int  level)

◆ FindNearest()

int UMol.KDTree.FindNearest ( Vector3  pt)

◆ FindNearest_R()

float UMol.KDTree.FindNearest_R ( Vector3  pt)

◆ FindNearestK()

int UMol.KDTree.FindNearestK ( Vector3  pt,
int  k 
)

◆ FindNearestK_R()

float UMol.KDTree.FindNearestK_R ( Vector3  pt,
int  k 
)

◆ FindNearestsK()

int [] UMol.KDTree.FindNearestsK ( Vector3  pt,
int  k 
)

◆ FindNearestsK_IndicesDistances()

IdDist [] UMol.KDTree.FindNearestsK_IndicesDistances ( Vector3  pt,
int  k 
)

◆ FindNearestsK_R()

float [] UMol.KDTree.FindNearestsK_R ( Vector3  pt,
int  k 
)

◆ FindNearestsRadius()

int [] UMol.KDTree.FindNearestsRadius ( Vector3  pt,
float  radius 
)

◆ FindPivotIndex()

static int UMol.KDTree.FindPivotIndex ( Vector3 []  points,
int []  inds,
int  stIndex,
int  enIndex,
int  axis 
)
static

◆ FindPivotIndexAtoms()

static int UMol.KDTree.FindPivotIndexAtoms ( List< UnityMolAtom atoms,
int []  inds,
int  stIndex,
int  enIndex,
int  axis 
)
static

◆ Iota()

static int [] UMol.KDTree.Iota ( int  num)
static

◆ MakeFromPoints()

static KDTree UMol.KDTree.MakeFromPoints ( params Vector3 []  points)
static

◆ MakeFromUnityMolAtoms()

static KDTree UMol.KDTree.MakeFromUnityMolAtoms ( List< UnityMolAtom atoms)
static

Make sure the atoms are part of the same structure otherwise you don't get the correct local positions when getting atom.position

Member Data Documentation

◆ axis

int UMol.KDTree.axis

◆ lr

KDTree [] UMol.KDTree.lr

◆ pivot

Vector3 UMol.KDTree.pivot

◆ pivotIndex

int UMol.KDTree.pivotIndex

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