Package com.google.android.filament
Class SkinningBuffer.Builder
- java.lang.Object
-
- com.google.android.filament.SkinningBuffer.Builder
-
- Enclosing class:
- SkinningBuffer
public static class SkinningBuffer.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SkinningBuffer.BuilderboneCount(int boneCount)Size of the skinning buffer in bones.SkinningBufferbuild(Engine engine)Creates and returns theSkinningBufferobject.SkinningBuffer.Builderinitialize(boolean initialize)The new buffer is created with identity bones
-
-
-
Method Detail
-
boneCount
@NonNull public SkinningBuffer.Builder boneCount(@IntRange(from=1L) int boneCount)
Size of the skinning buffer in bones.Due to limitation in the GLSL, the SkinningBuffer must always by a multiple of 256, this adjustment is done automatically, but can cause some memory overhead. This memory overhead can be mitigated by using the same
SkinningBufferto store the bone information for multiple RenderPrimitives.- Parameters:
boneCount- Number of bones the skinning buffer can hold.- Returns:
- this
Builderobject for chaining calls
-
initialize
@NonNull public SkinningBuffer.Builder initialize(boolean initialize)
The new buffer is created with identity bones- Parameters:
initialize- true to initializing the buffer, false to not.- Returns:
- A reference to this Builder for chaining calls.
-
build
@NonNull public SkinningBuffer build(@NonNull Engine engine)
Creates and returns theSkinningBufferobject.- Parameters:
engine- reference to theEngineto associate thisSkinningBufferwith.- Returns:
- the newly created
SkinningBufferobject - Throws:
java.lang.IllegalStateException- if the SkinningBuffer could not be created- See Also:
SkinningBuffer.setBonesAsMatrices(com.google.android.filament.Engine, java.nio.Buffer, int, int),SkinningBuffer.setBonesAsQuaternions(com.google.android.filament.Engine, java.nio.Buffer, int, int)
-
-