com.tensegrity.graphics
Class ScaleValues

java.lang.Object
  extended bycom.tensegrity.graphics.ScaleValues

public class ScaleValues
extends java.lang.Object

The ScaleValues class represent an object that is capable to hold scale values for different directions.

Version:
$Id: ScaleValues.java,v 1.1 2004/03/08 13:43:15 MichaelKegel Exp $
Author:
MKegel

Field Summary
static ScaleValues DEFAULT_SCALEVALUES
          constant that defines an default zoom values object (NOTICE never change the instance variables of this object - use the copy constructor instead and change the instance variables of the copy)
 double[] scales
          instance variable for the single components of the scale values
static double UNDEFINED
          constant that marks an undefined scale value
static int X_SCALE
          constant that tells about the indices of the scale values components
static int Y_SCALE
          constant that tells about the indices of the scale values components
static int Z_SCALE
          constant that tells about the indices of the scale values components
 
Constructor Summary
ScaleValues()
          Default constructor for ScaleValues that initializes it for 2D space.
ScaleValues(double[] scales)
          Constructor for ScaleValues with an array of scale values given by scales for a non fixed number of dimensions.
ScaleValues(double scaleX, double scaleY)
          Constructor for ScaleValues with given scales for the x axis and the y axis.
ScaleValues(double scaleX, double scaleY, double scaleZ)
          Constructor for ScaleValues with given scales for the x axis, the y axis and the z axis.
ScaleValues(ScaleValues scalevalues)
          Copy constructor for ScaleValues.
 
Method Summary
 int getDimensions()
          Returns the number of dimensions this ScaleValues consist of.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X_SCALE

public static final int X_SCALE
constant that tells about the indices of the scale values components

See Also:
Constant Field Values

Y_SCALE

public static final int Y_SCALE
constant that tells about the indices of the scale values components

See Also:
Constant Field Values

Z_SCALE

public static final int Z_SCALE
constant that tells about the indices of the scale values components

See Also:
Constant Field Values

UNDEFINED

public static final double UNDEFINED
constant that marks an undefined scale value

See Also:
Constant Field Values

DEFAULT_SCALEVALUES

public static final ScaleValues DEFAULT_SCALEVALUES
constant that defines an default zoom values object (NOTICE never change the instance variables of this object - use the copy constructor instead and change the instance variables of the copy)


scales

public double[] scales
instance variable for the single components of the scale values

Constructor Detail

ScaleValues

public ScaleValues()
Default constructor for ScaleValues that initializes it for 2D space.


ScaleValues

public ScaleValues(double scaleX,
                   double scaleY)
Constructor for ScaleValues with given scales for the x axis and the y axis.

Parameters:
scaleX - the scale value on the x axis
scaleY - the scale value on the y axis

ScaleValues

public ScaleValues(double scaleX,
                   double scaleY,
                   double scaleZ)
Constructor for ScaleValues with given scales for the x axis, the y axis and the z axis.

Parameters:
scaleX - the scale value on the x axis
scaleY - the scale value on the y axis
scaleZ - the scale value on the z axis

ScaleValues

public ScaleValues(double[] scales)
Constructor for ScaleValues with an array of scale values given by scales for a non fixed number of dimensions.

Parameters:
scales - the scale values on the different axes

ScaleValues

public ScaleValues(ScaleValues scalevalues)
Copy constructor for ScaleValues.

Parameters:
scalevalues - the ScaleValues instance to create a copy of
Method Detail

getDimensions

public int getDimensions()
Returns the number of dimensions this ScaleValues consist of.

Returns:
int the number of dimension


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