public abstract class CentralBody extends DefinitionalObject implements IThreadAware, IServiceProvider, IOrientationAxesService, ILocationPointService, IKinematicStateService
Modifier | Constructor and Description |
---|---|
protected |
CentralBody()
Initializes a new instance.
|
protected |
CentralBody(CentralBody existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
checkForSameDefinition(CentralBody other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected boolean |
checkForSameDefinition(DefinitionalObject other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
MotionEvaluator1<AzimuthElevationRange> |
getAzimuthElevationRangeEvaluator(VectorDisplacement displacementVector)
Gets an evaluator to find the azimuth, elevation, and range of a displacement vector as observed
from the initial point.
|
MotionEvaluator1<AzimuthElevationRange> |
getAzimuthElevationRangeEvaluator(VectorDisplacement displacementVector,
EvaluatorGroup group)
Gets an evaluator to find the azimuth, elevation, and range of a displacement vector as observed
from the initial point, and associates the evaluator with the specified evaluator group.
|
MotionEvaluator1<AzimuthElevationRange> |
getAzimuthElevationRangeEvaluator(Vector vector,
Point observingPoint)
Gets an evaluator to find the azimuth, elevation, and range of a vector as observed
from a given point.
|
MotionEvaluator1<AzimuthElevationRange> |
getAzimuthElevationRangeEvaluator(Vector vector,
Point observingPoint,
EvaluatorGroup group)
Gets an evaluator to find the azimuth, elevation, and range of a vector as observed
from a given point, and associates the evaluator with the specified evaluator group.
|
abstract Point |
getCenterOfMassPoint()
Gets a point describing the center of mass of this central body.
|
abstract ReferenceFrame |
getFixedFrame()
Gets the default Fixed frame that corresponds to the surface features of this central body.
|
abstract ReferenceFrame |
getInertialFrame()
Gets the default Inertial frame for this central body.
|
boolean |
getIsThreadSafe()
Gets a value indicating whether the methods on this instance are safe to call from
multiple threads simultaneously.
|
Point |
getLocationPoint()
Gets the point that describes the position of the object.
|
abstract String |
getName()
Gets the name of the central body.
|
Axes |
getOrientationAxes()
Gets the axes that describes the orientation of the object.
|
abstract ReferenceFrame |
getPrincipalFrame()
Gets the default Fixed frame that corresponds to the gravity frame of this central body.
|
ReferenceFrame |
getReferenceFrame()
Gets the reference frame that describes both the position and orientation of this object.
|
Object |
getService(Class<?> serviceType)
Gets the service object of the specified type.
|
abstract Ellipsoid |
getShape()
Gets the shape of this central body.
|
MotionEvaluator1<Cartographic> |
observeCartographicPoint(Point point)
Gets an evaluator that can be used to find the
Cartographic motion of a
point relative to this central body. |
MotionEvaluator1<Cartographic> |
observeCartographicPoint(Point point,
EvaluatorGroup group)
Gets an evaluator that can be used to find the
Cartographic motion of a
point relative to this central body. |
abstract void |
setCenterOfMassPoint(Point value)
Sets a point describing the center of mass of this central body.
|
abstract void |
setFixedFrame(ReferenceFrame value)
Sets the default Fixed frame that corresponds to the surface features of this central body.
|
abstract void |
setInertialFrame(ReferenceFrame value)
Sets the default Inertial frame for this central body.
|
abstract void |
setName(String value)
Sets the name of the central body.
|
abstract void |
setPrincipalFrame(ReferenceFrame value)
Sets the default Fixed frame that corresponds to the gravity frame of this central body.
|
abstract void |
setShape(Ellipsoid value)
Sets the shape of this central body.
|
abstract void |
synchronizeOrigins()
|
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, clone, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, enumerateDependencies, freeze, freezeAggregatedObjects, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
protected CentralBody()
protected CentralBody(@Nonnull CentralBody existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext)
for more information about how to implement this constructor
in a derived class.
existingInstance
- The existing instance to copy.context
- A CopyContext
that controls the depth of the copy.ArgumentNullException
- Thrown when existingInstance
or context
is null
.protected final boolean checkForSameDefinition(DefinitionalObject other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.checkForSameDefinition
in class DefinitionalObject
other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected abstract boolean checkForSameDefinition(CentralBody other)
true
if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false
for all derived-class instances.
Derived classes should check the type of other
to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object)
.other
- The other instance to compare to this one.true
if the two objects are defined equivalently; otherwise false
.protected int computeCurrentDefinitionHashCode()
CentralBody.checkForSameDefinition(agi.foundation.infrastructure.DefinitionalObject)
method.computeCurrentDefinitionHashCode
in class DefinitionalObject
public boolean getIsThreadSafe()
If this property is true
, all methods and properties are guaranteed to be thread safe.
Conceptually, an object that returns true
for this method acts as if there is a lock
protecting each method and property such that only one thread at a time can be inside any method or
property in the class. In reality, such locks are generally not used and are in fact discouraged. However,
the user must not experience any exceptions or inconsistent behavior that would not be experienced if such
locks were used.
If this property is false
, the behavior when using this class from multiple threads
simultaneously is undefined and may include inconsistent results and exceptions. Clients wishing to use
multiple threads should call CopyForAnotherThread.copy(T)
to get a separate instance of the
object for each thread.
getIsThreadSafe
in interface IThreadAware
@Nullable public Object getService(@Nonnull Class<?> serviceType)
getService
in interface IServiceProvider
serviceType
- An object that specifies the type of service object to get.null
if the service does not exist.ArgumentNullException
- Thrown when serviceType
is null
.public abstract void setName(@Nonnull String value)
ArgumentNullException
- Thrown when value
is null
.@Nonnull public abstract Point getCenterOfMassPoint()
public abstract void setCenterOfMassPoint(@Nonnull Point value)
ArgumentNullException
- Thrown when value
is null
.@Nonnull public abstract ReferenceFrame getFixedFrame()
public abstract void setFixedFrame(@Nonnull ReferenceFrame value)
ArgumentNullException
- Thrown when value
is null
.@Nonnull public abstract ReferenceFrame getInertialFrame()
public abstract void setInertialFrame(@Nonnull ReferenceFrame value)
ArgumentNullException
- Thrown when value
is null
.@Nonnull public abstract ReferenceFrame getPrincipalFrame()
public abstract void setPrincipalFrame(@Nonnull ReferenceFrame value)
ArgumentNullException
- Thrown when value
is null
.public abstract void setShape(@Nonnull Ellipsoid value)
ArgumentNullException
- Thrown when value
is null
.public final Point getLocationPoint()
getLocationPoint
in interface ILocationPointService
public final Axes getOrientationAxes()
getOrientationAxes
in interface IOrientationAxesService
public final ReferenceFrame getReferenceFrame()
IKinematicStateService
getReferenceFrame
in interface IKinematicStateService
public abstract void synchronizeOrigins()
@Nonnull public final MotionEvaluator1<Cartographic> observeCartographicPoint(@Nonnull Point point)
Cartographic
motion of a
point relative to this central body.point
- The point to observe.ArgumentNullException
- Thrown when point
is null
.@Nonnull public final MotionEvaluator1<Cartographic> observeCartographicPoint(@Nonnull Point point, @Nonnull EvaluatorGroup group)
Cartographic
motion of a
point relative to this central body.point
- The point to observe.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.ArgumentNullException
- Thrown when point
or group
is null
.@Nonnull public final MotionEvaluator1<AzimuthElevationRange> getAzimuthElevationRangeEvaluator(@Nonnull VectorDisplacement displacementVector)
Azimuth is measured positive in an easterly direction from the observer's local north in a plane tangent to the surface of the central body at the location of the observer. Using this convention, local north is at 0-degrees azimuth, local east is at 90-degrees azimuth, local south is at 180-degrees azimuth, and local west is at 270-degrees azimuth. Elevation is the angle between the relative position vector and the plane tangent to the surface of the central body at the location of the observer and is measured as positive away from the central body.
displacementVector
- The displacement vector.ArgumentNullException
- Thrown when displacementVector
is null
.@Nonnull public final MotionEvaluator1<AzimuthElevationRange> getAzimuthElevationRangeEvaluator(@Nonnull Vector vector, @Nonnull Point observingPoint)
Azimuth is measured positive in an easterly direction from the observer's local north in a plane tangent to the surface of the central body at the location of the observer. Using this convention, local north is at 0-degrees azimuth, local east is at 90-degrees azimuth, local south is at 180-degrees azimuth, and local west is at 270-degrees azimuth. Elevation is the angle between the relative position vector and the plane tangent to the surface of the central body at the location of the observer and is measured as positive away from the central body.
vector
- The vector.observingPoint
- The point from which the vector is observed. This point defines the local coordinate system
in which the azimuth, elevation, and range are defined.ArgumentNullException
- Thrown when vector
or observingPoint
is null
.@Nonnull public final MotionEvaluator1<AzimuthElevationRange> getAzimuthElevationRangeEvaluator(@Nonnull VectorDisplacement displacementVector, @Nonnull EvaluatorGroup group)
Azimuth is measured positive in an easterly direction from the observer's local north in a plane tangent to the surface of the central body at the location of the observer. Using this convention, local north is at 0-degrees azimuth, local east is at 90-degrees azimuth, local south is at 180-degrees azimuth, and local west is at 270-degrees azimuth. Elevation is the angle between the relative position vector and the plane tangent to the surface of the central body at the location of the observer and is measured as positive away from the central body.
displacementVector
- The displacement vector.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.ArgumentNullException
- Thrown when displacementVector
or group
is null
.@Nonnull public final MotionEvaluator1<AzimuthElevationRange> getAzimuthElevationRangeEvaluator(@Nonnull Vector vector, @Nonnull Point observingPoint, @Nonnull EvaluatorGroup group)
Azimuth is measured positive in an easterly direction from the observer's local north in a plane tangent to the surface of the central body at the location of the observer. Using this convention, local north is at 0-degrees azimuth, local east is at 90-degrees azimuth, local south is at 180-degrees azimuth, and local west is at 270-degrees azimuth. Elevation is the angle between the relative position vector and the plane tangent to the surface of the central body at the location of the observer and is measured as positive away from the central body.
vector
- The vector.observingPoint
- The point from which the vector is observed. This point defines the local coordinate system
in which the azimuth, elevation, and range are defined.group
- The group with which to associate the new evaluator. By grouping evaluators
that are often evaluated at the same Julian dates, common computations can be performed only once
for the entire group instead of multiple times for each evaluator.ArgumentNullException
- Thrown when vector
, observingPoint
, or group
is null
.