Simple |
The SimpleMeshT type exposes the following members.
Name | Description | |
---|---|---|
CalculateBounds | Calculates and updates Bounds from the specified VertexBufferArray. The method can calculate bounds only when VertexBufferArray is of type PositionNormalTexture and PositionNormal. | |
CreateOctTree | CreateOctTree returns a MeshOctTree that is created from the mesh defined in this SimpleMesh. This method can be used when the type of the vertex buffer is PositionNormalTexture or Vector3 (only positions). When the type of the vertex buffer is PositionNormal or PositionTexture, then vertex data are copied into positions array and an then OctTree is created. Other types of vertex buffers are not supported and will generate an exception. | |
GetClosestHitResult | GetClosestHitResult method returns a DXRayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned. | |
GetNextHitResult | GetNextHitResult method continues hit testing from the previously returned hit test and returns a DXRayHitTestResult with the next hit triangle (not necessary the next closest triangle) or null if no other triangle is hit. This method can be used to get all hit results. | |
GetTrianglePositions | GetTrianglePositions sets the 3 positions that define the triangle with the specified triangle index. | |
HitTest | HitTest method test the triangles defined in this mesh for hitting with the specified ray. When getOnlyNextHitTest is false, then the closest hit result is returned, else the next hit result is returned. When no hit is found, null is returned. | |
RecreateMesh | RecreateMesh disposes the existing VertexBuffers and IndexBuffer and recreates the buffers. | |
SortTrianglesByCameraDistance | SortTrianglesByCameraDistance method sorts the triangle indices so that the triangles are sorted by camera distance - triangles that are farther away are rendered first. See remarks for more info. |