Class MeshInstance.CppProxy

java.lang.Object
com.banuba.sdk.scene.MeshInstance.CppProxy
All Implemented Interfaces:
MeshInstance
Enclosing interface:
MeshInstance

public static final class MeshInstance.CppProxy extends Object implements MeshInstance
  • Method Details

    • _djinni_private_destroy

      public void _djinni_private_destroy()
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • setVisible

      public void setVisible(boolean visible)
      Description copied from interface: MeshInstance
      set mesh visibility flag. Will be overridden if entity with mesh_instance component is child of entity with face_tracker component.
      Specified by:
      setVisible in interface MeshInstance
      Parameters:
      visible - (bool) visibility flag.
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface MeshInstance
      Returns:
      visibility flag (bool)
    • setSubGeometryMaterial

      public void setSubGeometryMaterial(String subGeometryName, Material material)
      Description copied from interface: MeshInstance
      set for mesh sub geometry with specified name specified material if sub geometry with given name exists.
      Specified by:
      setSubGeometryMaterial in interface MeshInstance
      Parameters:
      subGeometryName - (string) sub geometry name.
      material - (material) sub geometry material.
    • getSubGeometryMaterial

      public Material getSubGeometryMaterial(String subGeometryName)
      Description copied from interface: MeshInstance
      returns material from mesh sub geometry with specified name if it exist, null otherwise
      Specified by:
      getSubGeometryMaterial in interface MeshInstance
      Parameters:
      subGeometryName - (string) sub geometry name.
      Returns:
      sub geometry material (material).
    • getMaterials

      public ArrayList<Material> getMaterials()
      Description copied from interface: MeshInstance
      get materials for each sub geometry
      Specified by:
      getMaterials in interface MeshInstance
      Returns:
      materials (list)
    • setMesh

      public void setMesh(Mesh mesh)
      Description copied from interface: MeshInstance
      set mesh for given mesh instance. Of some mesh was settled before need to re set all materials.
      Specified by:
      setMesh in interface MeshInstance
      Parameters:
      mesh - (mesh) new mesh.
    • getMesh

      public Mesh getMesh()
      Specified by:
      getMesh in interface MeshInstance
      Returns:
      mesh (mesh).
    • animationChange

      public void animationChange(String animation, AnimationMode mode)
      Description copied from interface: MeshInstance
      Change current animation if animation with specified name exist.
      Specified by:
      animationChange in interface MeshInstance
      mode - (animation_mode).
    • animationPlay

      public void animationPlay()
      Description copied from interface: MeshInstance
      Start animation playback.
      Specified by:
      animationPlay in interface MeshInstance
    • animationPause

      public void animationPause()
      Description copied from interface: MeshInstance
      pause animation playback.
      Specified by:
      animationPause in interface MeshInstance
    • animationSeek

      public void animationSeek(long positionNs)
      Description copied from interface: MeshInstance
      Set current animation playback position.
      Specified by:
      animationSeek in interface MeshInstance
      Parameters:
      positionNs - (long): position in ns.
    • isAnimationPlaying

      public boolean isAnimationPlaying()
      Description copied from interface: MeshInstance
      True if animation playback was started.
      Specified by:
      isAnimationPlaying in interface MeshInstance
      Returns:
      animation playback active flag (bool).
    • isAnimationEnded

      public boolean isAnimationEnded()
      Description copied from interface: MeshInstance
      True if animation playback stop.
      Specified by:
      isAnimationEnded in interface MeshInstance
      Returns:
      animation playback active flag (bool).
    • getAnimation

      public String getAnimation()
      Specified by:
      getAnimation in interface MeshInstance
      Returns:
      current setted animation name (string).
    • getAnimationMode

      public AnimationMode getAnimationMode()
      Specified by:
      getAnimationMode in interface MeshInstance
      Returns:
      current setted animation mode (animation_mode). Can be off loop once once_reversed fixed.
    • getAnimationPositionNs

      public long getAnimationPositionNs()
      Specified by:
      getAnimationPositionNs in interface MeshInstance
      Returns:
      current animation playback position (long).
    • getAnimationDurationNs

      public long getAnimationDurationNs()
      Specified by:
      getAnimationDurationNs in interface MeshInstance
      Returns:
      current animation playback duration (long).
    • getAnimationTimeOffsetNs

      public long getAnimationTimeOffsetNs()
      Description copied from interface: MeshInstance
      Returns current animation playback time offset from begin(0). Typycally equals animation position mod animation duration.
      Specified by:
      getAnimationTimeOffsetNs in interface MeshInstance
      Returns:
      animation playback time offset (long).
    • setAnimationTimeOffsetNs

      public void setAnimationTimeOffsetNs(long timeNs)
      Description copied from interface: MeshInstance
      Set current animation playback time offset from begin(0). duration.
      Specified by:
      setAnimationTimeOffsetNs in interface MeshInstance
      Parameters:
      timeNs - (long): animation playback time offset.
    • getPhysicsSimulator

      public PhysicsSimulator getPhysicsSimulator()
      Specified by:
      getPhysicsSimulator in interface MeshInstance
      Returns:
      physics_simulator of current mesh_instance
    • asComponent

      public Component asComponent()
      Specified by:
      asComponent in interface MeshInstance
      Returns:
      upcast to base type
    • create

      @Nullable public static MeshInstance create()
      Description copied from interface: MeshInstance
      Fabric method for mesh_instance creating.
      Returns:
      mesh_instance component (mesh_instance)