Interface ConstBodyCreationSettings

All Superinterfaces:
Comparable<JoltPhysicsObject>, ConstJoltPhysicsObject
All Known Implementing Classes:
BodyCreationSettings, Part

public interface ConstBodyCreationSettings extends ConstJoltPhysicsObject
Read-only access to a BodyCreationSettings object. (native type: const BodyCreationSettings)
  • Method Details

    • getAllowDynamicOrKinematic

      boolean getAllowDynamicOrKinematic()
      Test whether a static body can be converted to kinematic or dynamic. The settings are unaffected.
      Returns:
      true if convertible, otherwise false
    • getAllowedDofs

      int getAllowedDofs()
      Return the body's degrees of freedom. The settings are unaffected.
      Returns:
      a bitmask (see EAllowedDofs for semantics)
    • getAllowSleeping

      boolean getAllowSleeping()
      Test whether the created body will be allowed to fall asleep. The settings are unaffected.
      Returns:
      true if allowed, otherwise false
    • getAngularDamping

      float getAngularDamping()
      Return the angular damping constant. The settings are unaffected.
      Returns:
      the constant (in units of per second, ≥0, ≤1)
    • getAngularVelocity

      Vec3 getAngularVelocity()
      Copy the (initial) angular velocity. The settings are unaffected.
      Returns:
      a new velocity vector (radians per second in system coordinates)
    • getApplyGyroscopicForce

      boolean getApplyGyroscopicForce()
      Test whether the gyroscopic force will be applied. The settings are unaffected.
      Returns:
      true if enabled, otherwise false
    • getCollideKinematicVsNonDynamic

      boolean getCollideKinematicVsNonDynamic()
      Test whether a kinematic body will collide with kinematic/static bodies.
      Returns:
      true if it will collide, otherwise false
    • getCollisionGroup

      ConstCollisionGroup getCollisionGroup()
      Access the collision group to which the body will belong.
      Returns:
      a new JVM object with the pre-existing native object assigned
    • getEnhancedInternalEdgeRemoval

      boolean getEnhancedInternalEdgeRemoval()
      Test whether extra effort should be made to remove ghost contacts. The settings are unaffected.
      Returns:
      true for extra effort, otherwise false
    • getFriction

      float getFriction()
      Return the friction ratio. The settings are unaffected.
      Returns:
      the ratio (typically ≥0 and ≤1)
    • getGravityFactor

      float getGravityFactor()
      Return the gravity factor. The settings are unaffected.
      Returns:
      the factor
    • getInertiaMultiplier

      float getInertiaMultiplier()
      Return the multiplier for inertia calculations.
      Returns:
      the factor
    • getIsSensor

      boolean getIsSensor()
      Test whether the body will be a sensor. The settings are unaffected.
      Returns:
      true for a sensor, otherwise false
    • getLinearDamping

      float getLinearDamping()
      Return the linear damping constant. The settings are unaffected.
      Returns:
      the constant (in units of per second, ≥0, ≤1)
    • getLinearVelocity

      Vec3 getLinearVelocity()
      Copy the (initial) linear velocity. The settings are unaffected.
      Returns:
      a new velocity vector (meters per second in system coordinates)
    • getMassProperties

      MassProperties getMassProperties()
      Calculate the body's mass and inertia. As a side effect, this method may "cook" the settings.
      Returns:
      a new JVM object with a new native object assigned, or null if a shape is required but not available
    • getMassPropertiesOverride

      ConstMassProperties getMassPropertiesOverride()
      Access the mass-properties override.
      Returns:
      a new JVM object with the pre-existing native object assigned
    • getMaxAngularVelocity

      float getMaxAngularVelocity()
      Return the maximum angular speed. The settings are unaffected.
      Returns:
      the maximum speed (in radians per second)
    • getMaxLinearVelocity

      float getMaxLinearVelocity()
      Return the maximum linear speed. The settings are unaffected.
      Returns:
      the maximum speed (in meters per second)
    • getMotionQuality

      EMotionQuality getMotionQuality()
      Return the motion quality. The settings are unaffected.
      Returns:
      an enum value (not null)
    • getMotionType

      EMotionType getMotionType()
      Return the motion type. The settings are unaffected.
      Returns:
      an enum value (not null)
    • getNumPositionStepsOverride

      int getNumPositionStepsOverride()
      Return the override for the number position iterations in the solver. Applicable only to a dynamic colliding body. The settings are unaffected.
      Returns:
      the number (0 → use default in PhysicsSettings)
    • getNumVelocityStepsOverride

      int getNumVelocityStepsOverride()
      Return the override for the number velocity iterations in the solver. Applicable only to a dynamic colliding body. The settings are unaffected.
      Returns:
      the number (0 → use default in PhysicsSettings)
    • getObjectLayer

      int getObjectLayer()
      Return the index of the object layer. The settings are unaffected.
      Returns:
      the layer index (≥0, <numObjectLayers)
    • getOverrideMassProperties

      EOverrideMassProperties getOverrideMassProperties()
      Return how the mass-properties override will be used. The settings are unaffected.
      Returns:
      an enum value (not null)
    • getPosition

      RVec3 getPosition()
      Copy the (initial) location. The settings are unaffected.
      Returns:
      a new location vector (in system coordinates, all components finite)
    • getRestitution

      float getRestitution()
      Return the restitution ratio. The settings are unaffected.
      Returns:
      the ratio (typically ≥0 and ≤1)
    • getRotation

      Quat getRotation()
      Copy the (initial) orientation of the body's axes. The settings are unaffected.
      Returns:
      a new rotation quaternion (relative to the system axes)
    • getShape

      ConstShape getShape()
      Acquire read-only access to the shape. As a side effect, if the body-creation settings aren't already cooked, this method cooks them.
      Returns:
      a new JVM object, or null if the shape settings are null and the body-creation settings aren't cooked
    • getShapeSettings

      ConstShapeSettings getShapeSettings()
      Acquire read-only access to the ShapeSettings. The body-creation settings are unaffected.
      Returns:
      a new JVM object with the pre-existing native object assigned, or null
    • getUseManifoldReduction

      boolean getUseManifoldReduction()
      Test whether manifold reduction will be enabled. The settings are unaffected. (member data: mUseManifoldReduction)
      Returns:
      true if enabled, otherwise false
    • getUserData

      long getUserData()
      Return the body's user data: can be used for anything. The settings are unaffected. (member data: mUserData)
      Returns:
      the value
    • hasMassProperties

      boolean hasMassProperties()
      Test whether mass properties are required. The settings are unaffected.
      Returns:
      true if required, otherwise false
    • saveBinaryState

      void saveBinaryState(StreamOut stream)
      Write the state of this object to the specified stream, excluding the shape, materials, and group filter. The settings are unaffected.
      Parameters:
      stream - where to write objects (not null)
    • saveWithChildren

      void saveWithChildren(StreamOut stream, ShapeToIdMap shapeMap, MaterialToIdMap materialMap, GroupFilterToIdMap filterMap)
      Write the state of this object to the specified stream. The settings are unaffected.
      Parameters:
      stream - where to write objects (not null)
      shapeMap - track multiple uses of shapes (may be null)
      materialMap - track multiple uses of physics materials (may be null)
      filterMap - track multiple uses of group filters (may be null)