The U4DTetrahedron class implements a geometrical representation of a Tetrahedron.
More...
|
| U4DTetrahedron () |
| Constructor which creates a tetrahedron with all vertices-components set to zero.
|
|
| U4DTetrahedron (U4DPoint3n &uPointA, U4DPoint3n &uPointB, U4DPoint3n &uPointC, U4DPoint3n &uPointD) |
| Constructor which creates a tetrahedron with the given 3D vertex points.
|
|
| ~U4DTetrahedron () |
| Destructor for the class.
|
|
| U4DTetrahedron (const U4DTetrahedron &a) |
| Copy constructor for the class.
|
|
U4DTetrahedron & | operator= (const U4DTetrahedron &a) |
| Copy constructor for the class. More...
|
|
bool | pointOutsideOfPlane (U4DPoint3n &p, U4DPoint3n &a, U4DPoint3n &b, U4DPoint3n &c) |
| Method to test if 3D point p lies outside the plane through abc. The tetrahedron should have a CCW winding. More...
|
|
bool | pointOutsideOfPlane (U4DPoint3n &p, U4DPoint3n &a, U4DPoint3n &b, U4DPoint3n &c, U4DPoint3n &d) |
| Method to test if 3D point p and d lies outside the plane through abc. The tetrahedron should have a CCW winding. If the winding is not known, then use this method to test if a point lies outside the plane. More...
|
|
U4DPoint3n | closestPointOnTetrahedronToPoint (U4DPoint3n &uPoint) |
| Method which computes the closest 3D point to the tetrahedron from the given 3D point. More...
|
|
U4DTriangle | closestTriangleOnTetrahedronToPoint (U4DPoint3n &uPoint) |
| Method which computes the closest tetrahedron face to the given 3D point. More...
|
|
bool | isPointInTetrahedron (U4DPoint3n &uPoint) |
| Method which determines if a 3D point lies on the tetrahedron. More...
|
|
void | getBarycentricCoordinatesOfPoint (U4DPoint3n &uPoint, float &baryCoordinateU, float &baryCoordinateV, float &baryCoordinateW, float &baryCoordinateX) |
| Method which computes the barycentric coordinates of the 3D point in the tetrahedron. More...
|
|
std::vector< U4DTriangle > | getTriangles () |
| Method which returns the face triangles composing the tetrahedron. More...
|
|
void | show () |
| Method which prints the vertices of the tetrahedron to the console log window.
|
|
bool | isValid () |
| Method which determines if the Tetrahedron has a valid construction. More...
|
|
The U4DTetrahedron class implements a geometrical representation of a Tetrahedron.
◆ closestPointOnTetrahedronToPoint()
Method which computes the closest 3D point to the tetrahedron from the given 3D point.
- Parameters
-
uPoint | 3D point to compute closest 3D point to tetrahedron |
- Returns
- Returns the closest 3D point to the tetrahedron
◆ closestTriangleOnTetrahedronToPoint()
Method which computes the closest tetrahedron face to the given 3D point.
- Parameters
-
uPoint | 3D point to compute closest face to tetrahedron |
- Returns
- Returns the closest tetrahedron face to the 3D point
◆ getBarycentricCoordinatesOfPoint()
void U4DEngine::U4DTetrahedron::getBarycentricCoordinatesOfPoint |
( |
U4DPoint3n & |
uPoint, |
|
|
float & |
baryCoordinateU, |
|
|
float & |
baryCoordinateV, |
|
|
float & |
baryCoordinateW, |
|
|
float & |
baryCoordinateX |
|
) |
| |
Method which computes the barycentric coordinates of the 3D point in the tetrahedron.
- Parameters
-
uPoint | 3D point to compute barycentric coordinates from |
baryCoordinateU | u-component of the barycentric coordinates of the 3D point |
baryCoordinateV | v-component of the barycentric coordinates of the 3D point |
baryCoordinateW | w-component of the barycentric coordinates of the 3D point |
baryCoordinateX | x-component of the barycentric coordinates of the 3D point |
◆ getTriangles()
std::vector< U4DTriangle > U4DEngine::U4DTetrahedron::getTriangles |
( |
| ) |
|
Method which returns the face triangles composing the tetrahedron.
- Returns
- Returns the faces of the tetrahedron
◆ isPointInTetrahedron()
bool U4DEngine::U4DTetrahedron::isPointInTetrahedron |
( |
U4DPoint3n & |
uPoint | ) |
|
Method which determines if a 3D point lies on the tetrahedron.
- Parameters
-
- Returns
- Returns true if the 3D point lies on or in the tetrahedron
◆ isValid()
bool U4DEngine::U4DTetrahedron::isValid |
( |
| ) |
|
Method which determines if the Tetrahedron has a valid construction.
- Returns
- Returns true if the tetrahedron is valid
◆ operator=()
Copy constructor for the class.
- Parameters
-
a | 3D tetrahedron to copy to |
- Returns
- Returns a copy of the tetrahedron
◆ pointOutsideOfPlane() [1/2]
Method to test if 3D point p lies outside the plane through abc. The tetrahedron should have a CCW winding.
- Parameters
-
U4DPoint3n&p | 3D point to test |
a | 3D point composing face |
b | 3D point composing face |
c | 3D point composing face |
- Returns
- Returns true if 3D point lies outside the plane through abc
◆ pointOutsideOfPlane() [2/2]
Method to test if 3D point p and d lies outside the plane through abc. The tetrahedron should have a CCW winding. If the winding is not known, then use this method to test if a point lies outside the plane.
- Parameters
-
U4DPoint3n&p | 3D point to test |
a | 3D point composing face |
b | 3D point composing face |
c | 3D point composing face |
d | 3D point to test |
- Returns
- Returns true if 3D point p and d lies outside the plane through abc