Package com.google.android.filament
Class MorphTargetBuffer
- java.lang.Object
-
- com.google.android.filament.MorphTargetBuffer
-
public class MorphTargetBuffer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMorphTargetBuffer.Builder
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCount()longgetNativeObject()intgetVertexCount()voidsetPositionsAt(Engine engine, int targetIndex, float[] positions, int count)Updates float4 positions for the given morph target.voidsetTangentsAt(Engine engine, int targetIndex, short[] tangents, int count)Updates tangents for the given morph target.
-
-
-
Method Detail
-
setPositionsAt
public void setPositionsAt(@NonNull Engine engine, @IntRange(from=0L) int targetIndex, @NonNull float[] positions, @IntRange(from=0L,to=125L) int count)Updates float4 positions for the given morph target.- Parameters:
engine-EngineinstancetargetIndex- The index of morph target to be updatedpositions- An array with at least count*4 floatscount- Number of float4 vectors in positions to be consumed
-
setTangentsAt
public void setTangentsAt(@NonNull Engine engine, @IntRange(from=0L) int targetIndex, @NonNull short[] tangents, @IntRange(from=0L,to=125L) int count)Updates tangents for the given morph target. These quaternions must be represented as signed shorts, where real numbers in the [-1,+1] range multiplied by 32767.- Parameters:
engine-EngineinstancetargetIndex- The index of morph target to be updatedtangents- An array with at least "count*4" shortscount- number of short4 quaternions in tangents
-
getVertexCount
public int getVertexCount()
- Returns:
- number of vertices in this
MorphTargetBuffer
-
getCount
public int getCount()
- Returns:
- number of morph targets in this
MorphTargetBuffer
-
getNativeObject
public long getNativeObject()
-
-