Click or drag to resize
Ab4d.SharpEngine logo

GeometryMesh Class

StandardMesh is a StandardMesh that can be defined by providing individual arrays for position, normal, texture coordinates and triangle indices.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.Meshes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public class GeometryMesh : StandardMesh

The GeometryMesh type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyNormals Gets or sets an array of Vector3 that defines the normals for this mesh. When Normals property value or the data in the normals array are changed and if this mesh was already initialized (IsInitialized is true) then you need to call UpdateMesh or UpdateMesh(BoundingBox) method for the changes to take effect.
Public propertyPositions Gets or sets an array of Vector3 that defines the positions for this mesh. When Positions property value or the data in the positions array are changed and if this mesh was already initialized (IsInitialized is true) then you need to call UpdateMesh or UpdateMesh(BoundingBox) method for the changes to take effect.
Public propertyTextureCoordinates Gets or sets an array of Vector2 that defines the texture coordinates for this mesh. When TextureCoordinates property value or the data in the positions array are changed and if this mesh was already initialized (IsInitialized is true) then you need to call UpdateMesh or UpdateMesh(BoundingBox) method for the changes to take effect.
Top
Methods
 NameDescription
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 TriangleMeshTGetDataChannel(MeshDataChannelTypes))
Protected methodOnUpdateMesh OnUpdateMesh
(Overrides TriangleMeshTOnUpdateMesh(Boolean))
Public methodUpdateBoundingBox UpdateBoundingBox method calculates the BoundingBox from the Vertices.
(Overrides TriangleMeshTUpdateBoundingBox)
Public methodUpdateNormals UpdateNormals method calculates the normals from the positions and triangle indices.
Top
See Also