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 - float
        y - float
        z - float
    • Method Detail

      • wrapPointer

        public static PxVec3 wrapPointer​(long address)
      • malloc

        public static PxVec3 malloc​(long address)
        Parameters:
        address - where the object is allocated
        Returns:
        Stack allocated object of PxVec3
      • malloc

        public static <T> PxVec3 malloc​(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
      • malloc

        public static PxVec3 malloc​(long address,
                                    float x,
                                    float y,
                                    float z)
        Parameters:
        address - where the object is allocated
        x - float
        y - float
        z - float
        Returns:
        Stack allocated object of PxVec3
      • malloc

        public static <T> PxVec3 malloc​(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 - float
        y - float
        z - float
        Returns:
        Stack allocated object of PxVec3
      • destroy

        public void destroy()
      • getX

        public float getX()
        Returns:
        float
      • setX

        public void setX​(float value)
        Parameters:
        value - float
      • getY

        public float getY()
        Returns:
        float
      • setY

        public void setY​(float value)
        Parameters:
        value - float
      • getZ

        public float getZ()
        Returns:
        float
      • setZ

        public void setZ​(float value)
        Parameters:
        value - float