Package physx.common

Class PxVec4


public class PxVec4 extends NativeObject
  • 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: float
      y - WebIDL type: float
      z - WebIDL type: float
      w - WebIDL type: float
  • Method Details

    • wrapPointer

      public static PxVec4 wrapPointer(long address)
    • arrayGet

      public static PxVec4 arrayGet(long baseAddress, int index)
    • createAt

      public static PxVec4 createAt(long address)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      Returns:
      Stack allocated object of PxVec4
    • createAt

      public static <T> PxVec4 createAt(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 PxVec4
    • createAt

      public static PxVec4 createAt(long address, float x, float y, float z, float w)
      Parameters:
      address - Pre-allocated memory, where the object is created.
      x - WebIDL type: float
      y - WebIDL type: float
      z - WebIDL type: float
      w - 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: float
      y - WebIDL type: float
      z - WebIDL type: float
      w - 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

      public float dot(PxVec4 v)
      Parameters:
      v - WebIDL type: PxVec4 [Const, Ref]
      Returns:
      WebIDL type: float
    • getNormalized

      public PxVec4 getNormalized()
      Returns:
      WebIDL type: PxVec4 [Value]
    • normalize

      public float normalize()
      Returns:
      WebIDL type: float
    • multiply

      public PxVec4 multiply(PxVec4 a)
      Parameters:
      a - WebIDL type: PxVec4 [Const, Ref]
      Returns:
      WebIDL type: PxVec4 [Value]
    • minimum

      public PxVec4 minimum(PxVec4 v)
      Parameters:
      v - WebIDL type: PxVec4 [Const, Ref]
      Returns:
      WebIDL type: PxVec4 [Value]
    • maximum

      public PxVec4 maximum(PxVec4 v)
      Parameters:
      v - WebIDL type: PxVec4 [Const, Ref]
      Returns:
      WebIDL type: PxVec4 [Value]
    • getXYZ

      public PxVec3 getXYZ()
      Returns:
      WebIDL type: PxVec3 [Value]