Class PxConvexMeshGeometry


public class PxConvexMeshGeometry extends PxGeometry
Convex mesh geometry class.

This class unifies a convex mesh object with a scaling transform, and lets the combined object be used anywhere a PxGeometry is needed.

The scaling is a transform along arbitrary axes contained in the scale object. The vertices of the mesh in geometry (or shape) space is the PxMeshScale::toMat33() transform, multiplied by the vertex space vertices in the PxConvexMesh object.

  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxConvexMeshGeometry

      protected PxConvexMeshGeometry()
    • PxConvexMeshGeometry

      protected PxConvexMeshGeometry(long address)
    • PxConvexMeshGeometry

      public PxConvexMeshGeometry(PxConvexMesh mesh)
      Constructor. By default creates an empty object with a NULL mesh and identity scale.
      Parameters:
      mesh - Mesh pointer. May be NULL, though this will not make the object valid for shape construction. \
    • PxConvexMeshGeometry

      public PxConvexMeshGeometry(PxConvexMesh mesh, PxMeshScale scaling)
      Constructor. By default creates an empty object with a NULL mesh and identity scale.
      Parameters:
      mesh - Mesh pointer. May be NULL, though this will not make the object valid for shape construction.
      scaling - Scale factor. \
    • PxConvexMeshGeometry

      public PxConvexMeshGeometry(PxConvexMesh mesh, PxMeshScale scaling, PxConvexMeshGeometryFlags flags)
      Constructor. By default creates an empty object with a NULL mesh and identity scale.
      Parameters:
      mesh - Mesh pointer. May be NULL, though this will not make the object valid for shape construction.
      scaling - Scale factor.
      flags - Mesh flags. \
  • Method Details

    • wrapPointer

      public static PxConvexMeshGeometry wrapPointer(long address)
    • arrayGet

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

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

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

      public static PxConvexMeshGeometry createAt(long address, PxConvexMesh mesh, PxMeshScale scaling)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      mesh - WebIDL type: PxConvexMesh
      scaling - WebIDL type: PxMeshScale [Const, Ref]
      Returns:
      Stack allocated object of PxConvexMeshGeometry
    • createAt

      public static <T> PxConvexMeshGeometry createAt(T allocator, NativeObject.Allocator<T> allocate, PxConvexMesh mesh, PxMeshScale scaling)
      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.
      mesh - WebIDL type: PxConvexMesh
      scaling - WebIDL type: PxMeshScale [Const, Ref]
      Returns:
      Stack allocated object of PxConvexMeshGeometry
    • createAt

      public static PxConvexMeshGeometry createAt(long address, PxConvexMesh mesh, PxMeshScale scaling, PxConvexMeshGeometryFlags flags)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      mesh - WebIDL type: PxConvexMesh
      scaling - WebIDL type: PxMeshScale [Const, Ref]
      flags - WebIDL type: PxConvexMeshGeometryFlags [Ref]
      Returns:
      Stack allocated object of PxConvexMeshGeometry
    • createAt

      public static <T> PxConvexMeshGeometry createAt(T allocator, NativeObject.Allocator<T> allocate, PxConvexMesh mesh, PxMeshScale scaling, PxConvexMeshGeometryFlags flags)
      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.
      mesh - WebIDL type: PxConvexMesh
      scaling - WebIDL type: PxMeshScale [Const, Ref]
      flags - WebIDL type: PxConvexMeshGeometryFlags [Ref]
      Returns:
      Stack allocated object of PxConvexMeshGeometry
    • destroy

      public void destroy()
      Overrides:
      destroy in class PxGeometry
    • getScale

      public PxMeshScale getScale()
      The scaling transformation (from vertex space to shape space).
    • setScale

      public void setScale(PxMeshScale value)
      The scaling transformation (from vertex space to shape space).
    • getConvexMesh

      public PxConvexMesh getConvexMesh()
      A reference to the convex mesh object.
    • setConvexMesh

      public void setConvexMesh(PxConvexMesh value)
      A reference to the convex mesh object.
    • getMeshFlags

      public PxConvexMeshGeometryFlags getMeshFlags()
      Mesh flags.
    • setMeshFlags

      public void setMeshFlags(PxConvexMeshGeometryFlags value)
      Mesh flags.