DXMesh |
The DXMeshGeometry3D type exposes the following members.
Name | Description | |
---|---|---|
CreateOctTree | CreateOctTree returns a MeshOctTree that is created from the mesh defined in this DXMeshGeometry3D. This method must be called after the DXMeshGeometry3D has been initialized (added to DXScene or after InitializeResources method is called). | |
GetClosestHitResult | GetClosestHitResult method returns a DXRayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned. | |
GetDetailsText | Returns string that tells details about this SceneNode | |
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. | |
GetUsedDXMeshGeometry3D | GetUsedDXMeshGeometry3D method returns DXMeshGeometry3D that was created from the WPF MeshGeometry3D (or null if no DXMeshGeometry3D was created for the WPF material). parentDXDevice is requireed to check if the created DXMeshGeometry3D was created for the same device. | |
GetVertexAndIndexBuffers | GetVertexAndIndexBuffers method gets vertex and index buffer array that are created from MeshGeometry3D. This method must be called after the DXMeshGeometry3D was initialized or the Update method was called. Otherwise the returned array will be null. | |
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 | Forces creation of new VertexBuffers and IndexBuffer. This method sets IsVertexBufferDirty and IsIndexBufferDirty to true and then calls Update(Boolean) method. | |
SetUsedDXMeshGeometry3D | Sets a DXMeshGeometry3D that will be used when showing WPF MeshGeometry3D in DXEngine (must be set before the objects are initialized in DXEngine). | |
SortTrianglesByCameraDistance | SortTrianglesByCameraDistance method sorts the triangle indices so that the triangles are sorted by camera distance - triangles that are farther away are rendered first. After sorting indices, the Update(Boolean) method needs to be called to update the DirectX buffer. When using this method it is highly recommended to set CreateDynamicIndexBuffer to true. See remarks for more info. | |
ToString |
Returns a String that represents this instance.
(Overrides ObjectToString) | |
Update | Updates vertex and index buffers based on the IsVertexBufferDirty and IsIndexBufferDirty. To force update both vertex and index buffer call RecreateMesh method. When updateGpuBuffers parameter is false, then the vertex buffer array and index buffer array can be created without a DXDevice object and they will not be sent to the GPU. |