Unigine.MeshDynamic Class
This class is used to procedurally create dynamic meshes (i.e. triangles, lines or points) and modify them at run time.
MeshDynamic Class
Properties
int Flags#
The current set of flags of the dynamic mesh.
set
Sets the flags of the dynamic mesh.
Members
IntPtr GetMeshDynamic ( ) #
MeshDynamic Create ( int flags ) #
Creates a new dynamic mesh instance in accordance with the specified flags.Arguments
- int flags - Creation flags. A combination of IMMUTABLE_*, DYNAMIC_* and FLUSH_* flags.
Return value
New MeshDynamic instance.void Bind ( ) #
Binds dynamic mesh data (index and vertex buffers) to the input assembler stage.void Unbind ( ) #
Unbinds dynamic mesh data (index and vertex buffers).void FlushVertex ( ) #
Flushes the vertex buffer and sends all data to GPU. This method is called automatically, if the length of the vertex buffer changes. If you change the contents of the vertex buffer, you should call this method.void FlushIndices ( ) #
Flushes the index buffer and sends all data to GPU. This method is called automatically, if the length of the index buffer changes. If you change the contents of the index buffers, you should call this method.int RenderSurface ( int mode ) #
Renders the surface.Arguments
- int mode - Rendering mode. One of the MODE_* variables.
Return value
Number of primitives rendered. Primitive tyme is determined by the rendering mode.int RenderInstancedSurface ( int mode, int num ) #
Renders the specified number of instances of the surface.Arguments
- int mode - Rendering mode. One of the MODE_* variables.
- int num - Number of instances to be rendered.
Return value
Number of primitives rendered. Primitive tyme is determined by the rendering mode.int RenderSurface ( int mode, int base, int begin, int end ) #
Renders the surface specified by begin and end indices.Arguments
- int mode - Rendering mode. One of the MODE_* variables.
- int base - A value added to each index before reading a vertex from the vertex buffer.
- int begin - First index of the surface to be read by the GPU from the index buffer.
- int end - Last index of the surface to be read by the GPU from the index buffer.
Return value
Number of primitives rendered. Primitive tyme is determined by the rendering mode.int RenderInstancedSurface ( int mode, int base, int begin, int end, int num ) #
Renders the specified number of instances of the surface specified by begin and end indices.Arguments
- int mode - Rendering mode. One of the MODE_* variables.
- int base - A value added to each index before reading a vertex from the vertex buffer.
- int begin - First index of the surface to be read by the GPU from the index buffer.
- int end - Last index of the surface to be read by the GPU from the index buffer.
- int num - Number of instances to be rendered.
Return value
Number of primitives rendered. Primitive tyme is determined by the rendering mode.int Render ( int mode, int flush ) #
Renders the dynamic mesh with the specified flags and mode.Arguments
- int mode - Rendering mode. One of the MODE_* variables.
- int flush - Flush flag. One of the FLUSH_* variables.
Return value
Number of triangles rendered.long GetSystemMemoryUsage ( ) #
Returns the current amount of system memory used by the dynamic mesh, in bytes.Return value
System memory amount used by the dynamic mesh, in bytes.long GetVideoMemoryUsage ( ) #
Returns the current amount of video memory used by the dynamic mesh.Return value
Video memory amount used by the dynamic mesh, in bytes.void SetVertexFormat ( Attribute[] attributes ) #
Sets vertex format to be used by the dynamic mesh.Arguments
- Attribute[] attributes - Array of attributes to be used for vertex format.
int GetVertexSize ( ) #
Returns vertex size of the dynamic mesh.Return value
Vertex size.int GetNumAttributes ( ) #
Returns the number of vertex attributes of the dynamic mesh.void ClearVertex ( ) #
Removes all dynamic mesh vertices.void AllocateVertex ( int num ) #
Allocates a given number of vertices in the vertex buffer. With this function, memory can be allocated once rather than in chunks, making the creation faster.Arguments
- int num - Number of vertices for which memory is to be allocated.
void RemoveVertex ( int num, int size ) #
Removes the specified number of elements starting from the specified one from the vertex buffer of the dynamic mesh.Arguments
- int num - Number of the first vertex to be removed.
- int size - Number of vertices to be removed.
void SetNumVertex ( int num ) #
Arguments
- int num - New number of vertices.
int GetNumVertex ( ) #
Returns the total number of vertices for the dynamic mesh.void AddVertexArray ( IntPtr vertex, int num_vertex ) #
Adds a set of new elements to the vertex buffer of the dynamic mesh at once.Arguments
- IntPtr vertex - Array of vertices to be added.
- int num_vertex - Number of vertices to add.
void SetVertexArray ( IntPtr vertex, int num_vertex ) #
Replaces the current vertex buffer of the dynamic mesh with the specified array of vertices.Arguments
- IntPtr vertex - Array of vertices to be added.
- int num_vertex - Number of vertices to add.
void AddVertexHalf1 ( int attribute, float x ) #
Adds a new vertex with a single half coordinate to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
void AddVertexHalf2 ( int attribute, float x, float y ) #
Adds a new vertex with 2 half coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
void AddVertexHalf3 ( int attribute, float x, float y, float z ) #
Adds a new vertex with 3 half coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
void AddVertexHalf4 ( int attribute, float x, float y, float z, float w ) #
Adds a new vertex with 4 half coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
- float w - W coordinate of the vertex.
void AddVertexFloat ( int attribute, float[] value ) #
Arguments
- int attribute - Attribute to be set.
- float[] value
void AddVertexFloat1 ( int attribute, float x ) #
Adds a new vertex with a single float coordinate to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
void AddVertexFloat2 ( int attribute, float x, float y ) #
Adds a new vertex with 2 float coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
void AddVertexFloat3 ( int attribute, float x, float y, float z ) #
Adds a new vertex with 3 float coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
void AddVertexFloat4 ( int attribute, float x, float y, float z, float w ) #
Adds a new vertex with 4 float coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
- float w - W coordinate of the vertex.
void AddVertexDouble ( int attribute, double[] value ) #
Arguments
- int attribute - Attribute to be set.
- double[] value
void AddVertexDouble1 ( int attribute, double x ) #
Adds a new vertex with a single double coordinate to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
void AddVertexDouble2 ( int attribute, double x, double y ) #
Adds a new vertex with 2 double coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
void AddVertexDouble3 ( int attribute, double x, double y, double z ) #
Adds a new vertex with 2 double coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
- double z - Z coordinate of the vertex.
void AddVertexDouble4 ( int attribute, double x, double y, double z, double w ) #
Adds a new vertex with 4 double coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
- double z - Z coordinate of the vertex.
- double w - W coordinate of the vertex.
void AddVertexUChar ( int attribute, uchar[] value ) #
Arguments
- int attribute - Attribute to be set.
- uchar[] value
void AddVertexUChar1 ( int attribute, byte x ) #
Adds a new vertex with a single unsigned char coordinate to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
void AddVertexUChar2 ( int attribute, byte x, byte y ) #
Adds a new vertex with 2 unsigned char coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
void AddVertexUChar3 ( int attribute, byte x, byte y, byte z ) #
Adds a new vertex with 3 unsigned char coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
- byte z - Z coordinate of the vertex.
void AddVertexUChar4 ( int attribute, byte x, byte y, byte z, byte w ) #
Adds a new vertex with 4 unsigned char coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
- byte z - Z coordinate of the vertex.
- byte w - W coordinate of the vertex.
void AddVertexUShort ( int attribute, ushort[] value ) #
Arguments
- int attribute - Attribute to be set.
- ushort[] value
void AddVertexUShort1 ( int attribute, ushort x ) #
Adds a new vertex with a single unsigned short coordinate to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
void AddVertexUShort2 ( int attribute, ushort x, ushort y ) #
Adds a new vertex with 2 unsigned short coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
void AddVertexUShort3 ( int attribute, ushort x, ushort y, ushort z ) #
Adds a new vertex with 3 unsigned short coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
- ushort z - Z coordinate of the vertex.
void AddVertexUShort4 ( int attribute, ushort x, ushort y, ushort z, ushort w ) #
Adds a new vertex with 4 unsigned short coordinates to the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
- ushort z - Z coordinate of the vertex.
- ushort w - W coordinate of the vertex.
void SetVertexHalf1 ( int attribute, float x ) #
Sets half-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
void SetVertexHalf2 ( int attribute, float x, float y ) #
Sets half-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
void SetVertexHalf3 ( int attribute, float x, float y, float z ) #
Sets half-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
void SetVertexHalf4 ( int attribute, float x, float y, float z, float w ) #
Sets half-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
- float w - W coordinate of the vertex.
void SetVertexFloat ( int attribute, float[] value ) #
Sets float-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float[] value - Float-type coordinates to be set.
void SetVertexFloat1 ( int attribute, float x ) #
Sets float-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
void SetVertexFloat2 ( int attribute, float x, float y ) #
Sets float-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
void SetVertexFloat3 ( int attribute, float x, float y, float z ) #
Sets float-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
void SetVertexFloat4 ( int attribute, float x, float y, float z, float w ) #
Sets float-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
- float w - W coordinate of the vertex.
void SetVertexDouble ( int attribute, double[] value ) #
Sets double-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double[] value - Double-type coordinates to be set.
void SetVertexDouble1 ( int attribute, double x ) #
Sets double-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
void SetVertexDouble2 ( int attribute, double x, double y ) #
Sets double-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
void SetVertexDouble3 ( int attribute, double x, double y, double z ) #
Sets double-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
- double z - Z coordinate of the vertex.
void SetVertexDouble4 ( int attribute, double x, double y, double z, double w ) #
Sets double-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
- double z - Z coordinate of the vertex.
- double w - W coordinate of the vertex.
void SetVertexUChar ( int attribute, uchar[] value ) #
Sets uchar-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- uchar[] value - Uchar-type coordinates to be set.
void SetVertexUChar1 ( int attribute, byte x ) #
Sets uchar-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
void SetVertexUChar2 ( int attribute, byte x, byte y ) #
Sets uchar-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
void SetVertexUChar3 ( int attribute, byte x, byte y, byte z ) #
Sets uchar-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
- byte z - Z coordinate of the vertex.
void SetVertexUChar4 ( int attribute, byte x, byte y, byte z, byte w ) #
Sets uchar-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
- byte z - Z coordinate of the vertex.
- byte w - W coordinate of the vertex.
void SetVertexUShort ( int attribute, ushort[] value ) #
Sets ushort-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort[] value - Ushort-type coordinates to be set.
void SetVertexUShort1 ( int attribute, ushort x ) #
Sets ushort-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
void SetVertexUShort2 ( int attribute, ushort x, ushort y ) #
Sets ushort-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
void SetVertexUShort3 ( int attribute, ushort x, ushort y, ushort z ) #
Sets ushort-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
- ushort z - Z coordinate of the vertex.
void SetVertexUShort4 ( int attribute, ushort x, ushort y, ushort z, ushort w ) #
Sets ushort-type coordinates and specified attribute for the last vertex in the vertex buffer of the dynamic mesh.Arguments
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
- ushort z - Z coordinate of the vertex.
- ushort w - W coordinate of the vertex.
void SetVertexHalf1 ( int vertex, int attribute, float x ) #
Sets half-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
void SetVertexHalf2 ( int vertex, int attribute, float x, float y ) #
Sets half-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
void SetVertexHalf3 ( int vertex, int attribute, float x, float y, float z ) #
Sets half-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
void SetVertexHalf4 ( int vertex, int attribute, float x, float y, float z, float w ) #
Sets half-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
- float w - W coordinate of the vertex.
void SetVertexFloat ( int vertex, int attribute, float[] value ) #
Sets float-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float[] value - Float-type coordinates to be set.
void SetVertexFloat1 ( int vertex, int attribute, float x ) #
Sets float-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
void SetVertexFloat2 ( int vertex, int attribute, float x, float y ) #
Sets float-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
void SetVertexFloat3 ( int vertex, int attribute, float x, float y, float z ) #
Sets float-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
void SetVertexFloat4 ( int vertex, int attribute, float x, float y, float z, float w ) #
Sets float-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- float x - X coordinate of the vertex.
- float y - Y coordinate of the vertex.
- float z - Z coordinate of the vertex.
- float w - W coordinate of the vertex.
void SetVertexDouble ( int vertex, int attribute, double[] value ) #
Sets double-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- double[] value - Double-type coordinates to be set.
void SetVertexDouble1 ( int vertex, int attribute, double x ) #
Sets double-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
void SetVertexDouble2 ( int vertex, int attribute, double x, double y ) #
Sets double-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
void SetVertexDouble3 ( int vertex, int attribute, double x, double y, double z ) #
Sets double-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
- double z - Z coordinate of the vertex.
void SetVertexDouble4 ( int vertex, int attribute, double x, double y, double z, double w ) #
Sets double-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- double x - X coordinate of the vertex.
- double y - Y coordinate of the vertex.
- double z - Z coordinate of the vertex.
- double w - W coordinate of the vertex.
void SetVertexUChar ( int vertex, int attribute, uchar[] value ) #
Sets uchar-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- uchar[] value - Uchar-type coordinates to be set.
void SetVertexUChar1 ( int vertex, int attribute, byte x ) #
Sets uchar-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
void SetVertexUChar2 ( int vertex, int attribute, byte x, byte y ) #
Sets uchar-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
void SetVertexUChar3 ( int vertex, int attribute, byte x, byte y, byte z ) #
Sets uchar-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
- byte z - Z coordinate of the vertex.
void SetVertexUChar4 ( int vertex, int attribute, byte x, byte y, byte z, byte w ) #
Sets uchar-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- byte x - X coordinate of the vertex.
- byte y - Y coordinate of the vertex.
- byte z - Z coordinate of the vertex.
- byte w - W coordinate of the vertex.
void SetVertexUShort ( int vertex, int attribute, ushort[] value ) #
Sets ushort-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- ushort[] value - Ushort-type coordinates to be set.
void SetVertexUShort1 ( int vertex, int attribute, ushort x ) #
Sets ushort-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
void SetVertexUShort2 ( int vertex, int attribute, ushort x, ushort y ) #
Sets ushort-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
void SetVertexUShort3 ( int vertex, int attribute, ushort x, ushort y, ushort z ) #
Sets ushort-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
- ushort z - Z coordinate of the vertex.
void SetVertexUShort4 ( int vertex, int attribute, ushort x, ushort y, ushort z, ushort w ) #
Sets ushort-type coordinates and specified attribute for the specified vertex in the vertex buffer of the dynamic mesh.Arguments
- int vertex - Vertex number.
- int attribute - Attribute to be set.
- ushort x - X coordinate of the vertex.
- ushort y - Y coordinate of the vertex.
- ushort z - Z coordinate of the vertex.
- ushort w - W coordinate of the vertex.
void ClearIndices ( ) #
Removes all indices of the dynamic mesh.void AllocateIndices ( int num ) #
Allocates a given number of vertex indices in the index buffer. With this function, memory can be allocated once rather than in chunks, making the creation faster.Arguments
- int num - Number of indices for which memory is to be allocated.
void RemoveIndices ( int num, int size ) #
Removes the specified number of indices starting from the specified one from the index buffer of the dynamic mesh.Arguments
- int num - Number of the first index to be removed.
- int size - Number of indices to be removed.
void SetNumIndices ( int num ) #
Sets the total number of indices for the dynamic mesh.Arguments
- int num - New number of indices.
int GetNumIndices ( ) #
Returns the total number of indices for the dynamic mesh.Return value
Number of indices.void AddIndex ( int index ) #
Adds a new index to the index buffer of the dynamic mesh.Arguments
- int index - Index to be added.
void AddIndexFast ( int index ) #
Adds a new index to the index buffer of the dynamic mesh.Arguments
- int index - Index to be added.
void AddIndices ( int i0, int i1 ) #
Adds two new indices to the index buffer of the dynamic mesh at once. This method can be used to add indices for a line strips via a single function call.Arguments
- int i0 - First index to be added.
- int i1 - Second index to be added.
void AddIndices ( int i0, int i1, int i2 ) #
Adds three new indices to the index buffer of the dynamic mesh at once. This method can be used to add indices for a triangle via a single function call.Arguments
- int i0 - First index to be added.
- int i1 - Second index to be added.
- int i2 - Third index to be added.
void AddIndices ( int i0, int i1, int i2, int i3 ) #
Adds four new indices to the index buffer of the dynamic mesh at once. This method can be used to add indices for a quad via a single function call.Arguments
- int i0 - First index to be added.
- int i1 - Second index to be added.
- int i2 - Third index to be added.
- int i3 - Fourth index to be added.
void AddIndicesArray ( int[] indices, int indices_size ) #
Adds a set of new elements to the index buffer of the dynamic mesh at once.Arguments
- int[] indices - Array of indices to be added.
- int indices_size - Number of indices to be added.
void SetIndicesArray ( int[] indices, int indices_size ) #
Replaces the current index buffer of the dynamic mesh with the specified array of indices.Arguments
- int[] indices - Array of indices to be set.
- int indices_size - Number of indices to be set.
int[] GetIndicesArray ( ) #
Returns the index buffer of the dynamic mesh.Return value
Index buffer of the dynamic mesh.void AddPoints ( int num_points ) #
Adds the specified number of points to the dynamic mesh.Arguments
- int num_points - Number of points to be added.
void AddLineStrip ( int num_vertex ) #
Adds a line strip to the dynamic mesh. This method does not add vertices, rather it allocates indices, for which vertices should be then created with one of the addVertex*() methods. Indices will point to vertices starting from the current last vertex in the vertex buffer.Arguments
- int num_vertex - Number of vertices comprising the strip.
void AddTriangles ( int num_triangles ) #
Adds the specified number of triangles to the dynamic mesh.Arguments
- int num_triangles - Number of triangles to be added.
void AddTriangleFan ( int num_vertex ) #
Adds a triangle fan to the dynamic mesh. This method does not add vertices, rather it allocates indices, for which vertices should be then created with one of the addVertex*() methods. Indices will point to vertices starting from the current last vertex in the vertex buffer.Arguments
- int num_vertex - Number of vertices comprising the fan.
void AddTriangleStrip ( int num_vertex ) #
Adds a triangle strip to the dynamic mesh. This method does not add vertices, rather it allocates indices, for which vertices should be then created with one of the addVertex*() methods. Indices will point to vertices starting from the current last vertex in the vertex buffer.Arguments
- int num_vertex - Number of vertices comprising the strip.
void AddTriangleQuads ( int num_quads ) #
Adds a given number of quadrilaterals to the dynamic mesh. This method does not add vertices, rather it allocates indices, for which vertices should be then created with one of the addVertex*() methods. Indices will point to vertices starting from the current last vertex in the vertex buffer.Arguments
- int num_quads - Number of quadrilaterals to be added.
int SaveState ( Stream stream ) #
Arguments
- Stream stream
int RestoreState ( Stream stream ) #
Arguments
- Stream stream
Last update:
2020-06-16
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)