new CompositePositionProperty(referenceFrame)
A class used to combine multiple PositionProperty properties, allowing dynamic switching of different position calculation logic (such as linear interpolation, jumping motion, etc.) at different time periods, suitable for dynamic modeling of complex trajectories or position behaviors.
This class is both a Composite Property and a PositionProperty.
| Name | Type | Default | Description |
|---|---|---|---|
referenceFrame |
ReferenceFrame | ReferenceFrame.FIXED |
optional
The reference frame in which the position is defined. |
Members
-
readonly definitionChangedEvent
-
Get the event thrown when the definition of the attribute changes. If calling getValue at the same time returns different results, it is considered that the definition has been changed.
-
intervalsTimeIntervalCollection
-
Retrieve the set of time intervals.
-
readonly isConstantBoolean
-
Get a boolean value indicating whether the property is a constant. If getValue always returns the same result in the current definition, then the property is considered a constant.
-
referenceFrameReferenceFrame
-
Obtain or set the reference frame represented by this location itself. Each PositionProperty that makes up this object has its own reference frame, so this property only exposes a "preferred" reference framework for clients to use.
Methods
-
equals(other){Boolean}
-
Compare this attribute with the provided attribute, return true if they are equal, otherwise return false.
Name Type Description otherProperty optional A property value.
Returns:
Type Description Boolean If left and right are equal, it is true; otherwise, it is false. -
getValue(time, result){Object}
-
Obtain the position attribute value at a given time in a fixed reference frame.
Name Type Description timeJulianDate The time to retrieve the location attribute value.
resultObject optional If the object to store numerical values is omitted, a new instance will be created and returned.
Returns:
Type Description Object The modified result parameters, or a new instance (if no result parameters are provided). -
getValueInReferenceFrame(time, referenceFrame, result){Cartesian3}
-
Obtain the position attribute value of a given reference frame at a given time.
Name Type Description timeJulianDate The time to retrieve the location attribute value.
referenceFrameReferenceFrame The given reference frame.
resultCartesian3 optional If the object to store numerical values is omitted, a new instance will be created and returned.
Returns:
Type Description Cartesian3 The modified result parameters, or a new instance (if no result parameters are provided).