ReferenceProperty

new ReferenceProperty(dynamicObjectCollection, targetObjectId, targetPropertyName)

A Property which transparently links to another property on a provided object.
Name Type Description
dynamicObjectCollection DynamicObjectCollection The object collection which will be used to resolve the reference.
targetObjectId String The id of the object which is being referenced.
targetPropertyName String The name of the property on the target object which we will use.

Methods

staticReferenceProperty.fromString(dynamicObjectCollection, referenceString)

Creates a new reference property given the dynamic object collection that will be used to resolve it and a string indicating the target object id and property, delineated by a period.
Name Type Description
dynamicObjectCollection DynamicObject
referenceString String
Returns:
A new instance of ReferenceProperty.
Throws:
  • DeveloperError : referenceString must contain a single period delineating the target object ID and property name.

equals(other)Boolean

Compares this property to the provided property and returns true if they are equal, false otherwise.
Name Type Description
other Property optional The other property.
Returns:
true if left and right are equal, false otherwise.

getValue(time, result)Object

Gets the value of the property at the provided time.
Name Type Description
time JulianDate The time for which to retrieve the value.
result Object optional The object to store the value into, if omitted, a new instance is created and returned.
Returns:
The modified result parameter or a new instance if the result parameter was not supplied.

getValueInReferenceFrame(time, referenceFrame, result)Cartesian3

Gets the value of the property at the provided time and in the provided reference frame. This method is only valid if the property being referenced is a PositionProperty.
Name Type Description
time JulianDate The time for which to retrieve the value.
referenceFrame ReferenceFrame The desired referenceFrame of the result.
result Cartesian3 optional The object to store the value into, if omitted, a new instance is created and returned.
Returns:
The modified result parameter or a new instance if the result parameter was not supplied.