3rd Eye Scene C#
3rd Eye Scene C# documentation
|
A simple MeshResource implementation. More...
Public Member Functions | |
SimpleMesh (uint id, MeshDrawType drawType=MeshDrawType.Triangles, MeshComponentFlag components=MeshComponentFlag.Vertex|MeshComponentFlag.Index) | |
Create a new mesh resource. | |
override uint | VertexCount (int stream=0) |
Exposes the number of vertices in the mesh. | |
override uint | IndexCount (int stream=0) |
Exposes the number of indices in the mesh. | |
override Vector3[] | Vertices (int stream=0) |
Supports iteration of the vertices of the mesh. | |
override int[] | Indices4 (int stream=0) |
Supports iteration of the indices of the mesh when using four byte indices. | |
override Vector3[] | Normals (int stream=0) |
Supports iteration of the normal of the mesh. | |
override Vector2[] | UVs (int stream=0) |
Supports iteration of the UV coordinates of the mesh. | |
override uint[] | Colours (int stream=0) |
Supports iteration of per vertex colours of the mesh. | |
void | SetVertex (int at, Vector3 v) |
Sets the vertex at the given index. | |
void | AddVertex (Vector3 v) |
Adds a vertex. | |
void | AddVertices (IEnumerable< Vector3 > vertices) |
Adds a number of vertices. | |
void | SetIndex (int at, int index) |
Sets an index value. | |
void | AddIndex (int index) |
Adds an index value. | |
void | AddIndices (IEnumerable< int > indices) |
Add a set of indices. | |
void | SetNormal (int at, Vector3 normal) |
Set a vertex normal. | |
void | AddNormal (Vector3 normal) |
Add a vertex normal. | |
void | AddNormals (IEnumerable< Vector3 > normals) |
Add a list of normals. | |
void | SetUV (int at, Vector2 uv) |
Set a vertex UV coordinate. | |
void | AddUV (Vector2 uv) |
Add a vertex UV coordinate. | |
void | AddUV (IEnumerable< Vector2 > uvs) |
Add a list of UV coordinates. | |
void | SetColour (int at, uint colour) |
Set a vertex colour. | |
void | AddColour (uint colour) |
Add a vertex colour. | |
void | AddColours (IEnumerable< uint > colours) |
Add a list of colours. | |
Protected Member Functions | |
void | EnsureIndices () |
Ensures indices are marked as required and allocated. | |
void | EnsureNormals () |
Ensures normals are marked as required and allocated. | |
void | EnsureUVs () |
Ensures UVs are marked as required and allocated. | |
void | EnsureColours () |
Ensures colours are marked as required and allocated. | |
Properties | |
override int | IndexSize [get] |
Defines the byte size used by indices in this mesh. |
A simple MeshResource implementation.
Tes::Shapes::SimpleMesh::SimpleMesh | ( | uint | id, |
MeshDrawType | drawType = MeshDrawType.Triangles , |
||
MeshComponentFlag | components = MeshComponentFlag.Vertex | MeshComponentFlag.Index |
||
) | [inline] |
Create a new mesh resource.
id | The unique mesh resource ID for this mesh. |
drawType | Defines the topology. |
components | Identifies the required MeshComponentFlag. |
void Tes::Shapes::SimpleMesh::AddColour | ( | uint | colour | ) | [inline] |
Add a vertex colour.
colour | The colour value. |
void Tes::Shapes::SimpleMesh::AddColours | ( | IEnumerable< uint > | colours | ) | [inline] |
Add a list of colours.
colours | The colours to add |
void Tes::Shapes::SimpleMesh::AddIndex | ( | int | index | ) | [inline] |
Adds an index value.
index | The index value (referencing a valid vertex). |
void Tes::Shapes::SimpleMesh::AddIndices | ( | IEnumerable< int > | indices | ) | [inline] |
Add a set of indices.
indices | Indices to add. |
void Tes::Shapes::SimpleMesh::AddNormal | ( | Vector3 | normal | ) | [inline] |
Add a vertex normal.
normal | The normal value. |
void Tes::Shapes::SimpleMesh::AddNormals | ( | IEnumerable< Vector3 > | normals | ) | [inline] |
Add a list of normals.
normals | The normals to add |
void Tes::Shapes::SimpleMesh::AddUV | ( | Vector2 | uv | ) | [inline] |
Add a vertex UV coordinate.
uv | The UV coordinate. |
void Tes::Shapes::SimpleMesh::AddUV | ( | IEnumerable< Vector2 > | uvs | ) | [inline] |
Add a list of UV coordinates.
uvs | The UV coordinates. |
void Tes::Shapes::SimpleMesh::AddVertex | ( | Vector3 | v | ) | [inline] |
Adds a vertex.
v | The vertex to add. |
void Tes::Shapes::SimpleMesh::AddVertices | ( | IEnumerable< Vector3 > | vertices | ) | [inline] |
Adds a number of vertices.
vertices | Vertices to add. |
override uint [] Tes::Shapes::SimpleMesh::Colours | ( | int | stream = 0 | ) | [inline, virtual] |
Supports iteration of per vertex colours of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshBase.
override uint Tes::Shapes::SimpleMesh::IndexCount | ( | int | stream = 0 | ) | [inline, virtual] |
Exposes the number of indices in the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshBase.
override int [] Tes::Shapes::SimpleMesh::Indices4 | ( | int | stream = 0 | ) | [inline, virtual] |
Supports iteration of the indices of the mesh when using four byte indices.
stream | For future use. Must be zero. |
Reimplemented from Tes::Shapes::MeshBase.
override Vector3 [] Tes::Shapes::SimpleMesh::Normals | ( | int | stream = 0 | ) | [inline, virtual] |
Supports iteration of the normal of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshBase.
void Tes::Shapes::SimpleMesh::SetColour | ( | int | at, |
uint | colour | ||
) | [inline] |
Set a vertex colour.
at | The vertex index. |
colour | The colour value. |
void Tes::Shapes::SimpleMesh::SetIndex | ( | int | at, |
int | index | ||
) | [inline] |
Sets an index value.
at | The index's position in the index array. |
index | The index value (referencing a valid vertex). |
void Tes::Shapes::SimpleMesh::SetNormal | ( | int | at, |
Vector3 | normal | ||
) | [inline] |
Set a vertex normal.
at | The vertex index. |
normal | The normal value. |
void Tes::Shapes::SimpleMesh::SetUV | ( | int | at, |
Vector2 | uv | ||
) | [inline] |
Set a vertex UV coordinate.
at | The vertex index. |
uv | The UV coordinate. |
void Tes::Shapes::SimpleMesh::SetVertex | ( | int | at, |
Vector3 | v | ||
) | [inline] |
Sets the vertex at the given index.
at | Vertex index. |
v | The vertex value. |
override Vector2 [] Tes::Shapes::SimpleMesh::UVs | ( | int | stream = 0 | ) | [inline, virtual] |
Supports iteration of the UV coordinates of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshBase.
override uint Tes::Shapes::SimpleMesh::VertexCount | ( | int | stream = 0 | ) | [inline, virtual] |
Exposes the number of vertices in the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshBase.
override Vector3 [] Tes::Shapes::SimpleMesh::Vertices | ( | int | stream = 0 | ) | [inline, virtual] |
Supports iteration of the vertices of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshBase.
override int Tes::Shapes::SimpleMesh::IndexSize [get] |