31 #ifndef PX_PHYSICS_GEOMUTILS_PX_TRIANGLE 32 #define PX_PHYSICS_GEOMUTILS_PX_TRIANGLE 77 verts[0] = triangle.
verts[0];
78 verts[1] = triangle.
verts[1];
79 verts[2] = triangle.
verts[2];
92 verts[0] = triangle.
verts[0];
93 verts[1] = triangle.
verts[1];
94 verts[2] = triangle.
verts[2];
104 _normal = (verts[1]-verts[0]).cross(verts[2]-verts[0]);
115 _normal = (verts[1]-verts[0]).cross(verts[2]-verts[0]);
125 const PxVec3& p0 = verts[0];
126 const PxVec3& p1 = verts[1];
127 const PxVec3& p2 = verts[2];
128 return ((p0 - p1).cross(p0 - p2)).
magnitude() * 0.5f;
Definition: GuContactBuffer.h:37
PX_FORCE_INLINE void operator=(const PxTriangle &triangle)
Assignment operator.
Definition: PxTriangle.h:90
#define PX_FORCE_INLINE
Definition: PxPreprocessor.h:351
float PxReal
Definition: PxSimpleTypes.h:78
PX_FORCE_INLINE PxTriangle(const PxVec3 &p0, const PxVec3 &p1, const PxVec3 &p2)
Constructor.
Definition: PxTriangle.h:63
PX_FORCE_INLINE PxTriangle()
Constructor.
Definition: PxTriangle.h:54
PX_FORCE_INLINE PxTriangle(const PxTriangle &triangle)
Copy constructor.
Definition: PxTriangle.h:75
PxVec3 verts[3]
Array of Vertices.
Definition: PxTriangle.h:139
PX_FORCE_INLINE PxReal area() const
Compute the area of the triangle.
Definition: PxTriangle.h:123
PX_CUDA_CALLABLE PX_FORCE_INLINE float magnitude() const
returns the magnitude
Definition: PxVec3.h:183
PX_FORCE_INLINE ~PxTriangle()
Destructor.
Definition: PxTriangle.h:85
PX_CUDA_CALLABLE PX_FORCE_INLINE float normalize()
normalizes the vector in place
Definition: PxVec3.h:300
PX_FORCE_INLINE void denormalizedNormal(PxVec3 &_normal) const
Compute the unnormalized normal of the triangle.
Definition: PxTriangle.h:113
PxVec3 pointFromUV(PxReal u, PxReal v) const
Definition: PxTriangle.h:134
Triangle class.
Definition: PxTriangle.h:48
PX_FORCE_INLINE void normal(PxVec3 &_normal) const
Compute the normal of the Triangle.
Definition: PxTriangle.h:102
3 Element vector class.
Definition: PxVec3.h:49