class MAGES::MeshDeformations::TetrahedralMesh

Overview

A mesh containing tetrahedra. More…

class TetrahedralMesh: public ScriptableObject
{
public:
    // properties

    int VertexCount;
    float3[] Vertices;
    int[] Tetrahedra;
    int[] Neighbors;
    int SubMeshCount;

    // methods

    void Clear();
    void SetVertices(float3[] vertices);
    void SetTetrahedra(int[] tetrahedra, bool recalculateNeighbors = true);
    void SetSubMesh(int submeshIndex, TetrahedralSubMeshDescriptor desc);
    TetrahedralSubMeshDescriptor GetSubMesh(int index);
    void RecalculateNeighbors();
};

Detailed Documentation

A mesh containing tetrahedra.

Properties

int VertexCount

Gets the vertex count.

float3[] Vertices

Gets the vertices.

int[] Tetrahedra

Gets the tetrahedra.

int[] Neighbors

Gets the tetrahedra neighbors.

int SubMeshCount

Gets or sets the SubMesh count.

Methods

void Clear()

Clears the mesh.

void SetVertices(float3[] vertices)

Sets the mesh vertices.

Parameters:

vertices

The vertices.

void SetTetrahedra(int[] tetrahedra, bool recalculateNeighbors = true)

Sets the tetrahedra of the mesh.

Parameters:

tetrahedra

The tetrahedra.

recalculateNeighbors

Whether or not to recalculate neighbors.

void SetSubMesh(int submeshIndex, TetrahedralSubMeshDescriptor desc)

Sets a sub mesh.

Parameters:

submeshIndex

The sub mesh index.

desc

The sub mesh descriptor.

TetrahedralSubMeshDescriptor GetSubMesh(int index)

Gets the submesh with the given index.

Parameters:

index

The submesh index.

Returns:

The submesh with the given index.

void RecalculateNeighbors()

Recalculates tetrahedron neighbors.