Package com.luciad.reference
Class TLcdCartesianReference
java.lang.Object
com.luciad.reference.TLcdCartesianReference
- All Implemented Interfaces:
ILcdModelReference
,ILcdCloneable
,ILcdXYWorldReference
,ILcdXYZWorldReference
,Serializable
,Cloneable
public final class TLcdCartesianReference
extends Object
implements ILcdModelReference, ILcdXYZWorldReference, ILcdXYWorldReference
A generic cartesian reference that can be used as a model reference or world reference.
You can optionally specify a unit of measure
per axis.
Example:
new TLcdCartesianReference(TLcdDistanceUnit.KM_UNIT, TLcdSpeedUnit.KmH);
Note: when used as world reference for a non-geospatial view, the view will only
support one measurement type on each axis.- Since:
- 2017.0
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new cartesian reference with unspecified X, Y and Z axes.TLcdCartesianReference
(ILcdISO19103UnitOfMeasure aXAxis, ILcdISO19103UnitOfMeasure aYAxis) Creates a new cartesian reference with specified X and Y axes.TLcdCartesianReference
(ILcdISO19103UnitOfMeasure aXAxis, ILcdISO19103UnitOfMeasure aYAxis, ILcdISO19103UnitOfMeasure aZAxis) Creates a new cartesian reference with specified X, Y and Z axes. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.boolean
Returns the bounds of theILcdXYWorldReference
.Returns the unit of measure of the X axis associated with this reference.Returns the unit of measure of the Y axis associated with this reference.Returns the unit of measure of the Z axis associated with this reference.int
hashCode()
boolean
Returns if thisILcdXYWorldReference
has bounds available.void
loadProperties
(String aPrefix, Properties aProperties) Initializes this model reference based on the information in the specified properties.Creates a model point that is compatible with this model reference.void
writePropertiesSFCT
(String aPrefix, Properties aPropertiesSFCT) Stores the properties that define this model reference into the specifiedProperties
object as a side effect.
-
Constructor Details
-
TLcdCartesianReference
public TLcdCartesianReference()Creates a new cartesian reference with unspecified X, Y and Z axes. -
TLcdCartesianReference
Creates a new cartesian reference with specified X and Y axes.- Parameters:
aXAxis
- The unit-of-measure associated with the X axis, can be null if unspecified.aYAxis
- The unit-of-measure associated with the Y axis, can be null if unspecified.
-
TLcdCartesianReference
public TLcdCartesianReference(ILcdISO19103UnitOfMeasure aXAxis, ILcdISO19103UnitOfMeasure aYAxis, ILcdISO19103UnitOfMeasure aZAxis) Creates a new cartesian reference with specified X, Y and Z axes.- Parameters:
aXAxis
- The unit-of-measure associated with the X axis, can be null if unspecified.aYAxis
- The unit-of-measure associated with the Y axis, can be null if unspecified.aZAxis
- The unit-of-measure associated with the Z axis, can be null if unspecified.
-
-
Method Details
-
getXAxisUnit
Returns the unit of measure of the X axis associated with this reference.- Returns:
- The unit of measure, or null if not specified
-
getYAxisUnit
Returns the unit of measure of the Y axis associated with this reference.- Returns:
- The unit of measure, or null if not specified
-
getZAxisUnit
Returns the unit of measure of the Z axis associated with this reference.- Returns:
- The unit of measure, or null if not specified
-
loadProperties
Description copied from interface:ILcdModelReference
Initializes this model reference based on the information in the specified properties. Each particular implementation of this interface can define which properties it reads. This method should only be called once to initialize this model reference (model references should be immutable).- Specified by:
loadProperties
in interfaceILcdModelReference
- Parameters:
aPrefix
- a common prefix for all property names that are read.aProperties
- the properties to be parsed.- Throws:
IllegalArgumentException
- if the model reference cannot be constructed from the properties.
-
writePropertiesSFCT
public void writePropertiesSFCT(String aPrefix, Properties aPropertiesSFCT) throws IllegalArgumentException Description copied from interface:ILcdModelReference
Stores the properties that define this model reference into the specifiedProperties
object as a side effect. Each particular implementation of this interface can define which properties it stores.- Specified by:
writePropertiesSFCT
in interfaceILcdModelReference
- Parameters:
aPrefix
- a common prefix for all property names written.aPropertiesSFCT
- the properties that will contain the serialized properties for this model reference, as a side effect.- Throws:
IllegalArgumentException
- if the model reference cannot be serialized into properties.
-
makeModelPoint
Description copied from interface:ILcdModelReference
Creates a model point that is compatible with this model reference. It is unspecified how (which coordinates) the point is initialized. Users should initialize the point correctly before inserting it into a model.- Specified by:
makeModelPoint
in interfaceILcdModelReference
- Returns:
- a point that is compatible with this model reference.
-
isBoundsAvailable
public boolean isBoundsAvailable()Description copied from interface:ILcdXYWorldReference
Returns if thisILcdXYWorldReference
has bounds available.- Specified by:
isBoundsAvailable
in interfaceILcdXYWorldReference
- Returns:
true
if a 2DEditable bounds is available, false otherwise.- See Also:
-
get2DEditableBounds
Description copied from interface:ILcdXYWorldReference
Returns the bounds of theILcdXYWorldReference
.- Specified by:
get2DEditableBounds
in interfaceILcdXYWorldReference
- Returns:
- if
isBoundsAvailable()
, aILcd2DEditableBounds
that contains all the 2D shapes of all the objects in world coordinates using the givenILcdXYWorldReference
. Returns only a valid value ifisBoundsAvailable()
istrue
;.
-
clone
Description copied from interface:ILcdCloneable
Makes
When for example extending fromObject.clone()
public.java.lang.Object
, it can be implemented like this:public Object clone() { try { return super.clone(); } catch ( CloneNotSupportedException e ) { // Cannot happen: extends from Object and implements Cloneable (see also Object.clone) throw new RuntimeException( e ); } }
- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classObject
- See Also:
-
equals
-
hashCode
public int hashCode()
-