Class PxMeshScale

java.lang.Object
physx.NativeObject
physx.geometry.PxMeshScale

public class PxMeshScale extends NativeObject
A class expressing a nonuniform scaling transformation.

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:
  • 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

      public PxMeshScale(PxVec3 s, PxQuat r)
      Constructor to initialize to arbitrary scaling.
  • Method Details

    • wrapPointer

      public static PxMeshScale wrapPointer(long address)
    • arrayGet

      public static PxMeshScale arrayGet(long baseAddress, int index)
    • createAt

      public static PxMeshScale createAt(long address)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      Returns:
      Stack allocated object of PxMeshScale
    • createAt

      public static <T> PxMeshScale createAt(T allocator, NativeObject.Allocator<T> allocate)
      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

      public static PxMeshScale createAt(long address, float r)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      r - WebIDL type: float
      Returns:
      Stack allocated object of PxMeshScale
    • createAt

      public static <T> PxMeshScale createAt(T allocator, NativeObject.Allocator<T> allocate, float 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.
      r - WebIDL type: float
      Returns:
      Stack allocated object of PxMeshScale
    • createAt

      public static PxMeshScale createAt(long address, PxVec3 s, PxQuat r)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      s - WebIDL type: PxVec3 [Const, Ref]
      r - WebIDL type: PxQuat [Const, Ref]
      Returns:
      Stack allocated object of PxMeshScale
    • 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()