Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RotatingObject

This class simulates an object that spins according to provided rotational parameters.

Hierarchy

Index

Constructors

constructor

Properties

Private Optional _axisOfRotation

_axisOfRotation: Vector3

Protected _context

Protected _id

_id: string

Protected _initialized

_initialized: boolean

Protected _materials

_materials: Material[]

Protected _obj

_obj: Object3D

Private _objectIsRotatable

_objectIsRotatable: boolean

Protected _options

Protected Optional _renderMethod

_renderMethod: "SPRITE" | "PARTICLESYSTEM" | "ROTATING_OBJECT" | "SPHERE"

Protected _simulation

_simulation: Simulation

Methods

get3jsObjects

  • get3jsObjects(): Object3D[]

getBoundingObject

  • getBoundingObject(): Promise<Object3D>
  • Specifies the object that is used to compute the bounding box. By default, this will be the first THREE.js object in this class's list of objects.

    Returns Promise<Object3D>

    THREE.js object

getColor

  • getColor(): number
  • Gets the color of this object. Usually this corresponds to the color of the dot representing the object as well as its orbit.

    Returns number

    A hexidecimal color value, e.g. 0xFFFFFF

getId

  • getId(): string

getLabelVisibility

  • getLabelVisibility(): boolean

getOrbit

  • getOrbit(): undefined | Orbit

getPosition

init

  • init(): boolean
  • Initializes label and three.js objects. Called automatically unless you've set autoInit to false in constructor (this init is suppressed by some child classes).

    Returns boolean

initRotation

  • initRotation(): void

isReady

  • isReady(): boolean

isStaticObject

  • isStaticObject(): boolean
  • Determines whether object is static (can't change its position) or whether its position can be updated (ie, it has ephemeris)

    Returns boolean

    Whether this object can change its position.

orbitAround

removalCleanup

  • removalCleanup(): void

setLabelVisibility

  • setLabelVisibility(val: boolean): void

setPosition

  • setPosition(x: number, y: number, z: number): void
  • Updates the position of this object. Applicable only if this object is a sprite and not a particle type.

    Parameters

    • x: number

      X position

    • y: number

      Y position

    • z: number

      Z position

    Returns void

Protected setPositionedObject

  • setPositionedObject(obj: Object3D): void

startRotation

  • startRotation(): void

stopRotation

  • stopRotation(): void

update

  • update(jd: number, force?: boolean): void
  • Updates the object and its label positions for a given time.

    Parameters

    • jd: number

      JD date

    • force: boolean = false

    Returns void

Generated using TypeDoc