AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Represents a tetrahedral geometric shape defined by four points. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.5.0/src/axom/primal/geometry/Tetrahedron.hpp>
Public Types | |
enum | { NUM_TET_VERTS = 4 } |
typedef Point< T, NDIMS > | PointType |
typedef Vector< T, NDIMS > | VectorType |
Public Member Functions | |
Tetrahedron () | |
Default constructor. Creates a degenerate tetrahedron. More... | |
Tetrahedron (const PointType &A, const PointType &B, const PointType &C, const PointType &D) | |
Custom Constructor. Creates a tetrahedron from the 4 points A,B,C,D. More... | |
~Tetrahedron () | |
Destructor. More... | |
PointType & | operator[] (int idx) |
Index operator to get the i^th vertex. More... | |
const PointType & | operator[] (int idx) const |
Index operator to get the i^th vertex. More... | |
bool | degenerate (double eps=1.0e-12) const |
Returns whether the tetrahedron is degenerate. More... | |
Point< double, 4 > | physToBarycentric (const PointType &p) const |
Returns the barycentric coordinates of a point within a tetrahedron. More... | |
std::ostream & | print (std::ostream &os) const |
Simple formatted print of a tetrahedron instance. More... | |
double | signedVolume () const |
Returns the signed volume of the tetrahedron. More... | |
double | volume () const |
Returns the signed volume of the tetrahedron. More... | |
Represents a tetrahedral geometric shape defined by four points.
T | the coordinate type, e.g., double, float, etc. |
NDIMS | the number of spatial dimensions |
typedef Point<T, NDIMS> axom::primal::Tetrahedron< T, NDIMS >::PointType |
typedef Vector<T, NDIMS> axom::primal::Tetrahedron< T, NDIMS >::VectorType |
|
inline |
Default constructor. Creates a degenerate tetrahedron.
|
inline |
Custom Constructor. Creates a tetrahedron from the 4 points A,B,C,D.
[in] | A | point instance corresponding to vertex A of the tetrahedron. |
[in] | B | point instance corresponding to vertex B of the tetrahedron. |
[in] | C | point instance corresponding to vertex C of the tetrahedron. |
[in] | D | point instance corresponding to vertex D of the tetrahedron. |
|
inline |
Destructor.
|
inline |
Index operator to get the i^th vertex.
idx | The index of the desired vertex |
References axom::primal::Tetrahedron< T, NDIMS >::NUM_TET_VERTS, and SLIC_ASSERT.
|
inline |
Index operator to get the i^th vertex.
idx | The index of the desired vertex |
References axom::primal::Tetrahedron< T, NDIMS >::NUM_TET_VERTS, and SLIC_ASSERT.
|
inline |
Returns whether the tetrahedron is degenerate.
References axom::utilities::isNearlyEqual().
|
inline |
Returns the barycentric coordinates of a point within a tetrahedron.
References axom::numerics::determinant(), axom::utilities::isNearlyEqual(), and SLIC_CHECK_MSG.
|
inline |
Simple formatted print of a tetrahedron instance.
os | The output stream to write to |
|
inline |
Returns the signed volume of the tetrahedron.
Referenced by axom::primal::Tetrahedron< T, NDIMS >::volume().
|
inline |
Returns the signed volume of the tetrahedron.
References axom::utilities::abs(), and axom::primal::Tetrahedron< T, NDIMS >::signedVolume().