Package com.banuba.sdk.scene
Class PhysicsSimulator.CppProxy
- java.lang.Object
-
- com.banuba.sdk.scene.PhysicsSimulator.CppProxy
-
- All Implemented Interfaces:
PhysicsSimulator
- Enclosing interface:
- PhysicsSimulator
public static final class PhysicsSimulator.CppProxy extends java.lang.Object implements PhysicsSimulator
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.banuba.sdk.scene.PhysicsSimulator
PhysicsSimulator.CppProxy
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_djinni_private_destroy()
protected void
finalize()
void
reset()
Reset simulator to default statevoid
setBonesInMvSpace(boolean bonesInMvSpace)
Sets bonesInMvSpace flag false for legacy effects with special vertex shaders true for using same vertex shaders as for non-physics meshesvoid
setConstraint(java.lang.String bone1Name, java.lang.String bone2Name, float distance)
Add constraint between bone1 and bone2.void
setDamping(float damping)
Sets damping value.void
setGravity(Vec3 gravity)
Sets gravitation vector.void
setInvMass(java.lang.String boneName, float value)
Sets inverse bone mass.void
setSphereCollider(int sphereIndex, Vec3 center, float radius)
Add sphere collider.
-
-
-
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
-
setGravity
public void setGravity(Vec3 gravity)
Description copied from interface:PhysicsSimulator
Sets gravitation vector.- Specified by:
setGravity
in interfacePhysicsSimulator
- Parameters:
gravity
- (vec3): gravity value
-
setDamping
public void setDamping(float damping)
Description copied from interface:PhysicsSimulator
Sets damping value.- Specified by:
setDamping
in interfacePhysicsSimulator
- Parameters:
damping
- (float): damping value
-
setInvMass
public void setInvMass(java.lang.String boneName, float value)
Description copied from interface:PhysicsSimulator
Sets inverse bone mass.- Specified by:
setInvMass
in interfacePhysicsSimulator
- Parameters:
boneName
- (string): bone namevalue
- (float): inverse bone mass
-
setSphereCollider
public void setSphereCollider(int sphereIndex, Vec3 center, float radius)
Description copied from interface:PhysicsSimulator
Add sphere collider.- Specified by:
setSphereCollider
in interfacePhysicsSimulator
- Parameters:
sphereIndex
- (int): index for spherecenter
- (vec3): sphere center in world spaceradius
- (float): sphere radius
-
setConstraint
public void setConstraint(java.lang.String bone1Name, java.lang.String bone2Name, float distance)
Description copied from interface:PhysicsSimulator
Add constraint between bone1 and bone2.- Specified by:
setConstraint
in interfacePhysicsSimulator
- Parameters:
bone1Name
- (string): from bone namebone2Name
- (string): to bone namedistance
- (float): constaint length
-
setBonesInMvSpace
public void setBonesInMvSpace(boolean bonesInMvSpace)
Description copied from interface:PhysicsSimulator
Sets bonesInMvSpace flag false for legacy effects with special vertex shaders true for using same vertex shaders as for non-physics meshes- Specified by:
setBonesInMvSpace
in interfacePhysicsSimulator
-
reset
public void reset()
Description copied from interface:PhysicsSimulator
Reset simulator to default state- Specified by:
reset
in interfacePhysicsSimulator
-
-