Package 

Class FilamentInstance


  • 
    public class FilamentInstance
    
                        

    Provides access to a hierarchy of entities that have been instanced from a glTF asset.

    • Method Summary

      Modifier and Type Method Description
      FilamentAsset getAsset()
      int getRoot() 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.
      Animator getAnimator() Retrieves the Animator for this instance.
      int getSkinCount() Gets the skin count of this instance.
      Array<String> getSkinNames() Gets the skin name at skin index in this instance.
      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.
      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.
      int getJointCountAt(@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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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.

      • getSkinCount

         int getSkinCount()

        Gets the skin count of 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.