Constructors

Methods

  • Parameters

    • bodyId: HP_BodyId

    Returns [[number, number, number], number, [number, number, number], [number, number, number, number]]

  • Parameters

    • containerShapeID: HP_ShapeId
    • shape: HP_ShapeId
    • transforms: any

    Returns void

  • Parameters

    • bodyId: HP_BodyId
    • impulse: [number, number, number]
    • location: [number, number, number]

    Returns void

  • Parameters

    • shapeType: PhysicsShapeType
    • position: Vector3
    • quaternion: Quaternion
    • scale: Vector3
    • vertices: undefined | Vector3[]
    • indicies: undefined | number[]

    Returns HP_ShapeId

  • Disposes a physics constraint.

    Parameters

    • constraint: PhysicsConstraint

      The physics constraint to dispose.

      This method is useful for releasing the resources associated with a physics constraint, such as the Havok constraint, when it is no longer needed. This is important for avoiding memory leaks.

    Returns void

  • Gets the friction value of the specified axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to get the axis friction from.

    • axis: PhysicsConstraintAxis

      The axis to get the friction from.

    Returns number

    The friction value of the specified axis.

  • Gets the maximum limit of the given axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to get the maximum limit from.

    • axis: PhysicsConstraintAxis

      The axis to get the maximum limit from.

    Returns number

    The maximum limit of the given axis of the given constraint.

  • Gets the minimum limit of the specified axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to get the minimum limit from.

    • axis: PhysicsConstraintAxis

      The axis to get the minimum limit from.

    Returns number

    The minimum limit of the specified axis of the given constraint.

  • Gets the axis limit mode of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to get the axis limit mode from.

    • axis: PhysicsConstraintAxis

      The axis to get the limit mode from.

    Returns PhysicsConstraintAxisLimitMode

    The axis limit mode of the given constraint.

  • Gets the maximum force of the motor of the given constraint axis.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to get the motor maximum force from.

    • axis: PhysicsConstraintAxis

      The axis of the constraint to get the motor maximum force from.

    Returns number

    The maximum force of the motor of the given constraint axis.

  • Gets the target of the motor of the given axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to get the motor target from.

    • axis: PhysicsConstraintAxis

      The axis of the constraint to get the motor target from.

    Returns number

    The target of the motor of the given axis of the given constraint.

  • Gets the motor type of the specified axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to get the motor type from.

    • axis: PhysicsConstraintAxis

      The axis of the constraint to get the motor type from.

    Returns PhysicsConstraintMotorType

    The motor type of the specified axis of the given constraint.

  • Parameters

    • shapeID: HP_ShapeId

    Returns {
        dynamicFriction: number;
        frictionCombine: undefined | PhysicsMaterialCombineMode;
        restitution: number;
        restitutionCombine: undefined | PhysicsMaterialCombineMode;
        staticFriction: number;
    }

    • dynamicFriction: number
    • frictionCombine: undefined | PhysicsMaterialCombineMode
    • restitution: number
    • restitutionCombine: undefined | PhysicsMaterialCombineMode
    • staticFriction: number
  • Sets the friction of the given axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to set the friction of.

    • axis: PhysicsConstraintAxis

      The axis of the constraint to set the friction of.

    • friction: number

      The friction to set.

    Returns void

  • Sets the maximum limit of the given axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to set the maximum limit of the given axis.

    • axis: PhysicsConstraintAxis

      The axis to set the maximum limit of.

    • limit: number

      The maximum limit to set.

    Returns void

  • Sets the minimum limit of the given axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to set the minimum limit of.

    • axis: PhysicsConstraintAxis

      The axis to set the minimum limit of.

    • limit: number

      The minimum limit to set.

    Returns void

  • Sets the limit mode of the specified axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to set the axis mode of.

    • axis: PhysicsConstraintAxis

      The axis to set the limit mode of.

    • limitMode: PhysicsConstraintAxisLimitMode

      The limit mode to set.

    Returns void

  • Sets the maximum force that can be applied by the motor of the given constraint axis.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to set the motor max force for.

    • axis: PhysicsConstraintAxis

      The axis of the constraint to set the motor max force for.

    • maxForce: number

      The maximum force that can be applied by the motor.

    Returns void

  • Sets the target of an axis motor of a constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to set the axis motor target of.

    • axis: PhysicsConstraintAxis

      The axis of the constraint to set the motor target of.

    • target: number

      The target of the axis motor.

    Returns void

  • Sets the motor type of the given axis of the given constraint.

    Parameters

    • constraint: PhysicsConstraint

      The constraint to set the motor type of.

    • axis: PhysicsConstraintAxis

      The axis of the constraint to set the motor type of.

    • motorType: PhysicsConstraintMotorType

      The motor type to set.

    Returns void

    void

  • Parameters

    • bodyId: HP_BodyId
    • transform: [[number, number, number], [number, number, number, number]]

    Returns void

  • Enable collision to be reported for a body when a callback is settup on the world

    Parameters

    • bodyId: HP_BodyId
    • enabled: boolean

    Returns void

  • Parameters

    • bodyId: HP_BodyId
    • OptionalcenterOfMass: [number, number, number]
    • Optionalmass: number
    • Optionalinertia: [number, number, number]
    • OptionalinertiaOrientation: [number, number, number, number]

    Returns void

  • Parameters

    • shapeId: HP_ShapeId
    • material: {
          dynamicFriction?: number;
          frictionCombine?: PhysicsMaterialCombineMode;
          restitution?: number;
          restitutionCombine?: PhysicsMaterialCombineMode;
          staticFriction?: number;
      }
      • OptionaldynamicFriction?: number
      • OptionalfrictionCombine?: PhysicsMaterialCombineMode
      • Optionalrestitution?: number
      • OptionalrestitutionCombine?: PhysicsMaterialCombineMode
      • OptionalstaticFriction?: number

    Returns void

  • Parameters

    • bodyId: HP_BodyId
    • transform: [[number, number, number], [number, number, number, number]]

    Returns void

  • Parameters

    • worldId: HP_WorldId = ...
    • maxLinearVelocity: number
    • maxAngularVelocity: number

    Returns void

Properties

_tabInFocus: boolean = true
world: HP_WorldId