Triangle class.
More...
#include <Triangle.h>
|
| Triangle () |
| Constructor.
|
|
| Triangle (const AtomsMath::Vector3f &v0, const AtomsMath::Vector3f &v1, const AtomsMath::Vector3f &v2, unsigned int id=0) |
| Constructor. More...
|
|
| ~Triangle () |
| Destructor.
|
|
AtomsMath::Vector3f | midPoint () |
| Get triangle mid point.
|
|
AtomsMath::Box3f | bbox () |
| Get triangle bounding box.
|
|
AtomsMath::Vector3f | barycentric (const AtomsMath::Vector3f &point) |
| Get the barycentric coordinates of the given point.
|
|
bool | intersect (const AtomsMath::Vector3f &orig, const AtomsMath::Vector3f &dir, float &t, float &u, float &v) |
| Ray/triangle intersector. More...
|
|
bool | intersect (const AtomsMath::Box3f &bbox) |
| Triange/BBox intersector. More...
|
|
AtomsMath::Vector3f | closestPoint (const AtomsMath::Vector3f &inP, float &outU, float &outV, float &sqrDistance) |
| ! Closest point
|
|
|
AtomsMath::Box3f | boundingbox |
| Triangle bounding box.
|
|
AtomsMath::Vector3f | p0 |
| Vertex 0.
|
|
AtomsMath::Vector3f | p1 |
| Vertex 1.
|
|
AtomsMath::Vector3f | p2 |
| Vertex 2.
|
|
unsigned int | id |
| Triangle id.
|
|
◆ Triangle()
AtomsUtils::Triangle::Triangle |
( |
const AtomsMath::Vector3f & |
v0, |
|
|
const AtomsMath::Vector3f & |
v1, |
|
|
const AtomsMath::Vector3f & |
v2, |
|
|
unsigned int |
id = 0 |
|
) |
| |
Constructor.
- Parameters
-
v0 | Vertex 0 |
v1 | Vertex 1 |
v2 | Vertex 2 |
id | Triangle id |
◆ intersect() [1/2]
bool AtomsUtils::Triangle::intersect |
( |
const AtomsMath::Box3f & |
bbox | ) |
|
Triange/BBox intersector.
- Parameters
-
- Returns
- True if there is a intersection
◆ intersect() [2/2]
bool AtomsUtils::Triangle::intersect |
( |
const AtomsMath::Vector3f & |
orig, |
|
|
const AtomsMath::Vector3f & |
dir, |
|
|
float & |
t, |
|
|
float & |
u, |
|
|
float & |
v |
|
) |
| |
Ray/triangle intersector.
- Parameters
-
orig | Ray origin |
dir | Ray direction |
t | Parametric coord of the interseciton point |
u | Baricentric u coord of the intersection point |
v | Baricentric v coord of the intersection point \ return True if there is an intersection |
The documentation for this class was generated from the following file:
- C:/projects/AtomsVFX/Atoms/Public/AtomsUtils/Triangle.h