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.

This reference can be used to specify any non geospatial 2D X/Y plane or 3D X/Y/Z volume.
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 Details

    • TLcdCartesianReference

      public TLcdCartesianReference()
      Creates a new cartesian reference with unspecified X, Y and Z axes.
    • TLcdCartesianReference

      public TLcdCartesianReference(ILcdISO19103UnitOfMeasure aXAxis, ILcdISO19103UnitOfMeasure aYAxis)
      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

      public ILcdISO19103UnitOfMeasure 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

      public ILcdISO19103UnitOfMeasure 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

      public ILcdISO19103UnitOfMeasure 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

      public void loadProperties(String aPrefix, Properties aProperties) throws IllegalArgumentException
      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 interface ILcdModelReference
      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 specified Properties object as a side effect. Each particular implementation of this interface can define which properties it stores.
      Specified by:
      writePropertiesSFCT in interface ILcdModelReference
      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

      public ILcdPoint 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 interface ILcdModelReference
      Returns:
      a point that is compatible with this model reference.
    • isBoundsAvailable

      public boolean isBoundsAvailable()
      Description copied from interface: ILcdXYWorldReference
      Returns if this ILcdXYWorldReference has bounds available.
      Specified by:
      isBoundsAvailable in interface ILcdXYWorldReference
      Returns:
      true if a 2DEditable bounds is available, false otherwise.
      See Also:
    • get2DEditableBounds

      public ILcd2DEditableBounds get2DEditableBounds()
      Description copied from interface: ILcdXYWorldReference
      Returns the bounds of the ILcdXYWorldReference.
      Specified by:
      get2DEditableBounds in interface ILcdXYWorldReference
      Returns:
      if 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;.
    • clone

      public Object clone()
      Description copied from interface: ILcdCloneable

      Makes Object.clone() public.

      When for example extending from 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 interface ILcdCloneable
      Overrides:
      clone in class Object
      See Also:
    • equals

      public boolean equals(Object aO)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object