com.tensegrity.composite.coordinate
Class MutableCoordinateSystem

java.lang.Object
  extended bycom.tensegrity.composite.coordinate.CoordinateSystem
      extended bycom.tensegrity.composite.coordinate.MutableCoordinateSystem

public class MutableCoordinateSystem
extends CoordinateSystem

The MutableCoordinateSystem is a generalization of the CoordinateSystem. Therefore it is neccessary to read the documentation of the CoordinateSystem class to have an understanding of the basics for a CoordinateSystem.

Since a CoordinateSystem is immutable but mutable coordinate systems are also needed this class represents such a coordinate system. The Scales a MutableCoordinateSystem uses must also be mutable. To get informations about how to create and how to work with mutable scales please see the documentation of MutableScale.

The methods a MutableCoordinateSystem provides to modify it are as follows:

Notice that instances of MutableCoordinateSystem are not part of the pooling mechanism for CoordinateSystems.

Version:
$Id: MutableCoordinateSystem.java,v 1.7 2005/04/01 15:45:16 MichaelKegel Exp $
Author:
MichaelKegel

Field Summary
 
Fields inherited from class com.tensegrity.composite.coordinate.CoordinateSystem
DEFAULT_SYSTEM, SCALE_X, SCALE_Y, SCALE_Z, scales
 
Constructor Summary
MutableCoordinateSystem(MutableCoordinateSystem coordSystem)
          Constructor for MutableCoordinateSystem that creates a copy of the MutableCoordinateSystem given by coordSystem.
MutableCoordinateSystem(MutableScale scaleX, MutableScale scaleY)
          Constructor for MutableCoordinateSystem with MutableScales given by scaleX and scaleY for the x direction and the y direction.
 
Method Summary
 MutableScale getScale(int direction)
          Returns the MutableScale for the direction given by direction.
 void setScaleRange(int direction, double minimum, double maximum)
          Sets the scale range at the MutableScale for the direction given by direction to the values given by minimum and maximum.
 
Methods inherited from class com.tensegrity.composite.coordinate.CoordinateSystem
descale, equals, getCanonicalDescription, getScaleMaximum, getScaleMinimum, getScaleRange, getTransform2D_inverse, getTransform2D, hashCode, scale, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutableCoordinateSystem

public MutableCoordinateSystem(MutableScale scaleX,
                               MutableScale scaleY)
Constructor for MutableCoordinateSystem with MutableScales given by scaleX and scaleY for the x direction and the y direction.

Parameters:
scaleX - the MutableScale for the x direction
scaleY - the MutableScale for the y direction

MutableCoordinateSystem

public MutableCoordinateSystem(MutableCoordinateSystem coordSystem)
Constructor for MutableCoordinateSystem that creates a copy of the MutableCoordinateSystem given by coordSystem.

Parameters:
coordSystem - the MutableCoordinateSystem to create a copy of
Method Detail

getScale

public MutableScale getScale(int direction)
Returns the MutableScale for the direction given by direction.

Parameters:
direction - the direction to return the MutableScale for. Valid values are:
Returns:
the MutableScale for the requested direction.

setScaleRange

public void setScaleRange(int direction,
                          double minimum,
                          double maximum)
Sets the scale range at the MutableScale for the direction given by direction to the values given by minimum and maximum.

Parameters:
direction - the direction of the MutableScale to set the scale range for
minimum - the minimum value of the new scale range
maximum - the maximum value of the new scale range


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.