Package com.banuba.sdk.scene
Class MeshInstance.CppProxy
java.lang.Object
com.banuba.sdk.scene.MeshInstance.CppProxy
- All Implemented Interfaces:
MeshInstance
- Enclosing interface:
- MeshInstance
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.banuba.sdk.scene.MeshInstance
MeshInstance.CppProxy
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
animationChange
(String animation, AnimationMode mode) Change current animation if animation with specified name exist.void
pause animation playback.void
Start animation playback.void
animationSeek
(long positionNs) Set current animation playback position.static MeshInstance
create()
Fabric method for mesh_instance creating.protected void
finalize()
long
long
long
Returns current animation playback time offset from begin(0).get materials for each sub geometrygetMesh()
getSubGeometryMaterial
(String subGeometryName) returns material from mesh sub geometry with specified name if it exist, null otherwiseboolean
True if animation playback stop.boolean
True if animation playback was started.boolean
void
setAnimationTimeOffsetNs
(long timeNs) Set current animation playback time offset from begin(0).void
set mesh for given mesh instance.void
setSubGeometryMaterial
(String subGeometryName, Material material) set for mesh sub geometry with specified name specified material if sub geometry with given name exists.void
setVisible
(boolean visible) set mesh visibility flag.
-
Method Details
-
_djinni_private_destroy
public void _djinni_private_destroy() -
finalize
-
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 interfaceMeshInstance
- Parameters:
visible
- (bool) visibility flag.
-
isVisible
public boolean isVisible()- Specified by:
isVisible
in interfaceMeshInstance
- Returns:
- visibility flag (bool)
-
setSubGeometryMaterial
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 interfaceMeshInstance
- Parameters:
subGeometryName
- (string) sub geometry name.material
- (material) sub geometry material.
-
getSubGeometryMaterial
Description copied from interface:MeshInstance
returns material from mesh sub geometry with specified name if it exist, null otherwise- Specified by:
getSubGeometryMaterial
in interfaceMeshInstance
- Parameters:
subGeometryName
- (string) sub geometry name.- Returns:
- sub geometry material (material).
-
getMaterials
Description copied from interface:MeshInstance
get materials for each sub geometry- Specified by:
getMaterials
in interfaceMeshInstance
- Returns:
- materials (list
)
-
setMesh
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 interfaceMeshInstance
- Parameters:
mesh
- (mesh) new mesh.
-
getMesh
- Specified by:
getMesh
in interfaceMeshInstance
- Returns:
- mesh (mesh).
-
animationChange
Description copied from interface:MeshInstance
Change current animation if animation with specified name exist.- Specified by:
animationChange
in interfaceMeshInstance
mode
- (animation_mode).
-
animationPlay
public void animationPlay()Description copied from interface:MeshInstance
Start animation playback.- Specified by:
animationPlay
in interfaceMeshInstance
-
animationPause
public void animationPause()Description copied from interface:MeshInstance
pause animation playback.- Specified by:
animationPause
in interfaceMeshInstance
-
animationSeek
public void animationSeek(long positionNs) Description copied from interface:MeshInstance
Set current animation playback position.- Specified by:
animationSeek
in interfaceMeshInstance
- 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 interfaceMeshInstance
- Returns:
- animation playback active flag (bool).
-
isAnimationEnded
public boolean isAnimationEnded()Description copied from interface:MeshInstance
True if animation playback stop.- Specified by:
isAnimationEnded
in interfaceMeshInstance
- Returns:
- animation playback active flag (bool).
-
getAnimation
- Specified by:
getAnimation
in interfaceMeshInstance
- Returns:
- current setted animation name (string).
-
getAnimationMode
- Specified by:
getAnimationMode
in interfaceMeshInstance
- Returns:
- current setted animation mode (animation_mode). Can be off loop once once_reversed fixed.
-
getAnimationPositionNs
public long getAnimationPositionNs()- Specified by:
getAnimationPositionNs
in interfaceMeshInstance
- Returns:
- current animation playback position (long).
-
getAnimationDurationNs
public long getAnimationDurationNs()- Specified by:
getAnimationDurationNs
in interfaceMeshInstance
- 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 interfaceMeshInstance
- 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 interfaceMeshInstance
- Parameters:
timeNs
- (long): animation playback time offset.
-
getPhysicsSimulator
- Specified by:
getPhysicsSimulator
in interfaceMeshInstance
- Returns:
- physics_simulator of current mesh_instance
-
asComponent
- Specified by:
asComponent
in interfaceMeshInstance
- Returns:
- upcast to base type
-
create
Description copied from interface:MeshInstance
Fabric method for mesh_instance creating.- Returns:
- mesh_instance component (mesh_instance)
-