Package com.banuba.sdk.scene
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 java.lang.Object implements MeshInstance
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.banuba.sdk.scene.MeshInstance
MeshInstance.CppProxy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_djinni_private_destroy()
void
animationChange(java.lang.String animation, AnimationMode mode)
Change current animation if animation with specified name exist.void
animationPause()
pause animation playback.void
animationPlay()
Start animation playback.void
animationSeek(long positionNs)
Set current animation playback position.Component
asComponent()
static MeshInstance
create()
Fabric method for mesh_instance creating.protected void
finalize()
java.lang.String
getAnimation()
long
getAnimationDurationNs()
AnimationMode
getAnimationMode()
long
getAnimationPositionNs()
long
getAnimationTimeOffsetNs()
Returns current animation playback time offset from begin(0).java.util.ArrayList<Material>
getMaterials()
get materials for each sub geometryMesh
getMesh()
PhysicsSimulator
getPhysicsSimulator()
Material
getSubGeometryMaterial(java.lang.String subGeometryName)
returns material from mesh sub geometry with specified name if it exist, null otherwiseboolean
isAnimationEnded()
True if animation playback stop.boolean
isAnimationPlaying()
True if animation playback was started.boolean
isVisible()
void
setAnimationTimeOffsetNs(long timeNs)
Set current animation playback time offset from begin(0).void
setMesh(Mesh mesh)
set mesh for given mesh instance.void
setSubGeometryMaterial(java.lang.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 Detail
-
_djinni_private_destroy
public void _djinni_private_destroy()
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.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 interfaceMeshInstance
- Parameters:
visible
- (bool) visibility flag.
-
isVisible
public boolean isVisible()
- Specified by:
isVisible
in interfaceMeshInstance
- Returns:
- visibility flag (bool)
-
setSubGeometryMaterial
public void setSubGeometryMaterial(java.lang.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 interfaceMeshInstance
- Parameters:
subGeometryName
- (string) sub geometry name.material
- (material) sub geometry material.
-
getSubGeometryMaterial
public Material getSubGeometryMaterial(java.lang.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 interfaceMeshInstance
- Parameters:
subGeometryName
- (string) sub geometry name.- Returns:
- sub geometry material (material).
-
getMaterials
public java.util.ArrayList<Material> getMaterials()
Description copied from interface:MeshInstance
get materials for each sub geometry- Specified by:
getMaterials
in interfaceMeshInstance
- 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 interfaceMeshInstance
- Parameters:
mesh
- (mesh) new mesh.
-
getMesh
public Mesh getMesh()
- Specified by:
getMesh
in interfaceMeshInstance
- Returns:
- mesh (mesh).
-
animationChange
public void animationChange(java.lang.String animation, AnimationMode mode)
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
public java.lang.String getAnimation()
- Specified by:
getAnimation
in interfaceMeshInstance
- Returns:
- current setted animation name (string).
-
getAnimationMode
public AnimationMode 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
public PhysicsSimulator getPhysicsSimulator()
- Specified by:
getPhysicsSimulator
in interfaceMeshInstance
- Returns:
- physics_simulator of current mesh_instance
-
asComponent
public Component asComponent()
- Specified by:
asComponent
in interfaceMeshInstance
- 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)
-
-