Package physx.common

Class PxVec3


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

    • wrapPointer

      public static PxVec3 wrapPointer(long address)
    • arrayGet

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

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

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

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

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

      public PxVec3 cross(PxVec3 v)
      Parameters:
      v - WebIDL type: PxVec3 [Const, Ref]
      Returns:
      WebIDL type: PxVec3 [Value]
    • getNormalized

      public PxVec3 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

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

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

      public float minElement()
      Returns:
      WebIDL type: float
    • maximum

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

      public float maxElement()
      Returns:
      WebIDL type: float
    • abs

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