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.
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.TLcdDefaultModelXYZWorldTransformation
,
Serialized FormConstructor and Description |
---|
TLcdCartesianReference()
Creates 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.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes
Object.clone() public. |
boolean |
equals(Object aO) |
ILcd2DEditableBounds |
get2DEditableBounds()
Returns the bounds of the
ILcdXYWorldReference . |
ILcdISO19103UnitOfMeasure |
getXAxisUnit()
Returns the unit of measure of the X axis associated with this reference.
|
ILcdISO19103UnitOfMeasure |
getYAxisUnit()
Returns the unit of measure of the Y axis associated with this reference.
|
ILcdISO19103UnitOfMeasure |
getZAxisUnit()
Returns the unit of measure of the Z axis associated with this reference.
|
int |
hashCode() |
boolean |
isBoundsAvailable()
Returns if this
ILcdXYWorldReference has bounds available. |
void |
loadProperties(String aPrefix,
Properties aProperties)
Initializes this model reference based on the information in the specified properties.
|
ILcdPoint |
makeModelPoint()
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 specified
Properties object as a side
effect. |
public TLcdCartesianReference()
public TLcdCartesianReference(ILcdISO19103UnitOfMeasure aXAxis, ILcdISO19103UnitOfMeasure aYAxis)
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.public TLcdCartesianReference(ILcdISO19103UnitOfMeasure aXAxis, ILcdISO19103UnitOfMeasure aYAxis, ILcdISO19103UnitOfMeasure aZAxis)
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.public ILcdISO19103UnitOfMeasure getXAxisUnit()
public ILcdISO19103UnitOfMeasure getYAxisUnit()
public ILcdISO19103UnitOfMeasure getZAxisUnit()
public void loadProperties(String aPrefix, Properties aProperties) throws IllegalArgumentException
ILcdModelReference
loadProperties
in interface ILcdModelReference
aPrefix
- a common prefix for all property names that are read.aProperties
- the properties to be parsed.IllegalArgumentException
- if the model reference cannot be constructed from the properties.public void writePropertiesSFCT(String aPrefix, Properties aPropertiesSFCT) throws IllegalArgumentException
ILcdModelReference
Properties
object as a side
effect.
Each particular implementation of this interface can define which properties it stores.writePropertiesSFCT
in interface ILcdModelReference
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.IllegalArgumentException
- if the model reference cannot be serialized into properties.public ILcdPoint makeModelPoint()
ILcdModelReference
makeModelPoint
in interface ILcdModelReference
public boolean isBoundsAvailable()
ILcdXYWorldReference
ILcdXYWorldReference
has bounds available.isBoundsAvailable
in interface ILcdXYWorldReference
true
if a 2DEditable bounds is available, false otherwise.ILcdXYWorldReference.get2DEditableBounds()
public ILcd2DEditableBounds get2DEditableBounds()
ILcdXYWorldReference
ILcdXYWorldReference
.get2DEditableBounds
in interface ILcdXYWorldReference
isBoundsAvailable()
, a ILcd2DEditableBounds
that contains
all the 2D shapes of all the objects in world coordinates
using the given ILcdXYWorldReference
.
Returns only a valid value if isBoundsAvailable()
is true
;.public Object clone()
ILcdCloneable
Makes Object.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 );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()