Package com.luciad.reference
Class TLcdCartesianReference
java.lang.Object
com.luciad.reference.TLcdCartesianReference
- All Implemented Interfaces:
ILcdModelReference,ILcdCloneable,ILcdXYWorldReference,ILcdXYZWorldReference,Serializable,Cloneable
public 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
ConstructorsConstructorDescriptionCreates 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.booleanReturns 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.inthashCode()booleanReturns if thisILcdXYWorldReferencehas bounds available.voidloadProperties(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.voidwritePropertiesSFCT(String aPrefix, Properties aPropertiesSFCT) Stores the properties that define this model reference into the specifiedPropertiesobject 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:ILcdModelReferenceInitializes 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:
loadPropertiesin 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:ILcdModelReferenceStores the properties that define this model reference into the specifiedPropertiesobject as a side effect. Each particular implementation of this interface can define which properties it stores.- Specified by:
writePropertiesSFCTin 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:ILcdModelReferenceCreates 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:
makeModelPointin interfaceILcdModelReference- Returns:
- a point that is compatible with this model reference.
-
isBoundsAvailable
public boolean isBoundsAvailable()Description copied from interface:ILcdXYWorldReferenceReturns if thisILcdXYWorldReferencehas bounds available.- Specified by:
isBoundsAvailablein interfaceILcdXYWorldReference- Returns:
trueif a 2DEditable bounds is available, false otherwise.- See Also:
-
get2DEditableBounds
Description copied from interface:ILcdXYWorldReferenceReturns the bounds of theILcdXYWorldReference.- Specified by:
get2DEditableBoundsin interfaceILcdXYWorldReference- Returns:
- if
isBoundsAvailable(), aILcd2DEditableBoundsthat 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:ILcdCloneableMakes
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:
clonein interfaceILcdCloneable- Overrides:
clonein classObject- See Also:
-
equals
-
hashCode
public int hashCode()
-