Click or drag to resize
Ab4d.SharpEngine logo

TriangleMeshT Methods

The TriangleMeshT type exposes the following members.

Methods
 NameDescription
Public methodGetClosestHitResult GetClosestHitResult method returns a RayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned.
Public methodGetDataChannel 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))
Public methodGetDetailsText GetDetailsText method gets string with values of individual vertices and triangle indices of this mesh.
(Overrides MeshGetDetailsText(Boolean, Boolean, Boolean, Int32, Int32, Int32))
Public methodGetNextHitResult 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.
Public methodGetNormals 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).
Public methodGetPositions 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).
Public methodGetTextureCoordinates 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).
Public methodGetTrianglePositions GetTrianglePositions sets the 3 positions that define the triangle with the specified index (max allowed triangleIndex is TrianglesCount - 1).
Public methodHitTest 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.
Protected methodOnInitializeSceneResources Initializes resources with the specified Scene and GpuDevice. This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides InitializedSceneComponentOnInitializeSceneResources(Scene, VulkanDevice))
Protected methodOnUpdateMesh OnUpdateMesh
(Overrides MeshOnUpdateMesh(Boolean))
Public methodUpdateBoundingBox UpdateBoundingBox method calculates the BoundingBox from the Vertices.
Top
See Also