Class PointAABBTree3
Hierarchical Axis-Aligned-Bounding-Box tree for an IPointSet
TODO: no timestamp support right now...
Inheritance
PointAABBTree3
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class PointAABBTree3
Constructors
PointAABBTree3(IPointSet, Boolean)
Declaration
public PointAABBTree3(IPointSet pointsIn, bool autoBuild = true)
Parameters
Fields
FWNApproxOrder
FWN approximation order. can be 1 or 2. 2 is more accurate, obviously.
Declaration
public int FWNApproxOrder
Field Value
FWNAreaEstimateF
Replace this with function that returns proper area estimate
Declaration
public Func<int, double> FWNAreaEstimateF
Field Value
FWNBeta
FWN beta parameter - is 2.0 in paper
Declaration
Field Value
LeafMaxPointCount
Declaration
public int LeafMaxPointCount
Field Value
PointFilterF
Declaration
public Func<int, bool> PointFilterF
Field Value
Properties
Bounds
Root bounding box of tree (note: tree must be generated by calling a query function first!)
Declaration
public AxisAlignedBox3d Bounds { get; }
Property Value
Points
Declaration
public IPointSet Points { get; }
Property Value
Methods
box_contains(Int32, Vector3d)
Declaration
protected bool box_contains(int iBox, Vector3d p)
Parameters
Returns
branch_fast_winding_num(Int32, Vector3d)
Declaration
protected double branch_fast_winding_num(int iBox, Vector3d p)
Parameters
Returns
Build(PointAABBTree3.BuildStrategy)
Declaration
public void Build(PointAABBTree3.BuildStrategy eStrategy = PointAABBTree3.BuildStrategy.TopDownMidpoint)
Parameters
build_fast_winding_cache()
Declaration
protected void build_fast_winding_cache()
build_fast_winding_cache(Int32, Int32, Int32, out HashSet<Int32>)
Declaration
protected int build_fast_winding_cache(int iBox, int depth, int pt_count_thresh, out HashSet<int> pts_hash)
Parameters
Returns
can_use_fast_winding_cache(Int32, ref Vector3d)
Declaration
protected bool can_use_fast_winding_cache(int iBox, ref Vector3d q)
Parameters
Returns
collect_points(Int32, HashSet<Int32>)
Declaration
protected void collect_points(int iBox, HashSet<int> points)
Parameters
Type |
Name |
Description |
Int32 |
iBox |
|
HashSet<Int32> |
points |
|
DoTraversal(PointAABBTree3.TreeTraversal)
Hierarchically descend through the tree nodes, calling the TreeTrversal functions at each level
Declaration
public virtual void DoTraversal(PointAABBTree3.TreeTraversal traversal)
Parameters
evaluate_box_fast_winding_cache(Int32, ref Vector3d)
Declaration
protected double evaluate_box_fast_winding_cache(int iBox, ref Vector3d q)
Parameters
Returns
FastWindingNumber(Vector3d)
Fast approximation of winding number using far-field approximations
Declaration
public virtual double FastWindingNumber(Vector3d p)
Parameters
Returns
find_nearest_point(Int32, Vector3d, ref Double, ref Int32)
Declaration
protected void find_nearest_point(int iBox, Vector3d p, ref double fNearestSqr, ref int tID)
Parameters
FindNearestPoint(Vector3d, Double)
Find the point closest to p, within distance fMaxDist, or return InvalidID
Declaration
public virtual int FindNearestPoint(Vector3d p, double fMaxDist = 1.7976931348623157E+308)
Parameters
Returns
make_box_fast_winding_cache(Int32, IEnumerable<Int32>)
Declaration
protected void make_box_fast_winding_cache(int iBox, IEnumerable<int> pointIndices)
Parameters
TestCoverage()
Declaration
public void TestCoverage()
TotalExtentSum()
Total sum-of-extents over all boxes in the tree. Mainly useful to evaluate tree quality.
Declaration
public double TotalExtentSum()
Returns
TotalVolume()
Total sum of volumes of all boxes in the tree. Mainly useful to evaluate tree quality.
Declaration
public double TotalVolume()
Returns
tree_traversal(Int32, Int32, PointAABBTree3.TreeTraversal)
Declaration
protected virtual void tree_traversal(int iBox, int depth, PointAABBTree3.TreeTraversal traversal)
Parameters