C# 클래스 Pathfinding.PointKDTree

파일 보기 프로젝트 열기: FellowshipOfTheGame/anathema 1 사용 예제들

공개 메소드들

메소드 설명
Add ( GraphNode node ) : void

Add the node to the tree

Add ( GraphNode point, int index, int depth ) : void
Build ( int index, List nodes, int start, int end ) : void
CollectAndClear ( int index, List buffer ) : void
EnsureSize ( int index ) : void
GetInRange ( Int3 point, long sqrRadius, List buffer ) : void

Add all nodes within a squared distance of the point to the buffer.

GetInRangeInternal ( int index, Int3 point, long sqrRadius, List buffer ) : void
GetNearest ( Int3 point, NNConstraint constraint ) : GraphNode

Closest node to the point which satisfies the constraint

GetNearestInternal ( int index, Int3 point, NNConstraint constraint, GraphNode &best, long &bestSqrDist ) : void
PointKDTree ( ) : System.Collections.Generic
Rebalance ( int index ) : void
Rebuild ( Array nodes, int start, int end ) : void

Rebuild the tree starting with all nodes in the array between index start (inclusive) and end (exclusive)

비공개 메소드들

메소드 설명
GetOrCreateList ( ) : Pathfinding.GraphNode[]
MaxAllowedSize ( int numNodes, int depth ) : int
Size ( int index ) : int

메소드 상세

Add() 공개 메소드

Add the node to the tree
public Add ( GraphNode node ) : void
node GraphNode
리턴 void

Add() 공개 메소드

public Add ( GraphNode point, int index, int depth ) : void
point GraphNode
index int
depth int
리턴 void

Build() 공개 메소드

public Build ( int index, List nodes, int start, int end ) : void
index int
nodes List
start int
end int
리턴 void

CollectAndClear() 공개 메소드

public CollectAndClear ( int index, List buffer ) : void
index int
buffer List
리턴 void

EnsureSize() 공개 메소드

public EnsureSize ( int index ) : void
index int
리턴 void

GetInRange() 공개 메소드

Add all nodes within a squared distance of the point to the buffer.
public GetInRange ( Int3 point, long sqrRadius, List buffer ) : void
point Int3 Nodes around this point will be added to the buffer.
sqrRadius long squared maximum distance in Int3 space. If you are converting from world space you will need to multiply by Int3.Precision: /// var sqrRadius = (worldSpaceRadius * Int3.Precision) * (worldSpaceRadius * Int3.Precision);
buffer List All nodes will be added to this list.
리턴 void

GetInRangeInternal() 공개 메소드

public GetInRangeInternal ( int index, Int3 point, long sqrRadius, List buffer ) : void
index int
point Int3
sqrRadius long
buffer List
리턴 void

GetNearest() 공개 메소드

Closest node to the point which satisfies the constraint
public GetNearest ( Int3 point, NNConstraint constraint ) : GraphNode
point Int3
constraint NNConstraint
리턴 GraphNode

GetNearestInternal() 공개 메소드

public GetNearestInternal ( int index, Int3 point, NNConstraint constraint, GraphNode &best, long &bestSqrDist ) : void
index int
point Int3
constraint NNConstraint
best GraphNode
bestSqrDist long
리턴 void

PointKDTree() 공개 메소드

public PointKDTree ( ) : System.Collections.Generic
리턴 System.Collections.Generic

Rebalance() 공개 메소드

public Rebalance ( int index ) : void
index int
리턴 void

Rebuild() 공개 메소드

Rebuild the tree starting with all nodes in the array between index start (inclusive) and end (exclusive)
public Rebuild ( Array nodes, int start, int end ) : void
nodes Array
start int
end int
리턴 void