Package com.banuba.sdk.scene
Interface PhysicsSimulator
- All Known Implementing Classes:
PhysicsSimulator.CppProxy
public interface PhysicsSimulator
Interface for adjustment physics simulation.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
(String bone1Name, 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
(String boneName, float value) Sets inverse bone mass.void
setSphereCollider
(int sphereIndex, Vec3 center, float radius) Add sphere collider.
-
Method Details
-
setGravity
Sets gravitation vector.- Parameters:
gravity
- (vec3): gravity value
-
setDamping
void setDamping(float damping) Sets damping value.- Parameters:
damping
- (float): damping value
-
setInvMass
Sets inverse bone mass.- Parameters:
boneName
- (string): bone namevalue
- (float): inverse bone mass
-
setSphereCollider
Add sphere collider.- Parameters:
sphereIndex
- (int): index for spherecenter
- (vec3): sphere center in world spaceradius
- (float): sphere radius
-
setConstraint
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
-