Banuba SDK
Instance Methods | List of all members
BNBPhysicsSimulator Class Reference

Interface for adjustment physics simulation. More...

#import <BNBPhysicsSimulator.h>

Inheritance diagram for BNBPhysicsSimulator:

Instance Methods

(void) - setGravity:
 Sets gravitation vector. More...
 
(void) - setDamping:
 Sets damping value. More...
 
(void) - setInvMass:value:
 Sets inverse bone mass. More...
 
(void) - setSphereCollider:center:radius:
 Add sphere collider. More...
 
(void) - setConstraint:bone2Name:distance:
 Add constraint between bone1 and bone2. More...
 
(void) - setBonesInMvSpace:
 Sets bonesInMvSpace flag false for legacy effects with special vertex shaders true for using same vertex shaders as for non-physics meshes. More...
 
(void) - reset
 Reset simulator to default state. More...
 

Detailed Description

Interface for adjustment physics simulation.

Definition at line 15 of file BNBPhysicsSimulator.h.

Method Documentation

◆ reset

- (void) reset

Reset simulator to default state.

◆ setBonesInMvSpace:

- (void) setBonesInMvSpace: (BOOL)  bonesInMvSpace

Sets bonesInMvSpace flag false for legacy effects with special vertex shaders true for using same vertex shaders as for non-physics meshes.

◆ setConstraint:bone2Name:distance:

- (void) setConstraint: (nonnull NSString *)  bone1Name
bone2Name: (nonnull NSString *)  bone2Name
distance: (float)  distance 

Add constraint between bone1 and bone2.

Parameters
bone1Name(string): from bone name
bone2Name(string): to bone name
distance(float): constaint length

◆ setDamping:

- (void) setDamping: (float)  damping

Sets damping value.

Parameters
damping(float): damping value

◆ setGravity:

- (void) setGravity: (nonnull BNBVec3 *)  gravity

Sets gravitation vector.

Parameters
gravity(vec3): gravity value

◆ setInvMass:value:

- (void) setInvMass: (nonnull NSString *)  boneName
value: (float)  value 

Sets inverse bone mass.

Parameters
boneName(string): bone name
value(float): inverse bone mass

◆ setSphereCollider:center:radius:

- (void) setSphereCollider: (int32_t)  sphereIndex
center: (nonnull BNBVec3 *)  center
radius: (float)  radius 

Add sphere collider.

Parameters
sphereIndex(int): index for sphere
center(vec3): sphere center in world space
radius(float): sphere radius

The documentation for this class was generated from the following file: