Class RigidBody<T>

Type Parameters

  • T

Hierarchy (view full)

Implements

  • ForceBody<T>
  • Massive<T>
  • Charged<T>

Constructors

Properties

metric: Metric<T>
uuid: string

A uniquie identifier assigned by applications. This is not used internally.

Accessors

  • get I(): MatrixLike
  • Inertia Tensor (in body coordinates) (3x3 matrix). The returned matrix is a copy. TODO: This copy should be locked.

    Returns MatrixLike

  • set I(I): void
  • Sets the Inertia Tensor (in local coordinates) (3x3 matrix), and computes the inverse.

    Parameters

    • I: MatrixLike

    Returns void

  • get L(): T
  • Angular momentum (bivector) in world coordinates. If dimensioned units are used, they must be compatible with the unit of angular momentum. L is mutable with copy-on-set.

    Returns T

  • set L(angularMomentum): void
  • Parameters

    • angularMomentum: T

    Returns void

  • get M(): T
  • Mass (scalar). Default is one (1). If dimensioned units are used, they must be compatible with the unit of mass. M is immutable but the property may be reassigned.

    Returns T

  • set M(M): void
  • Parameters

    Returns void

  • get P(): T
  • Linear momentum (vector). If dimensioned units are used, they must be compatible with the unit of momentum. P is mutable with copy-on-set.

    Returns T

  • set P(linearMomentum): void
  • Parameters

    • linearMomentum: T

    Returns void

  • get Q(): T
  • Charge (scalar). Default is zero (0). If dimensioned units are used, they must be compatible with the unit of electric charge. Q is immutable but the property may be reassigned.

    Returns T

  • set Q(Q): void
  • Parameters

    Returns void

  • get R(): T
  • Attitude (spinor). Effects a rotation from local coordinates to world coordinates. R is mutable with copy-on-set.

    Returns T

  • set R(attitude): void
  • Parameters

    • attitude: T

    Returns void

  • get X(): T
  • Position (vector). If dimensioned units are used, they must be compatible with the unit of length. X is mutable with copy-on-set.

    Returns T

  • set X(position): void
  • Parameters

    • position: T

    Returns void

  • get expireTime(): number
  • Returns number

  • get Ω(): T
  • Angular velocity (bivector). If dimensioned units are used, they must be compatible with the unit of angular velocity. Ω is mutable with copy-on-set.

    Returns T

  • set Ω(angularVelocity): void
  • Parameters

    • angularVelocity: T

    Returns void

Methods

  • Converts a point in local coordinates to the same point in world coordinates. x = R (localPoint - centerOfMassLocal) * ~R + X

    Parameters

    • localPoint: T

      (input)

    • worldPoint: T

      (output)

    Returns void

  • In the following formula, notice the reversion on either Ω or L. Geometrically, this means we depend on the cosine of the angle between the bivectors, since A * ~B = |A||B|cos(...). (1/2) Ω * ~L(Ω) = (1/2) ~Ω * L(Ω) = (1/2) ω * J(ω), where * means scalar product (equals dot product for vectors).

    Returns T

  • Updates the angular velocity, Ω, bivector based upon the angular momentum. Derived classes may override to provide more efficient implementations based upon symmetry.

    Returns void

Generated using TypeDoc