Click or drag to resize
Ab4d.SharpEngine logo

MeshOctree(Vector3, Int32, BoundingBox, Int32, Single) Constructor

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

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
public MeshOctree(
	Vector3[] positionsArray,
	int[]? indicesArray,
	BoundingBox boundingBox,
	int maxNodeLevel = 4,
	float expandChildBoundingBoxes = 0,2f
)

Parameters

positionsArray  Vector3
array of positions (array of Vector3 values)
indicesArray  Int32
indices array as array of int values
boundingBox  BoundingBox
BoundingBox
maxNodeLevel  Int32  (Optional)
Number of levels used for MeshOctree - bigger number reduces the number of triangles in each node but increased the MeshOctree 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).
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.MeshOctree.#ctor(System.Numerics.Vector3[],System.Int32[],Ab4d.SharpEngine.Common.BoundingBox,System.Int32,System.Single)"]

See Also