java.lang.Object
physx.NativeObject
physx.common.PxPlane
Representation of a plane.
Plane equation used: n.dot(v) + d = 0
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PxPlanearrayGet(long baseAddress, int index) booleanstatic PxPlanecreateAt(long address) static PxPlanecreateAt(long address, float nx, float ny, float nz, float distance) static PxPlanestatic PxPlanestatic PxPlanestatic <T> PxPlanecreateAt(T allocator, NativeObject.Allocator<T> allocate) static <T> PxPlanecreateAt(T allocator, NativeObject.Allocator<T> allocate, float nx, float ny, float nz, float distance) static <T> PxPlanecreateAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 normal, float distance) static <T> PxPlanecreateAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 point, PxVec3 normal) static <T> PxPlanecreateAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 p0, PxVec3 p1, PxVec3 p2) voiddestroy()floatfloatgetD()The distance from the origingetN()The normal to the planeinverseTransform(PxTransform pose) inverse-transform planevoidequivalent plane with unit normalfind an arbitrary point in the planeprojects p into the planevoidsetD(float value) The distance from the originvoidThe normal to the planetransform(PxTransform pose) transform planestatic PxPlanewrapPointer(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
-
PxPlane
protected PxPlane(long address) -
PxPlane
public PxPlane()Constructor -
PxPlane
public PxPlane(float nx, float ny, float nz, float distance) Constructor from a normal and a distance -
PxPlane
Constructor from a normal and a distance -
PxPlane
Constructor from three points -
PxPlane
Constructor from a normal and a distance
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxPlane
-
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 PxPlane
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.nx- WebIDL type: floatny- WebIDL type: floatnz- WebIDL type: floatdistance- WebIDL type: float- Returns:
- Stack allocated object of PxPlane
-
createAt
public static <T> PxPlane createAt(T allocator, NativeObject.Allocator<T> allocate, float nx, float ny, float nz, float distance) - 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.nx- WebIDL type: floatny- WebIDL type: floatnz- WebIDL type: floatdistance- WebIDL type: float- Returns:
- Stack allocated object of PxPlane
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.normal- WebIDL type:PxVec3[Const, Ref]distance- WebIDL type: float- Returns:
- Stack allocated object of PxPlane
-
createAt
public static <T> PxPlane createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 normal, float distance) - 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.normal- WebIDL type:PxVec3[Const, Ref]distance- WebIDL type: float- Returns:
- Stack allocated object of PxPlane
-
createAt
-
createAt
public static <T> PxPlane createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 p0, PxVec3 p1, PxVec3 p2) - 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.p0- WebIDL type:PxVec3[Const, Ref]p1- WebIDL type:PxVec3[Const, Ref]p2- WebIDL type:PxVec3[Const, Ref]- Returns:
- Stack allocated object of PxPlane
-
createAt
-
createAt
public static <T> PxPlane createAt(T allocator, NativeObject.Allocator<T> allocate, PxVec3 point, PxVec3 normal) - 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.point- WebIDL type:PxVec3[Const, Ref]normal- WebIDL type:PxVec3[Const, Ref]- Returns:
- Stack allocated object of PxPlane
-
destroy
public void destroy() -
getN
The normal to the plane -
setN
The normal to the plane -
getD
public float getD()The distance from the origin -
setD
public void setD(float value) The distance from the origin -
distance
- Parameters:
p- WebIDL type:PxVec3[Const, Ref]- Returns:
- WebIDL type: float
-
contains
- Parameters:
p- WebIDL type:PxVec3[Const, Ref]- Returns:
- WebIDL type: boolean
-
project
projects p into the plane -
pointInPlane
find an arbitrary point in the plane -
normalize
public void normalize()equivalent plane with unit normal -
transform
transform plane -
inverseTransform
inverse-transform plane
-