Class CelestialBody

Represents a celestial body with all of its kinematic properties.

Constructors

  • Create a new CelestialBody with the provided information.

    Parameters

    • label: string

      label of the body.

    • mass: number

      mass of the body.

    • radius: number = 1

      radius of the body.

    • position: Vector3 = ...

      position of the body.

    • velocity: Vector3 = ...

      velocity of the body.

    • acceleration: Vector3 = ...

      acceleration of the body.

    Returns CelestialBody

Properties

acceleration: Vector3

Acceleration vector of the body.

label: string

Label of the body.

mass: number

Mean mass of the body.

position: Vector3

Position vector of the body.

radius: number

Mean mass of the body.

velocity: Vector3

Velocity vector of the body.

Methods

  • Deep copy the current CelestialBody with the updated kinematic properties.

    Parameters

    • Optional position: Vector3

      new position.

    • Optional velocity: Vector3

      new velocity.

    • Optional acceleration: Vector3

      new acceleration.

    Returns CelestialBody

    a new CelestialBody instance with the updated properties.

Generated using TypeDoc