Package physx.common
Class PxVec3
- java.lang.Object
-
- physx.NativeObject
-
- physx.common.PxVec3
-
public class PxVec3 extends NativeObject
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class physx.NativeObject
NativeObject.Allocator<T>
-
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFstatic intSIZEOF-
Fields inherited from class physx.NativeObject
address, isStackAllocated
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()floatgetX()floatgetY()floatgetZ()static PxVec3malloc(long address)static PxVec3malloc(long address, float x, float y, float z)static <T> PxVec3malloc(T allocator, NativeObject.Allocator<T> allocate)static <T> PxVec3malloc(T allocator, NativeObject.Allocator<T> allocate, float x, float y, float z)voidsetX(float value)voidsetY(float value)voidsetZ(float value)static PxVec3wrapPointer(long address)-
Methods inherited from class physx.NativeObject
getAddress
-
-
-
-
Field Detail
-
SIZEOF
public static final int SIZEOF
-
ALIGNOF
public static final int ALIGNOF
- See Also:
- Constant Field Values
-
-
Method Detail
-
wrapPointer
public static PxVec3 wrapPointer(long address)
-
malloc
public static PxVec3 malloc(long address)
- Parameters:
address- where the object is allocated- Returns:
- Stack allocated object of PxVec3
-
malloc
public static <T> PxVec3 malloc(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 PxVec3
-
malloc
public static PxVec3 malloc(long address, float x, float y, float z)
- Parameters:
address- where the object is allocatedx- floaty- floatz- float- Returns:
- Stack allocated object of PxVec3
-
malloc
public static <T> PxVec3 malloc(T allocator, NativeObject.Allocator<T> allocate, float x, float y, float z)
- 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.x- floaty- floatz- float- Returns:
- Stack allocated object of PxVec3
-
destroy
public void destroy()
-
getX
public float getX()
- Returns:
- float
-
setX
public void setX(float value)
- Parameters:
value- float
-
getY
public float getY()
- Returns:
- float
-
setY
public void setY(float value)
- Parameters:
value- float
-
getZ
public float getZ()
- Returns:
- float
-
setZ
public void setZ(float value)
- Parameters:
value- float
-
-