Package physx.common

Class PxVec3

    • Field Detail

      • SIZEOF

        public static final int SIZEOF
    • Constructor Detail

      • 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 Detail

      • wrapPointer

        public static PxVec3 wrapPointer​(long address)
      • 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