VolumeElement represents a tetrahedral element in a VolumeMesh.
It is a topological entity in the sense that it only knows the indices of its vertices but not their coordinates.
#include <drake/geometry/proximity/volume_mesh.h>
Public Member Functions | |
| VolumeElement (int v0, int v1, int v2, int v3) | |
| Constructs VolumeElement. More... | |
| VolumeElement (const int v[4]) | |
| Constructs VolumeElement. More... | |
| int | num_vertices () const |
| Returns the number of vertices in this element. More... | |
| int | vertex (int i) const |
| Returns the vertex index in VolumeMesh of the i-th vertex of this element. More... | |
| bool | Equal (const VolumeElement &e) const |
| Checks to see whether the given VolumeElement use the same four indices in the same order. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable | |
| VolumeElement (const VolumeElement &)=default | |
| VolumeElement & | operator= (const VolumeElement &)=default |
| VolumeElement (VolumeElement &&)=default | |
| VolumeElement & | operator= (VolumeElement &&)=default |
|
default |
|
default |
| VolumeElement | ( | int | v0, |
| int | v1, | ||
| int | v2, | ||
| int | v3 | ||
| ) |
Constructs VolumeElement.
We follow the convention that the first three vertices define a triangle with its right-handed normal pointing inwards. The fourth vertex is then on the positive side of this first triangle.
| v0 | Index of the first vertex in VolumeMesh. |
| v1 | Index of the second vertex in VolumeMesh. |
| v2 | Index of the third vertex in VolumeMesh. |
| v3 | Index of the last vertex in VolumeMesh. |
|
explicit |
Constructs VolumeElement.
| v | Array of four integer indices of the vertices of the element in VolumeMesh. |
| bool Equal | ( | const VolumeElement & | e | ) | const |
Checks to see whether the given VolumeElement use the same four indices in the same order.
We check for equality to the last bit consistently with VolumeMesh::Equal(). Two permutations of the four vertex indices of a tetrahedron are considered different tetrahedra even though they span the same space.
| int num_vertices | ( | ) | const |
Returns the number of vertices in this element.
|
default |
|
default |
Returns the vertex index in VolumeMesh of the i-th vertex of this element.
| i | The local index of the vertex in this element. |