Jeospace API

org.jeospace.coordinate
Class Cartesian

java.lang.Object
  extended byorg.jeospace.coordinate.Vector
      extended byorg.jeospace.coordinate.Cartesian

public class Cartesian
extends Vector

An object that represents a 3 dimensional cartesian coordinate.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton
See Also:
Axis, CartesianConvention, Length

Field Summary
 
Fields inherited from class org.jeospace.coordinate.Vector
X, Y, Z
 
Constructor Summary
Cartesian()
          Create a Cartesian coordinate object with default values.
Cartesian(Cartesian cart)
          Create a Cartesian coordinate object identical to the passed object.
Cartesian(double[] value, CartesianConvention conv, Length scale)
          Create a Cartesian coordinate object initialized with the given parameters.
Cartesian(double[] value, Length scale)
          Create a Cartesian coordinate object initialized with the given parameters.
Cartesian(double x, double y, double z, CartesianConvention conv, Length scale)
          Create a Cartesian coordinate object initialized with the given parameters.
Cartesian(double x, double y, double z, Length scale)
          Create a Cartesian coordinate object initialized with the given parameters.
Cartesian(float[] value, CartesianConvention conv, Length scale)
          Create a Cartesian coordinate object initialized with the given parameters.
Cartesian(float[] value, Length scale)
          Create a Cartesian coordinate object initialized with the given parameters.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare two Cartesian coordinate objects for equality.
 void get(CartesianConvention conv, double[] value)
          Get the double values for the coordinate points scaled by the Length object
 void get(CartesianConvention conv, float[] value)
          Get the float values for the coordinate points scaled by the Length object
 void get(CartesianConvention conv, Length scalor, double[] value)
          Get the double values for the coordinate points scaled by the Length object
 void get(CartesianConvention conv, Length scalor, float[] value)
          Get the float values for the coordinate points scaled by the Length object
 void get(Length scalor, double[] value)
          Get the double values for the coordinate points scaled by the Length object
 void get(Length scalor, float[] value)
          Get the float values for the coordinate points scaled by the Length object
 Length getMagnitude()
          Get the magnitude of the coordinate's radius vector, adjusted for scale
 void getMagnitude(Length magnitude)
          Get the magnitude of the coordinate's radius vector, adjusted for scale
 Length getScale()
          Get the coordinate's scalor object
 int hashCode()
          Calculate the hash code
 void set(Cartesian cart)
          Set the values for the coordinate points and scalor
 void set(double[] value, CartesianConvention conv, Length scale)
          Set the values for the coordinate points and scalor
 void set(double[] value, Length scale)
          Set the values for the coordinate points and scalor
 void set(double x, double y, double z, CartesianConvention conv, Length scale)
          Set the values for the coordinate points and scalor
 void set(double x, double y, double z, Length scale)
          Set the values for the coordinate points and scalor
 void set(float[] value, CartesianConvention conv, Length scale)
          Set the values for the coordinate points and scalor
 void set(float[] value, Length scale)
          Set the values for the coordinate points and scalor
 void setValues(Cartesian cart)
          Set the values for the coordinate points while retaining the scalor of this Cartesian
 java.lang.String toString()
          Return a string representation of this cartesian coordinate of the form "x, y, z".
 
Methods inherited from class org.jeospace.coordinate.Vector
clear, cross, dot, get, get, get, get, magnitude, negate, negate, normalize, scale, set, set, set, set
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Cartesian

public Cartesian()
Create a Cartesian coordinate object with default values.
coordinate values = 0, 0, 0
scale = 1 Meter


Cartesian

public Cartesian(double[] value,
                 CartesianConvention conv,
                 Length scale)
Create a Cartesian coordinate object initialized with the given parameters.

Parameters:
value - the double array of values in X, Y, and Z axis order
conv - the orientation convention of the value parameters
scale - the scalor value for the coordinate

Cartesian

public Cartesian(double[] value,
                 Length scale)
Create a Cartesian coordinate object initialized with the given parameters.

Parameters:
value - the double array of values in X, Y, and Z axis order
scale - the scalor value for the coordinate

Cartesian

public Cartesian(float[] value,
                 CartesianConvention conv,
                 Length scale)
Create a Cartesian coordinate object initialized with the given parameters.

Parameters:
value - the float array of values in X, Y, and Z axis order
conv - the orientation convention of the value parameters
scale - the scalor value for the coordinate

Cartesian

public Cartesian(float[] value,
                 Length scale)
Create a Cartesian coordinate object initialized with the given parameters.

Parameters:
value - the float array of values in X, Y, and Z axis order
scale - the scalor value for the coordinate

Cartesian

public Cartesian(double x,
                 double y,
                 double z,
                 CartesianConvention conv,
                 Length scale)
Create a Cartesian coordinate object initialized with the given parameters.

Parameters:
x - the X axis value
y - the Y axis value
z - the Z axis value
conv - the orientation convention of the x, y, z parameters
scale - the scalor value for the coordinate

Cartesian

public Cartesian(double x,
                 double y,
                 double z,
                 Length scale)
Create a Cartesian coordinate object initialized with the given parameters.

Parameters:
x - the X axis value
y - the Y axis value
z - the Z axis value
scale - the scalor value for the coordinate

Cartesian

public Cartesian(Cartesian cart)
Create a Cartesian coordinate object identical to the passed object.

Parameters:
cart - the Cartesian coordinate object to duplicate
Method Detail

set

public void set(Cartesian cart)
Set the values for the coordinate points and scalor

Parameters:
cart - the Cartesian object to duplicate

setValues

public void setValues(Cartesian cart)
Set the values for the coordinate points while retaining the scalor of this Cartesian

Parameters:
cart - the Cartesian object to duplicate

set

public void set(double x,
                double y,
                double z,
                CartesianConvention conv,
                Length scale)
Set the values for the coordinate points and scalor

Parameters:
x - the X axis value
y - the Y axis value
z - the Z axis value
conv - the orientation convention of the x, y, z parameters
scale - the scalor value for the coordinate

set

public void set(double x,
                double y,
                double z,
                Length scale)
Set the values for the coordinate points and scalor

Parameters:
x - the X axis value
y - the Y axis value
z - the Z axis value
scale - the scalor value for the coordinate

set

public void set(double[] value,
                CartesianConvention conv,
                Length scale)
Set the values for the coordinate points and scalor

Parameters:
value - the double array of values in X, Y, and Z axis order
conv - the orientation convention of the value parameters
scale - the scalor value for the coordinate

set

public void set(double[] value,
                Length scale)
Set the values for the coordinate points and scalor

Parameters:
value - the double array of values in X, Y, and Z axis order
scale - the scalor value for the coordinate

set

public void set(float[] value,
                CartesianConvention conv,
                Length scale)
Set the values for the coordinate points and scalor

Parameters:
value - the float array of values in X, Y, and Z axis order
conv - the orientation convention of the parameter values
scale - the scalor value for the coordinate

set

public void set(float[] value,
                Length scale)
Set the values for the coordinate points and scalor

Parameters:
value - the float array of values in X, Y, and Z axis order
scale - the scalor value for the coordinate

get

public void get(CartesianConvention conv,
                double[] value)
Get the double values for the coordinate points scaled by the Length object

Parameters:
conv - the orientation convention of the parameter values
value - the double array to be initialized with the values in X, Y, and Z axis order

get

public void get(CartesianConvention conv,
                Length scalor,
                double[] value)
Get the double values for the coordinate points scaled by the Length object

Parameters:
conv - the orientation convention of the parameter values
scalor - the scaling Length object
value - the double array to be initialized with the values in X, Y, and Z axis order

get

public void get(Length scalor,
                double[] value)
Get the double values for the coordinate points scaled by the Length object

Parameters:
scalor - the scaling Length object
value - the double array to be initialized with the values in X, Y, and Z axis order

get

public void get(CartesianConvention conv,
                float[] value)
Get the float values for the coordinate points scaled by the Length object

Parameters:
conv - the orientation convention of the parameter values
value - the float array to be initialized with the values in X, Y, and Z axis order

get

public void get(CartesianConvention conv,
                Length scalor,
                float[] value)
Get the float values for the coordinate points scaled by the Length object

Parameters:
conv - the orientation convention of the parameter values
scalor - the scaling Length object
value - the float array to be initialized with the values in X, Y, and Z axis order

get

public void get(Length scalor,
                float[] value)
Get the float values for the coordinate points scaled by the Length object

Parameters:
scalor - the scaling Length object
value - the float array to be initialized with the values in X, Y, and Z axis order

getMagnitude

public Length getMagnitude()
Get the magnitude of the coordinate's radius vector, adjusted for scale

Returns:
the Length value for radius vector

getMagnitude

public void getMagnitude(Length magnitude)
Get the magnitude of the coordinate's radius vector, adjusted for scale

Parameters:
magnitude - the Length value for radius vector

getScale

public Length getScale()
Get the coordinate's scalor object

Returns:
the Length object representing the coordinate's scalor

hashCode

public int hashCode()
Calculate the hash code

Overrides:
hashCode in class Vector
Returns:
the hash code

equals

public boolean equals(java.lang.Object obj)
Compare two Cartesian coordinate objects for equality. The result is true if and only if the argument object is not null, is a Cartesian coordinate object and represents an identical position as this Cartesian coordinate object.

Two Cartesian coordinate objects are equal only if it's constituent coordinate array, type and Length objects are equal.

Overrides:
equals in class Vector
Parameters:
obj - the object to compare with
Returns:
true if the Cartesian coordinate objects are the same; false otherwise.

toString

public java.lang.String toString()
Return a string representation of this cartesian coordinate of the form "x, y, z".

Overrides:
toString in class Vector
Returns:
a string representation of this cartesian coordinate

Jeospace API

Copyright © 2006 - jeospace.org