Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
ScaleHelpers Namespace Reference

Helper functions to get properties of a scaling vector. More...

Functions

bool IsNotScaled (Vec3Arg inScale)
 Test if a scale is identity.
 
bool IsUniformScale (Vec3Arg inScale)
 Test if a scale is uniform.
 
bool IsUniformScaleXZ (Vec3Arg inScale)
 Test if a scale is uniform in XZ.
 
float ScaleConvexRadius (float inConvexRadius, Vec3Arg inScale)
 Scale the convex radius of an object.
 
bool IsInsideOut (Vec3Arg inScale)
 Test if a scale flips an object inside out (which requires flipping all normals and polygon windings)
 
bool IsZeroScale (Vec3Arg inScale)
 Test if any of the components of the scale have a value below cMinScale.
 
Vec3 MakeNonZeroScale (Vec3Arg inScale)
 Ensure that the scale for each component is at least cMinScale.
 
Vec3 MakeUniformScale (Vec3Arg inScale)
 Get the average scale if inScale, used to make the scale uniform when a shape doesn't support non-uniform scale.
 
Vec3 MakeUniformScaleXZ (Vec3Arg inScale)
 Average the scale in XZ, used to make the scale uniform when a shape doesn't support non-uniform scale in the XZ plane.
 
bool CanScaleBeRotated (QuatArg inRotation, Vec3Arg inScale)
 
Vec3 RotateScale (QuatArg inRotation, Vec3Arg inScale)
 

Detailed Description

Helper functions to get properties of a scaling vector.

Function Documentation

◆ CanScaleBeRotated()

bool ScaleHelpers::CanScaleBeRotated ( QuatArg  inRotation,
Vec3Arg  inScale 
)
inline

Checks in scale can be rotated to child shape

Parameters
inRotationRotation of child shape
inScaleScale in local space of parent shape
Returns
True if the scale is valid (no shearing introduced)

◆ IsInsideOut()

bool ScaleHelpers::IsInsideOut ( Vec3Arg  inScale)
inline

Test if a scale flips an object inside out (which requires flipping all normals and polygon windings)

◆ IsNotScaled()

bool ScaleHelpers::IsNotScaled ( Vec3Arg  inScale)
inline

Test if a scale is identity.

◆ IsUniformScale()

bool ScaleHelpers::IsUniformScale ( Vec3Arg  inScale)
inline

Test if a scale is uniform.

◆ IsUniformScaleXZ()

bool ScaleHelpers::IsUniformScaleXZ ( Vec3Arg  inScale)
inline

Test if a scale is uniform in XZ.

◆ IsZeroScale()

bool ScaleHelpers::IsZeroScale ( Vec3Arg  inScale)
inline

Test if any of the components of the scale have a value below cMinScale.

◆ MakeNonZeroScale()

Vec3 ScaleHelpers::MakeNonZeroScale ( Vec3Arg  inScale)
inline

Ensure that the scale for each component is at least cMinScale.

◆ MakeUniformScale()

Vec3 ScaleHelpers::MakeUniformScale ( Vec3Arg  inScale)
inline

Get the average scale if inScale, used to make the scale uniform when a shape doesn't support non-uniform scale.

◆ MakeUniformScaleXZ()

Vec3 ScaleHelpers::MakeUniformScaleXZ ( Vec3Arg  inScale)
inline

Average the scale in XZ, used to make the scale uniform when a shape doesn't support non-uniform scale in the XZ plane.

◆ RotateScale()

Vec3 ScaleHelpers::RotateScale ( QuatArg  inRotation,
Vec3Arg  inScale 
)
inline

Adjust scale for rotated child shape

Parameters
inRotationRotation of child shape
inScaleScale in local space of parent shape
Returns
Rotated scale

◆ ScaleConvexRadius()

float ScaleHelpers::ScaleConvexRadius ( float  inConvexRadius,
Vec3Arg  inScale 
)
inline

Scale the convex radius of an object.