-
public class FilamentInstanceProvides access to a hierarchy of entities that have been instanced from a glTF asset.
-
-
Method Summary
Modifier and Type Method Description FilamentAssetgetAsset()intgetRoot()Gets the transform root for the asset, which has no matching glTF node. Array<int>getEntities()Gets the list of entities for this instance, one for each glTF node. AnimatorgetAnimator()Retrieves the Animatorfor this instance.intgetSkinCount()Gets the skin count of this instance. Array<String>getSkinNames()Gets the skin name at skin index in this instance. voidattachSkin(@IntRange(from = 0) int skinIndex, int target)Attaches the given skin to the given node, which must have an associated mesh withBONE_INDICES and BONE_WEIGHTS attributes.This is a no-op if the given skin index or target is invalid. voiddetachSkin(@IntRange(from = 0) int skinIndex, int target)Attaches the given skin to the given node, which must have an associated mesh withBONE_INDICES and BONE_WEIGHTS attributes.This is a no-op if the given skin index or target is invalid. intgetJointCountAt(@IntRange(from = 0) int skinIndex)Gets the joint count at skin index in this instance. Array<int>getJointsAt(@IntRange(from = 0) int skinIndex)Gets joints at skin index in this instance. Array<MaterialInstance>getMaterialInstances()Array<String>getMaterialVariantNames()Returns the names of all material variants. -
-
Method Detail
-
getAsset
@NonNull() FilamentAsset getAsset()
-
getRoot
int getRoot()
Gets the transform root for the asset, which has no matching glTF node.
-
getEntities
@NonNull() Array<int> getEntities()
Gets the list of entities for this instance, one for each glTF node.
All of these have a transform component. Some of the returned entities may also have arenderable component.
-
getAnimator
@NonNull() Animator getAnimator()
Retrieves the
Animatorfor this instance.
-
getSkinCount
int getSkinCount()
Gets the skin count of this instance.
-
getSkinNames
@NonNull() Array<String> getSkinNames()
Gets the skin name at skin index in this instance.
-
attachSkin
void attachSkin(@IntRange(from = 0) int skinIndex, int target)
Attaches the given skin to the given node, which must have an associated mesh withBONE_INDICES and BONE_WEIGHTS attributes.This is a no-op if the given skin index or target is invalid.
-
detachSkin
void detachSkin(@IntRange(from = 0) int skinIndex, int target)
Attaches the given skin to the given node, which must have an associated mesh withBONE_INDICES and BONE_WEIGHTS attributes.This is a no-op if the given skin index or target is invalid.
-
getJointCountAt
int getJointCountAt(@IntRange(from = 0) int skinIndex)
Gets the joint count at skin index in this instance.
-
getJointsAt
@NonNull() Array<int> getJointsAt(@IntRange(from = 0) int skinIndex)
Gets joints at skin index in this instance.
-
getMaterialInstances
@NonNull() Array<MaterialInstance> getMaterialInstances()
-
getMaterialVariantNames
@NonNull() Array<String> getMaterialVariantNames()
Returns the names of all material variants.
-
-
-
-