Package com.banuba.sdk.scene
Interface PhysicsSimulator
-
- All Known Implementing Classes:
PhysicsSimulator.CppProxy
public interface PhysicsSimulator
Interface for adjustment physics simulation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PhysicsSimulator.CppProxy
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
-
setGravity
void setGravity(@NonNull Vec3 gravity)
Sets gravitation vector.- Parameters:
gravity
- (vec3): gravity value
-
setDamping
void setDamping(float damping)
Sets damping value.- Parameters:
damping
- (float): damping value
-
setInvMass
void setInvMass(@NonNull java.lang.String boneName, float value)
Sets inverse bone mass.- Parameters:
boneName
- (string): bone namevalue
- (float): inverse bone mass
-
setSphereCollider
void setSphereCollider(int sphereIndex, @NonNull Vec3 center, float radius)
Add sphere collider.- Parameters:
sphereIndex
- (int): index for spherecenter
- (vec3): sphere center in world spaceradius
- (float): sphere radius
-
setConstraint
void setConstraint(@NonNull java.lang.String bone1Name, @NonNull java.lang.String bone2Name, float distance)
Add constraint between bone1 and bone2.- Parameters:
bone1Name
- (string): from bone namebone2Name
- (string): to bone namedistance
- (float): constaint length
-
setBonesInMvSpace
void setBonesInMvSpace(boolean bonesInMvSpace)
Sets bonesInMvSpace flag false for legacy effects with special vertex shaders true for using same vertex shaders as for non-physics meshes
-
reset
void reset()
Reset simulator to default state
-
-