Interface PhysicsSimulator

  • All Known Implementing Classes:
    PhysicsSimulator.CppProxy

    public interface PhysicsSimulator
    Interface for adjustment physics simulation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void reset()
      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​(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 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
                           java.lang.String bone1Name,
                           @NonNull
                           java.lang.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