Class in Zendir.Universe | Inherits from UniverseObject

Declaration

class CelestialBody;

Description

A celestial body is able to represent a planet, moon, or other celestial object. This will be able to reflect the state of the body and can contribute to the gravitational forces in the simulation.


Properties

DeclaredDescription
AlbedoDefines the current albedo model that is attached to the body
AlbedoAverageAverage Albedo of the Body
AtmosphereDefines the current atmosphere model that is attached to the body
AtmosphereTypeDefines the current atmosphere type, if enabled
AxisInclinationAxial inclination, or tilt, of the body relative to the ecliptic
AxisOmegaAngular velocity of the rotation of the body
DensityDensity of the body
DiameterEquatorial Diameter of the Body
IsCentralBodyThe central body flag will define if this object is the central origin of the simulation
IsSphericalA flag whether the spherical model is being used for this celestialbody. By default, planets are spherical but can be changed to usenon-spherical models, such as the World Geodetic Model (WGS-84)standard for the Earth.
J2The measure of the gravitational effect of a planet due toits obliqueness.
J2000RotationOrientation matrix of planet-fixed relative to inertial frame. Thisis the rotation matrix that can be used to convert between the twocoordinate systems. This is the ‘J20002PFix’ matrix.
J2000RotationDotDerivative of the orientation matrix of planet-fixed relative to inertial.This is the ‘J20002PFix_Dot’ matrix.
MagneticFieldDefines the current magnetic field model that is attached to the body
MagneticFieldTypeDefines the current magnetic field type, if enabled
MassThe mass of the gravity body / planet
MuGravitational Mu of the body
OrbitEccentricityEccentricity of the orbit around the sun or parented body
OrbitInclinationInclination of the orbit around the sun or parented body
OrbitPeriodPeriod of the orbit around the sun or parented body
OrbitSemiMajorAxisSemi Major Axis of the orbit around the sun or parented body
Out_PlanetStateMsgThe Planet information about the current state ofthe planet and the information about the planet.
PolarRadiusPolar Radius of the Body
RadiusEquatorial Radius of the Body
SiderealDayThe time between two consecutive meridian crossings of the Sun
SolarDayThe time it takes for the body to rotate once relative to the Sun
SphericalHarmonicsDefines the current spherical harmonics model that is attached to the body
VelocityThe Inertial Velocity of the Body relative to the Central Body
InheritedDescription
BehavioursA collection of behaviours attached to this object.
ChildrenA collection of children attached to this object.
IsEnabledIs true if the object is currently enabled.
LocalForwardThe direction of the transform frame’s forward vector, which is along the Y axis.
LocalRightThe direction of the transform frame’s right vector, which is along the X axis.
LocalUpThe direction of the transform frame’s up vector, which is along the Z axis.
ModelsA collection of models attached to this object.
NameThe display name or tag of this object.
Out_TransformMsgThis defines the base transform message that stores the state of the transform of this object.
ParentThe currently attached parent object (if any).
Position[m] The position of the object relative to the parent or to world origin, if no parent exists.
RootThe root object in the parent chain.
Rotation[-] The rotation of the object relative to the parent or to the world origin, if no parent exists.

Methods

DeclaredDescription
ComputeInertialGravityCalculates the gravity from this body at some location.
ComputePotentialEnergyCalculates the potential energy of the body at some location.
InheritedDescription
AddObjectReturns a new simulation object with the specified type.
AttachAttempts to attach this object to a new parent. This will only work if the current object is no parented to anyother object.
ContainsModelWithIDReturns true if an attached model satisfies the specified ID.
ContainsModelWithTypeReturns true if an attached model satisfies the specified type.
DestroyRemoves the current object from the simulation.
DetachThis is an action to detach the current object from its parent, if it exists and move it to another object or tojust exist within the simulation.
FindBehavioursWithTypeReturns all attached behaviours that satisfies the specified type.
FindBehaviourWithIDReturns an attached behaviour that satisfies the specified ID.
FindBehaviourWithTypeReturns an attached behaviour that satisfies the specified type.
FindChildrenWithTypeReturns all attached children that satisfies the specified type.
FindChildWithIDReturns an attached child that satisfies the specified ID.
FindChildWithTypeReturns an attached child that satisfies the specified type.
FindModelsWithTypeReturns all attached models that satisfies the specified type.
FindModelWithIDReturns an attached model that satisfies the specified ID.
FindModelWithTypeReturns an attached model that satisfies the specified type.
FindParentWithIDReturns an attached parent that satisfies the specified ID.
FindParentWithTypeReturns an attached parent that satisfies the specified type.
FindRootWithIDReturns a root object that satisfies the specified ID.
FindRootWithTypeReturns a root object that satisfies the specified type.
GetModelReturns a valid assigned model with the specified type.
GetWorldTransformReturns the world transform of the object which is relative to the parent. If no parent exists, this will be thetransform of the object in world space.
PitchDegreesPitches the local transform by some rotation along the X axis.
RollDegreesRolls the local transform by some rotation along the Y axis.
YawDegreesYaws the local transform by some rotation along the Z axis.