PxTriangle Class Reference

Triangle class. More...

#include <PxTriangle.h>

Collaboration diagram for PxTriangle:

Public Member Functions

PX_FORCE_INLINE PxTriangle ()
 Constructor. More...
 
PX_FORCE_INLINE PxTriangle (const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
 Constructor. More...
 
PX_FORCE_INLINE PxTriangle (const PxTriangle &triangle)
 Copy constructor. More...
 
PX_FORCE_INLINE ~PxTriangle ()
 Destructor. More...
 
PX_FORCE_INLINE void operator= (const PxTriangle &triangle)
 Assignment operator. More...
 
PX_FORCE_INLINE void normal (PxVec3 &_normal) const
 Compute the normal of the Triangle. More...
 
PX_FORCE_INLINE void denormalizedNormal (PxVec3 &_normal) const
 Compute the unnormalized normal of the triangle. More...
 
PX_FORCE_INLINE PxReal area () const
 Compute the area of the triangle. More...
 
PxVec3 pointFromUV (PxReal u, PxReal v) const
 

Public Attributes

PxVec3 verts [3]
 Array of Vertices. More...
 

Detailed Description

Triangle class.

Constructor & Destructor Documentation

◆ PxTriangle() [1/3]

PX_FORCE_INLINE PxTriangle::PxTriangle ( )
inline

Constructor.

◆ PxTriangle() [2/3]

PX_FORCE_INLINE PxTriangle::PxTriangle ( const PxVec3 p0,
const PxVec3 p1,
const PxVec3 p2 
)
inline

Constructor.

Parameters
[in]p0Point 0
[in]p1Point 1
[in]p2Point 2

◆ PxTriangle() [3/3]

PX_FORCE_INLINE PxTriangle::PxTriangle ( const PxTriangle triangle)
inline

Copy constructor.

Parameters
[in]triangleTri to copy

References verts.

◆ ~PxTriangle()

PX_FORCE_INLINE PxTriangle::~PxTriangle ( )
inline

Destructor.

Member Function Documentation

◆ area()

PX_FORCE_INLINE PxReal PxTriangle::area ( ) const
inline

Compute the area of the triangle.

Returns
Area of the triangle.

References PxVec3::magnitude().

◆ denormalizedNormal()

PX_FORCE_INLINE void PxTriangle::denormalizedNormal ( PxVec3 _normal) const
inline

Compute the unnormalized normal of the triangle.

Parameters
[out]_normalTriangle normal (not normalized).

◆ normal()

PX_FORCE_INLINE void PxTriangle::normal ( PxVec3 _normal) const
inline

Compute the normal of the Triangle.

Parameters
[out]_normalTriangle normal.

References PxVec3::normalize().

◆ operator=()

PX_FORCE_INLINE void PxTriangle::operator= ( const PxTriangle triangle)
inline

Assignment operator.

References verts.

◆ pointFromUV()

PxVec3 PxTriangle::pointFromUV ( PxReal  u,
PxReal  v 
) const
inline
Returns
Computes a point on the triangle from u and v barycentric coordinates.

Member Data Documentation

◆ verts

PxVec3 PxTriangle::verts[3]

Array of Vertices.

Referenced by operator=(), and PxTriangle().


The documentation for this class was generated from the following file: