Renders a 3D Model by attaching it to a Node
with setRenderable(Renderable)
.
future = ModelRenderable.builder().setSource(context, R.raw.renderable).build();
renderable = future.thenAccept(...);
Nested Classes
Inherited Constants
Inherited Fields
Public Methods
static ModelRenderable.Builder | |
AnimationData | getAnimationData
(int index)
|
AnimationData | |
int | |
int | |
String | |
int | getBoneParentIndex
(int boneIndex)
Returns the index of the parent bone for the specified bone index.
|
ModelRenderable |
Inherited Methods
Public Methods
public static ModelRenderable.Builder builder ()
Constructs a ModelRenderable
.
public AnimationData getAnimationData (int index)
Returns the AnimationData
at the specified position packaged in this ModelRenderable
.
Parameters
Throws
getAnimationDataCount()
).public AnimationData getAnimationData ( String name)
Returns AnimationData
with matching name or null.
Parameters
public int getAnimationDataCount ()
Returns the total number of AnimationData
packaged with this ModelRenderable
.
public int getBoneCount ()
Returns the number of bones in this renderable if it is skinned. If this renderable is not skinned, returns 0.
public String getBoneName (int boneIndex)
Returns the name of the bone for the specified bone index.
Parameters
Throws
public int getBoneParentIndex (int boneIndex)
Returns the index of the parent bone for the specified bone index. If the bone has no parent it is a root bone and -1 is returned.
Parameters
Throws
public ModelRenderable makeCopy ()
Creates a new instance of this ModelRenderable.
The new renderable will have unique copy of all mutable state. All materials referenced by the ModelRenderable will also be instanced. Immutable data will be shared between the instances.