Click or drag to resize
AB4D logo

MeshOctTree(PositionNormalTexture, Int32, Int32, Single) Constructor

Creates a new instance of MeshOctTree. The instance is created with a standard vertex buffer format (an array of PositionNormalTexture). If you need to create an MeshOctTree with an array of positions instead, then use the other constructor.

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.1.9105.2048 (1.0.0.0)
Syntax
C#
public MeshOctTree(
	PositionNormalTexture[] vertexBufferArray,
	int[] indicesArray,
	int maxNodeLevel = 4,
	float expandChildBoundingBoxes = 0,2f
)

Parameters

vertexBufferArray  PositionNormalTexture
standard vertex buffer (an array of PositionNormalTexture)
indicesArray  Int32
indices array as array of int values
maxNodeLevel  Int32  (Optional)
Number of levels used for MeshOctTree - bigger number reduces the number of triangles in each node but increased the MeshOctTree initialization time and used memory. Default value is 4.
expandChildBoundingBoxes  Single  (Optional)
a float that defined how much the bounding boxes of node overlap. By default the value is set to 0.2 - so each bounding box is extended for 20% (but it does not go out of the parent's bounding box). This way the triangles that lay on node borders will be put into the child nodes instead of having them in the parent node (there we need to do a hit test every time).
See Also