Class SkinningBuffer


  • public class SkinningBuffer
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SkinningBuffer.Builder  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getBoneCount()  
      long getNativeObject()  
      void setBonesAsMatrices​(Engine engine, java.nio.Buffer matrices, int boneCount, int offset)
      Updates the bone transforms in the range [offset, offset + boneCount).
      void setBonesAsQuaternions​(Engine engine, java.nio.Buffer quaternions, int boneCount, int offset)
      Updates the bone transforms in the range [offset, offset + boneCount).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setBonesAsMatrices

        public void setBonesAsMatrices​(@NonNull
                                       Engine engine,
                                       @NonNull
                                       java.nio.Buffer matrices,
                                       @IntRange(from=0L,to=255L)
                                       int boneCount,
                                       @IntRange(from=0L)
                                       int offset)
        Updates the bone transforms in the range [offset, offset + boneCount).
        Parameters:
        engine - Engine instance
        matrices - A FloatBuffer containing boneCount 4x4 packed matrices (i.e. 16 floats each matrix and no gap between matrices)
        boneCount - Number of bones to set
        offset - Index of the first bone to set
      • setBonesAsQuaternions

        public void setBonesAsQuaternions​(@NonNull
                                          Engine engine,
                                          @NonNull
                                          java.nio.Buffer quaternions,
                                          @IntRange(from=0L,to=255L)
                                          int boneCount,
                                          @IntRange(from=0L)
                                          int offset)
        Updates the bone transforms in the range [offset, offset + boneCount).
        Parameters:
        engine - Engine instance
        quaternions - A FloatBuffer containing boneCount transforms. Each transform consists of 8 float. float 0 to 3 encode a unit quaternion w+ix+jy+kz stored as x,y,z,w. float 4 to 7 encode a translation stored as x,y,z,1.
        boneCount - Number of bones to set
        offset - Index of the first bone to set
      • getBoneCount

        public int getBoneCount()
        Returns:
        number of bones in this SkinningBuffer
      • getNativeObject

        public long getNativeObject()