PxTriangle

Defined in include/geometry/PxTriangle.h

class PxTriangle

Triangle class.

Subclassed by PxTrianglePadded

Public Functions

inline PxTriangle()

Constructor.

inline PxTriangle(const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)

Constructor.

Parameters
  • p0[in] Point 0

  • p1[in] Point 1

  • p2[in] Point 2

inline PxTriangle(const PxTriangle &triangle)

Copy constructor.

Parameters

triangle[in] Tri to copy

inline ~PxTriangle()

Destructor.

inline void operator=(const PxTriangle &triangle)

Assignment operator.

inline void normal(PxVec3 &_normal) const

Compute the normal of the Triangle.

Parameters

_normal[out] Triangle normal.

inline void denormalizedNormal(PxVec3 &_normal) const

Compute the unnormalized normal of the triangle.

Parameters

_normal[out] Triangle normal (not normalized).

inline PxReal area() const

Compute the area of the triangle.

Returns

Area of the triangle.

inline PxVec3 pointFromUV(PxReal u, PxReal v) const
Returns

Computes a point on the triangle from u and v barycentric coordinates.

Public Members

PxVec3 verts[3]

Array of Vertices.