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 final class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Reset simulator to default state
    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
    void
    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

      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 String boneName, float value)
      Sets inverse bone mass.
      Parameters:
      boneName - (string): bone name
      value - (float): inverse bone mass
    • setSphereCollider

      void setSphereCollider(int sphereIndex, @NonNull Vec3 center, float radius)
      Add sphere collider.
      Parameters:
      sphereIndex - (int): index for sphere
      center - (vec3): sphere center in world space
      radius - (float): sphere radius
    • setConstraint

      void setConstraint(@NonNull String bone1Name, @NonNull String bone2Name, float distance)
      Add constraint between bone1 and bone2.
      Parameters:
      bone1Name - (string): from bone name
      bone2Name - (string): to bone name
      distance - (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