java.lang.Object
physx.NativeObject
physx.common.PxVec3
-
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 TypeMethodDescriptionabs()static PxVec3arrayGet(long baseAddress, int index) static PxVec3createAt(long address) static PxVec3createAt(long address, float x, float y, float z) static <T> PxVec3createAt(T allocator, NativeObject.Allocator<T> allocate) static <T> PxVec3createAt(T allocator, NativeObject.Allocator<T> allocate, float x, float y, float z) voiddestroy()floatfloatgetX()floatgetY()floatgetZ()booleanisFinite()booleanbooleanisZero()floatfloatfloatfloatfloatfloatfloatvoidsetX(float value) voidsetY(float value) voidsetZ(float value) static PxVec3wrapPointer(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
-
PxVec3
protected PxVec3(long address) -
PxVec3
public PxVec3() -
PxVec3
public PxVec3(float x, float y, float z) - Parameters:
x- WebIDL type: floaty- WebIDL type: floatz- WebIDL type: float
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxVec3
-
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 PxVec3
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.x- WebIDL type: floaty- WebIDL type: floatz- WebIDL type: float- Returns:
- Stack allocated object of PxVec3
-
createAt
public static <T> PxVec3 createAt(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- WebIDL type: floaty- WebIDL type: floatz- WebIDL type: float- Returns:
- Stack allocated object of PxVec3
-
destroy
public void destroy() -
getX
public float getX()- Returns:
- WebIDL type: float
-
setX
public void setX(float value) - Parameters:
value- WebIDL type: float
-
getY
public float getY()- Returns:
- WebIDL type: float
-
setY
public void setY(float value) - Parameters:
value- WebIDL type: float
-
getZ
public float getZ()- Returns:
- WebIDL type: float
-
setZ
public void setZ(float value) - Parameters:
value- WebIDL type: float
-
isZero
public boolean isZero()- Returns:
- WebIDL type: boolean
-
isFinite
public boolean isFinite()- Returns:
- WebIDL type: boolean
-
isNormalized
public boolean isNormalized()- Returns:
- WebIDL type: boolean
-
magnitudeSquared
public float magnitudeSquared()- Returns:
- WebIDL type: float
-
magnitude
public float magnitude()- Returns:
- WebIDL type: float
-
dot
- Parameters:
v- WebIDL type:PxVec3[Const, Ref]- Returns:
- WebIDL type: float
-
cross
-
getNormalized
- Returns:
- WebIDL type:
PxVec3[Value]
-
normalize
public float normalize()- Returns:
- WebIDL type: float
-
normalizeSafe
public float normalizeSafe()- Returns:
- WebIDL type: float
-
normalizeFast
public float normalizeFast()- Returns:
- WebIDL type: float
-
multiply
-
minimum
-
minElement
public float minElement()- Returns:
- WebIDL type: float
-
maximum
-
maxElement
public float maxElement()- Returns:
- WebIDL type: float
-
abs
- Returns:
- WebIDL type:
PxVec3[Value]
-