java.lang.Object
physx.NativeObject
physx.common.PxVec4
-
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 PxVec4arrayGet(long baseAddress, int index) static PxVec4createAt(long address) static PxVec4createAt(long address, float x, float y, float z, float w) static <T> PxVec4createAt(T allocator, NativeObject.Allocator<T> allocate) static <T> PxVec4createAt(T allocator, NativeObject.Allocator<T> allocate, float x, float y, float z, float w) voiddestroy()floatfloatgetW()floatgetX()getXYZ()floatgetY()floatgetZ()booleanisFinite()booleanbooleanisZero()floatfloatfloatvoidsetW(float value) voidsetX(float value) voidsetY(float value) voidsetZ(float value) static PxVec4wrapPointer(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
-
PxVec4
protected PxVec4(long address) -
PxVec4
public PxVec4() -
PxVec4
public PxVec4(float x, float y, float z, float w) - Parameters:
x- WebIDL type: floaty- WebIDL type: floatz- WebIDL type: floatw- WebIDL type: float
-
-
Method Details
-
wrapPointer
-
arrayGet
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.- Returns:
- Stack allocated object of PxVec4
-
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 PxVec4
-
createAt
- Parameters:
address- Pre-allocated memory, where the object is created.x- WebIDL type: floaty- WebIDL type: floatz- WebIDL type: floatw- WebIDL type: float- Returns:
- Stack allocated object of PxVec4
-
createAt
public static <T> PxVec4 createAt(T allocator, NativeObject.Allocator<T> allocate, float x, float y, float z, float w) - 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: floatw- WebIDL type: float- Returns:
- Stack allocated object of PxVec4
-
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
-
getW
public float getW()- Returns:
- WebIDL type: float
-
setW
public void setW(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:PxVec4[Const, Ref]- Returns:
- WebIDL type: float
-
getNormalized
- Returns:
- WebIDL type:
PxVec4[Value]
-
normalize
public float normalize()- Returns:
- WebIDL type: float
-
multiply
-
minimum
-
maximum
-
getXYZ
- Returns:
- WebIDL type:
PxVec3[Value]
-