C# Class kdTree, KernelSanders

Inheritance: MonoBehaviour
Mostra file Open project: jarllarsson/KernelSanders

Public Properties

Property Type Description
m_boxMax Vector3
m_boxMin Vector3
m_firstSplitDist float
m_intersectionCost float
m_objects List
m_traversalCost float
m_tree List

Public Methods

Method Description
OnDrawGizmos ( ) : void
Start ( ) : void
Update ( ) : void
buildTree ( Node, p_node, List p_objects, int p_dimsz, int p_dim, int p_idx, Vector3 pos, Vector3 parentSize, float p_cost ) : void
calculatePrimitiveCount ( Node, p_node, List p_objects, Vector3 p_leftBox, Vector3 p_rightBox, Vector3 p_leftBoxPos, Vector3 p_rightBoxPos, int &outLeftCount, int &outRightCount ) : void
drawNode ( Vector3 pos, Vector3 parentSize, int idx ) : void
getChildVoxelsMeasurement ( float p_inSplitpos, Vector3 p_axis, Vector3 p_inParentSize, Vector3 &outLeftSz, Vector3 &outRightSz ) : void

Private Methods

Method Description
calculateArea ( Vector3 p_extents ) : float
calculatecost ( Node, p_node, List p_objects, float p_splitpos, Vector3 p_axis, Vector3 p_currentSize, float p_currentArea, Vector3 p_currentPos, float &leftCost, float &rightCost ) : float
entrywiseMul ( Vector3 p_a, Vector3 p_b ) : Vector3
findOptimalSplitPos ( Node, p_node, List p_objects, AxisMark p_axis, Vector3 p_currentSize, float p_currentArea, Vector3 p_currentPos, float &outLeftCost, float &outRightCost, float &outCost ) : float
getLeftExtreme ( GameObject p_obj, Vector3 p_axis, Vector3 p_parentPos ) : float
getRightExtreme ( GameObject p_obj, Vector3 p_axis, Vector3 p_parentPos ) : float
objIntersectNode ( object p_obj, Vector3 pos, Vector3 parentSize ) : bool

Method Details

OnDrawGizmos() public method

public OnDrawGizmos ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

buildTree() public method

public buildTree ( Node, p_node, List p_objects, int p_dimsz, int p_dim, int p_idx, Vector3 pos, Vector3 parentSize, float p_cost ) : void
p_node Node,
p_objects List
p_dimsz int
p_dim int
p_idx int
pos Vector3
parentSize Vector3
p_cost float
return void

calculatePrimitiveCount() public method

public calculatePrimitiveCount ( Node, p_node, List p_objects, Vector3 p_leftBox, Vector3 p_rightBox, Vector3 p_leftBoxPos, Vector3 p_rightBoxPos, int &outLeftCount, int &outRightCount ) : void
p_node Node,
p_objects List
p_leftBox Vector3
p_rightBox Vector3
p_leftBoxPos Vector3
p_rightBoxPos Vector3
outLeftCount int
outRightCount int
return void

drawNode() public method

public drawNode ( Vector3 pos, Vector3 parentSize, int idx ) : void
pos Vector3
parentSize Vector3
idx int
return void

getChildVoxelsMeasurement() public method

public getChildVoxelsMeasurement ( float p_inSplitpos, Vector3 p_axis, Vector3 p_inParentSize, Vector3 &outLeftSz, Vector3 &outRightSz ) : void
p_inSplitpos float
p_axis Vector3
p_inParentSize Vector3
outLeftSz Vector3
outRightSz Vector3
return void

Property Details

m_boxMax public_oe property

public Vector3 m_boxMax
return Vector3

m_boxMin public_oe property

public Vector3 m_boxMin
return Vector3

m_firstSplitDist public_oe property

public float m_firstSplitDist
return float

m_intersectionCost public_oe property

public float m_intersectionCost
return float

m_objects public_oe property

public List m_objects
return List

m_traversalCost public_oe property

public float m_traversalCost
return float

m_tree public_oe property

public List m_tree
return List