java.lang.Object
physx.NativeObject
physx.geometry.PxGeometry
physx.geometry.PxConvexMeshGeometry
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.
-
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
ConstructorsModifierConstructorDescriptionprotectedprotectedPxConvexMeshGeometry(long address) Constructor.PxConvexMeshGeometry(PxConvexMesh mesh, PxMeshScale scaling) Constructor.PxConvexMeshGeometry(PxConvexMesh mesh, PxMeshScale scaling, PxConvexMeshGeometryFlags flags) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic PxConvexMeshGeometryarrayGet(long baseAddress, int index) static PxConvexMeshGeometrycreateAt(long address, PxConvexMesh mesh) static PxConvexMeshGeometrycreateAt(long address, PxConvexMesh mesh, PxMeshScale scaling) static PxConvexMeshGeometrycreateAt(long address, PxConvexMesh mesh, PxMeshScale scaling, PxConvexMeshGeometryFlags flags) static <T> PxConvexMeshGeometrycreateAt(T allocator, NativeObject.Allocator<T> allocate, PxConvexMesh mesh) static <T> PxConvexMeshGeometrycreateAt(T allocator, NativeObject.Allocator<T> allocate, PxConvexMesh mesh, PxMeshScale scaling) static <T> PxConvexMeshGeometrycreateAt(T allocator, NativeObject.Allocator<T> allocate, PxConvexMesh mesh, PxMeshScale scaling, PxConvexMeshGeometryFlags flags) voiddestroy()static PxConvexMeshGeometrywrapPointer(long address) Methods inherited from class physx.geometry.PxGeometry
getTypeMethods 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
-
PxConvexMeshGeometry
protected PxConvexMeshGeometry() -
PxConvexMeshGeometry
protected PxConvexMeshGeometry(long address) -
PxConvexMeshGeometry
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
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
-
arrayGet
-
createAt
- 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
- Parameters:
address- Pre-allocated memory, where the object is created.mesh- WebIDL type:PxConvexMeshscaling- 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:PxConvexMeshscaling- 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:PxConvexMeshscaling- 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:PxConvexMeshscaling- WebIDL type:PxMeshScale[Const, Ref]flags- WebIDL type:PxConvexMeshGeometryFlags[Ref]- Returns:
- Stack allocated object of PxConvexMeshGeometry
-
destroy
public void destroy()- Overrides:
destroyin classPxGeometry
-