Interface ConstPhysicsScene

All Superinterfaces:
AutoCloseable, Comparable<JoltPhysicsObject>, ConstJoltPhysicsObject
All Known Implementing Classes:
PhysicsScene

public interface ConstPhysicsScene extends ConstJoltPhysicsObject
Read-only access to a PhysicsScene.
  • Method Details

    • getBodies

      Access the body-creation settings as a Java array. The scene is unaffected.
      Returns:
      a new array of new JVM objects with the pre-existing native objects assigned
    • getConstraints

      ConstConnectedConstraint[] getConstraints()
      Access the constraints as a Java array. The scene is unaffected.
      Returns:
      a new array of new JVM objects with the pre-existing native objects assigned
    • getNumBodies

      int getNumBodies()
      Count the bodies in the scene. The scene is unaffected.
      Returns:
      the count (≥0)
    • getNumConstraints

      int getNumConstraints()
      Count the constraints in the scene. The scene is unaffected.
      Returns:
      the count (≥0)
    • getNumSoftBodies

      int getNumSoftBodies()
      Count the soft bodies in the scene. The scene is unaffected.
      Returns:
      the count (≥0)
    • getSoftBodies

      Access the soft-body creation settings as a Java array. The scene is unaffected.
      Returns:
      a new array of new JVM objects with pre-existing native objects assigned
    • saveBinaryState

      void saveBinaryState(StreamOut stream, boolean saveShapes, boolean saveGroupFilter)
      Save the scene to the specified binary stream. The scene is unaffected.
      Parameters:
      stream - the stream to write to (not null)
      saveShapes - if true, save the shapes
      saveGroupFilter - if true, save the group filter