Triangle |
The TriangleMeshT type exposes the following members.
Name | Description | |
---|---|---|
GetClosestHitResult | GetClosestHitResult method returns a RayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned. | |
GetDataChannel |
GetDataChannel returns an object with the data from the specified channel.
For example, for Positions an array of Vector3 is returned with positions defined by this mesh.
Executing this method may take some time because the method may need to create new array objects and copy data from some other data structure (for example an array of PositionNormalTextureVertex values).
(Overrides MeshGetDataChannel(MeshDataChannelTypes)) | |
GetDetailsText |
GetDetailsText method gets string with values of individual vertices and triangle indices of this mesh.
(Overrides MeshGetDetailsText(Boolean, Boolean, Boolean, Int32, Int32, Int32)) | |
GetNextHitResult | GetNextHitResult method continues hit testing from the previously returned hit test and returns a RayHitTestResult 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. | |
GetNormals | Returns an array of Vector3 that define the normals of this mesh. Executing this method may take some time because the method will need to create new array objects and copy data from the original vertices data structure (for example an array of PositionNormalTextureVertex values). | |
GetPositions | Returns an array of Vector3 that define the positions of this mesh. Executing this method may take some time because the method will need to create new array objects and copy data from the original vertices data structure (for example an array of PositionNormalTextureVertex values). | |
GetTextureCoordinates | Returns an array of Vector2 that define the texture coordinates of this mesh. Executing this method may take some time because the method will need to create new array objects and copy data from the original vertices data structure (for example an array of PositionNormalTextureVertex values). | |
GetTrianglePositions | GetTrianglePositions sets the 3 positions that define the triangle with the specified index (max allowed triangleIndex is TrianglesCount - 1). | |
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. | |
OnInitializeSceneResources |
Initializes resources with the specified Scene and GpuDevice.
This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides InitializedSceneComponentOnInitializeSceneResources(Scene, VulkanDevice)) | |
OnUpdateMesh |
OnUpdateMesh
(Overrides MeshOnUpdateMesh(Boolean)) | |
UpdateBoundingBox | UpdateBoundingBox method calculates the BoundingBox from the Vertices. |