PxMeshScale Class Reference

A class expressing a nonuniform scaling transformation. More...

#include <PxMeshScale.h>

Collaboration diagram for PxMeshScale:

Public Member Functions

PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale ()
 Constructor initializes to identity scale. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale (PxReal r)
 Constructor from scalar. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale (const PxVec3 &s)
 Constructor to initialize to arbitrary scale and identity scale rotation. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale (const PxVec3 &s, const PxQuat &r)
 Constructor to initialize to arbitrary scaling. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE bool isIdentity () const
 Returns true if the scaling is an identity transformation. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale getInverse () const
 Returns the inverse of this scaling transformation. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE PxMat33 toMat33 () const
 Converts this transformation to a 3x3 matrix representation. More...
 
PX_CUDA_CALLABLE PX_FORCE_INLINE bool hasNegativeDeterminant () const
 Returns true if combination of negative scale components will cause the triangle normal to flip. The SDK will flip the normals internally. More...
 
PxVec3 transform (const PxVec3 &v) const
 
bool isValidForTriangleMesh () const
 
bool isValidForConvexMesh () const
 

Public Attributes

PxVec3 scale
 A nonuniform scaling. More...
 
PxQuat rotation
 The orientation of the scaling axes. More...
 

Detailed Description

A class expressing a nonuniform scaling transformation.

The scaling is along arbitrary axes that are specified by PxMeshScale::rotation.

Note
Negative scale values are supported for PxTriangleMeshGeometry with absolute values for each component within [PX_MIN_ABS_MESH_SCALE, PX_MAX_ABS_MESH_SCALE] range. Negative scale causes a reflection around the specified axis, in addition PhysX will flip the normals for mesh triangles when scale.x*scale.y*scale.z < 0.
Only positive scale values are supported for PxConvexMeshGeometry with values for each component within [PX_MIN_ABS_MESH_SCALE, PX_MAX_ABS_MESH_SCALE] range).
See also
PxConvexMeshGeometry PxTriangleMeshGeometry

Constructor & Destructor Documentation

◆ PxMeshScale() [1/4]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale::PxMeshScale ( )
inline

Constructor initializes to identity scale.

◆ PxMeshScale() [2/4]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale::PxMeshScale ( PxReal  r)
inlineexplicit

Constructor from scalar.

◆ PxMeshScale() [3/4]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale::PxMeshScale ( const PxVec3 s)
inline

Constructor to initialize to arbitrary scale and identity scale rotation.

References PxIdentity.

◆ PxMeshScale() [4/4]

PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale::PxMeshScale ( const PxVec3 s,
const PxQuat r 
)
inline

Constructor to initialize to arbitrary scaling.

References PxQuat::isUnit(), and PX_ASSERT.

Member Function Documentation

◆ getInverse()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxMeshScale PxMeshScale::getInverse ( ) const
inline

Returns the inverse of this scaling transformation.

◆ hasNegativeDeterminant()

PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxMeshScale::hasNegativeDeterminant ( ) const
inline

Returns true if combination of negative scale components will cause the triangle normal to flip. The SDK will flip the normals internally.

◆ isIdentity()

PX_CUDA_CALLABLE PX_FORCE_INLINE bool PxMeshScale::isIdentity ( ) const
inline

Returns true if the scaling is an identity transformation.

◆ isValidForConvexMesh()

bool PxMeshScale::isValidForConvexMesh ( ) const
inline

◆ isValidForTriangleMesh()

bool PxMeshScale::isValidForTriangleMesh ( ) const
inline

◆ toMat33()

PX_CUDA_CALLABLE PX_FORCE_INLINE PxMat33 PxMeshScale::toMat33 ( ) const
inline

Converts this transformation to a 3x3 matrix representation.

References PxMat33::column0, PxMat33::column1, PxMat33::column2, and PxMat33::getTranspose().

◆ transform()

PxVec3 PxMeshScale::transform ( const PxVec3 v) const
inline

Member Data Documentation

◆ rotation

PxQuat PxMeshScale::rotation

The orientation of the scaling axes.

Referenced by PxMassProperties::PxMassProperties().

◆ scale

PxVec3 PxMeshScale::scale

A nonuniform scaling.

Referenced by PxMassProperties::PxMassProperties().


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