Package com.google.android.filament
Class SkinningBuffer
- java.lang.Object
-
- com.google.android.filament.SkinningBuffer
-
public class SkinningBuffer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSkinningBuffer.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBoneCount()longgetNativeObject()voidsetBonesAsMatrices(Engine engine, java.nio.Buffer matrices, int boneCount, int offset)Updates the bone transforms in the range [offset, offset + boneCount).voidsetBonesAsQuaternions(Engine engine, java.nio.Buffer quaternions, int boneCount, int offset)Updates the bone transforms in the range [offset, offset + boneCount).
-
-
-
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-Engineinstancematrices- AFloatBuffercontaining boneCount 4x4 packed matrices (i.e. 16 floats each matrix and no gap between matrices)boneCount- Number of bones to setoffset- 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-Engineinstancequaternions- AFloatBuffercontaining boneCount transforms. Each transform consists of 8 float. float 0 to 3 encode a unit quaternionw+ix+jy+kzstored asx,y,z,w. float 4 to 7 encode a translation stored asx,y,z,1.boneCount- Number of bones to setoffset- Index of the first bone to set
-
getBoneCount
public int getBoneCount()
- Returns:
- number of bones in this
SkinningBuffer
-
getNativeObject
public long getNativeObject()
-
-