Nv::Blast::TriangleProcessor Class Reference
#include <NvBlastExtTriangleProcessor.h>
List of all members.
|
Public Member Functions |
| void | buildConvexHull (std::vector< PxVec3 > &points, std::vector< PxVec3 > &convexHull, const PxVec3 &normal) |
| uint32_t | getSegmentIntersection (const PxVec2 &s1, const PxVec2 &e1, const PxVec2 &s2, const PxVec2 &e2, PxF32 &t1) |
| uint32_t | getTriangleIntersection (TrPrcTriangle &a, TrPrcTriangle2d &aProjected, TrPrcTriangle &b, PxVec3 ¢roid, std::vector< PxVec3 > &intersectionBuffer, PxVec3 normal) |
| uint32_t | isPointInside (const PxVec2 &point, const TrPrcTriangle2d &triangle) |
| void | sortToCCW (std::vector< PxVec3 > &points, PxVec3 &normal) |
| bool | triangleBoundingBoxIntersection (TrPrcTriangle2d &a, TrPrcTriangle2d &b) |
| | TriangleProcessor () |
| | ~TriangleProcessor () |
Constructor & Destructor Documentation
| Nv::Blast::TriangleProcessor::TriangleProcessor |
( |
|
) |
[inline] |
| Nv::Blast::TriangleProcessor::~TriangleProcessor |
( |
|
) |
[inline] |
Member Function Documentation
| void Nv::Blast::TriangleProcessor::buildConvexHull |
( |
std::vector< PxVec3 > & |
points, |
|
|
std::vector< PxVec3 > & |
convexHull, |
|
|
const PxVec3 & |
normal | |
|
) |
| | |
Builds convex polygon for given set of points. Points should be coplanar.
- Parameters:
-
| [in] | points | Input array of points |
| [out] | convexHull | Output polygon |
| [in] | normal | Normal vector to polygon. |
| uint32_t Nv::Blast::TriangleProcessor::getSegmentIntersection |
( |
const PxVec2 & |
s1, |
|
|
const PxVec2 & |
e1, |
|
|
const PxVec2 & |
s2, |
|
|
const PxVec2 & |
e2, |
|
|
PxF32 & |
t1 | |
|
) |
| | |
Segment intersection point
- Parameters:
-
| [in] | s1 | Segment-1 start point |
| [in] | e1 | Segment-1 end point |
| [in] | s2 | Segment-2 start point |
| [in] | e2 | Segment-2 end point |
| [out] | t1 | Intersection point parameter relatively to Segment-1, lies in [0.0, 1.0] range. |
- Returns:
- 0 if there is no intersections, 1 - if intersection is found.
| uint32_t Nv::Blast::TriangleProcessor::getTriangleIntersection |
( |
TrPrcTriangle & |
a, |
|
|
TrPrcTriangle2d & |
aProjected, |
|
|
TrPrcTriangle & |
b, |
|
|
PxVec3 & |
centroid, |
|
|
std::vector< PxVec3 > & |
intersectionBuffer, |
|
|
PxVec3 |
normal | |
|
) |
| | |
Build intersection between two triangles
- Parameters:
-
| [in] | a | First triangle (A) |
| [in] | aProjected | Projected triangle A |
| [in] | b | Second triangle (B) |
| [in] | centroid | Centroid of first triangle (A) |
| [out] | intersectionBuffer | Result intersection polygon |
| [in] | normal | Normal vector to triangle (Common for both A and B). |
- Returns:
- 1 - if if intersection is found.
| uint32_t Nv::Blast::TriangleProcessor::isPointInside |
( |
const PxVec2 & |
point, |
|
|
const TrPrcTriangle2d & |
triangle | |
|
) |
| | |
Test whether point is inside of triangle.
- Parameters:
-
| [in] | point | Point coordinates in 2d space. |
| [in] | triangle | Triangle in 2d space. |
- Returns:
- 1 - if inside, 2 if on edge, 0 if neither inside nor edge.
| void Nv::Blast::TriangleProcessor::sortToCCW |
( |
std::vector< PxVec3 > & |
points, |
|
|
PxVec3 & |
normal | |
|
) |
| | |
Sort vertices of polygon in CCW-order
Test whether BB of triangles intersect.
- Parameters:
-
| [in] | a | First triangle (A) |
| [in] | b | Second triangle (B) |
- Returns:
- true - if intersect
The documentation for this class was generated from the following file: