The scaling is along arbitrary axes that are specified by PxMeshScale::rotation. Specifically, PxMeshScale::rotation describes the rotation from the scaling-axes frame to the mesh-local frame, i.e. PxMeshScale::rotation.rotate(v) transforms the coordinates of vertex v from the mesh-local frame to the scaling-axes frame.
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. Note: 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T> -
Field Summary
FieldsFields inherited from class physx.NativeObject
address, isExternallyAllocated, SIZEOF_BYTE, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_POINTER, SIZEOF_SHORT -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructor initializes to identity scale.PxMeshScale(float r) Constructor from scalar.protectedPxMeshScale(long address) PxMeshScale(PxVec3 s, PxQuat r) Constructor to initialize to arbitrary scaling. -
Method Summary
Modifier and TypeMethodDescriptionstatic PxMeshScalearrayGet(long baseAddress, int index) static PxMeshScalecreateAt(long address) static PxMeshScalecreateAt(long address, float r) static PxMeshScalestatic <T> PxMeshScalecreateAt(T allocator, NativeObject.Allocator<T> allocate) static <T> PxMeshScalecreateAt(T allocator, NativeObject.Allocator<T> allocate, float r) static <T> PxMeshScalecreateAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 s, PxQuat r) voiddestroy()static PxMeshScalewrapPointer(long address) Methods inherited from class physx.NativeObject
checkNotNull, equals, getAddress, hashCode
-
Field Details
-
SIZEOF
public static final int SIZEOF -
ALIGNOF
public static final int ALIGNOF- See Also:
-
-
Constructor Details
-
PxMeshScale
protected PxMeshScale(long address) -
PxMeshScale
public PxMeshScale()Constructor initializes to identity scale. -
PxMeshScale
public PxMeshScale(float r) Constructor from scalar. -
PxMeshScale
Constructor to initialize to arbitrary scaling.
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxMeshScale
-
createAt
- Type Parameters:
T- Allocator class, e.g. LWJGL's MemoryStack.- Parameters:
allocator- Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.allocate- Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.- Returns:
- Stack allocated object of PxMeshScale
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.r- WebIDL type: float- Returns:
- Stack allocated object of PxMeshScale
-
createAt
- Type Parameters:
T- Allocator class, e.g. LWJGL's MemoryStack.- Parameters:
allocator- Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.allocate- Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.r- WebIDL type: float- Returns:
- Stack allocated object of PxMeshScale
-
createAt
-
createAt
public static <T> PxMeshScale createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 s, PxQuat r) - Type Parameters:
T- Allocator class, e.g. LWJGL's MemoryStack.- Parameters:
allocator- Object to use for allocation, e.g. an instance of LWJGL's MemoryStack.allocate- Method to call on allocator to obtain the target address, e.g. MemoryStack::nmalloc.s- WebIDL type:PxVec3[Const, Ref]r- WebIDL type:PxQuat[Const, Ref]- Returns:
- Stack allocated object of PxMeshScale
-
destroy
public void destroy()
-