nl.tudelft.simulation.language.d3
Class CartesianPoint

java.lang.Object
  extended by javax.vecmath.Tuple3d
      extended by javax.vecmath.Point3d
          extended by nl.tudelft.simulation.language.d3.CartesianPoint
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
DirectedPoint

public class CartesianPoint
extends Point3d

The Point3D class with utilities to convert to point2D where the z-axis is neglected.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.

See for project information www.simulation.tudelft.nl/language
License of use: Lesser General Public License (LGPL) , no warranty

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:54 $
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.vecmath.Tuple3d
x, y, z
 
Constructor Summary
CartesianPoint()
          constructs a new CartesianPoint
CartesianPoint(double[] xyz)
          constructs a new CartesianPoint
CartesianPoint(double x, double y, double z)
          constructs a new CartesianPoint
CartesianPoint(Point2D point2D)
          constructs a new CartesianPoint
CartesianPoint(Point3d point)
          constructs a new CartesianPoint
CartesianPoint(Point3f point)
          constructs a new CartesianPoint
CartesianPoint(Tuple3d tuple)
          constructs a new CartesianPoint
CartesianPoint(Tuple3f tuple)
          constructs a new CartesianPoint
 
Method Summary
 Point2D to2D()
          returns the 2D representation of the point
 SphericalPoint toCartesianPoint()
          converts the point to a sperical point
static SphericalPoint toSphericalPoint(CartesianPoint point)
          converts a cartesian point to a sperical point
 
Methods inherited from class javax.vecmath.Point3d
distance, distanceL1, distanceLinf, distanceSquared, project
 
Methods inherited from class javax.vecmath.Tuple3d
absolute, absolute, add, add, clamp, clamp, clamp, clamp, clampMax, clampMax, clampMax, clampMax, clampMin, clampMin, clampMin, clampMin, clone, epsilonEquals, equals, equals, get, get, getX, getY, getZ, hashCode, interpolate, interpolate, interpolate, interpolate, negate, negate, scale, scale, scaleAdd, scaleAdd, scaleAdd, set, set, set, set, setX, setY, setZ, sub, sub, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CartesianPoint

public CartesianPoint(double x,
                      double y,
                      double z)
constructs a new CartesianPoint

Parameters:
x - x
y - y
z - z

CartesianPoint

public CartesianPoint(double[] xyz)
constructs a new CartesianPoint

Parameters:
xyz - x,y,z

CartesianPoint

public CartesianPoint(Point3d point)
constructs a new CartesianPoint

Parameters:
point - point3d

CartesianPoint

public CartesianPoint(Point3f point)
constructs a new CartesianPoint

Parameters:
point - point3d

CartesianPoint

public CartesianPoint(Tuple3f tuple)
constructs a new CartesianPoint

Parameters:
tuple - tuple

CartesianPoint

public CartesianPoint(Tuple3d tuple)
constructs a new CartesianPoint

Parameters:
tuple - point3d

CartesianPoint

public CartesianPoint(Point2D point2D)
constructs a new CartesianPoint

Parameters:
point2D - a 2D point

CartesianPoint

public CartesianPoint()
constructs a new CartesianPoint

Method Detail

to2D

public Point2D to2D()
returns the 2D representation of the point

Returns:
Point2D the result

toCartesianPoint

public SphericalPoint toCartesianPoint()
converts the point to a sperical point

Returns:
the spherical point

toSphericalPoint

public static SphericalPoint toSphericalPoint(CartesianPoint point)
converts a cartesian point to a sperical point

Parameters:
point - the cartesian point
Returns:
the spherical point


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.