Package ucar.nc2.dt.ugrid.geom
Class Point3D.Double
java.lang.Object
ucar.nc2.dt.ugrid.geom.Point3D
ucar.nc2.dt.ugrid.geom.Point3D.Double
- All Implemented Interfaces:
Serializable,Cloneable
- Enclosing class:
- Point3D
The
Double class defines a point specified in double precision.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.nc2.dt.ugrid.geom.Point3D
Point3D.Double, Point3D.Float -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetX()Returns the X coordinate of thisPoint3Dindoubleprecision.doublegetY()Returns the Y coordinate of thisPoint3Dindoubleprecision.doublegetZ()Returns the Z coordinate of thisPoint3Dindoubleprecision.voidmoveBy(double dx, double dy, double dz) Moves thePoint3Dby the amount indicated by the specifieddoublemagnitudes.voidsetLocation(double x, double y, double z) Sets the location of thisPoint3Dto the specifieddoublecoordinates.toString()Returns aStringthat represents the value of thisPoint3D.Methods inherited from class ucar.nc2.dt.ugrid.geom.Point3D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, setLocation
-
Field Details
-
x
public double xThe X coordinate of thisPoint3D. -
y
public double yThe Y coordinate of thisPoint3D. -
z
public double zThe Z coordinate of thisPoint3D.
-
-
Constructor Details
-
Double
public Double()Constructs and initializes aPoint3Dwith coordinates (0, 0, 0). -
Double
public Double(double x, double y, double z) Constructs and initializes aPoint3Dwith the specified coordinates.- Parameters:
x- the X coordinate of the newly constructedPoint3Dy- the Y coordinate of the newly constructedPoint3Dz- the Z coordinate of the newly constructedPoint3D
-
-
Method Details
-
getX
public double getX()Returns the X coordinate of thisPoint3Dindoubleprecision. -
getY
public double getY()Returns the Y coordinate of thisPoint3Dindoubleprecision. -
getZ
public double getZ()Returns the Z coordinate of thisPoint3Dindoubleprecision. -
setLocation
public void setLocation(double x, double y, double z) Sets the location of thisPoint3Dto the specifieddoublecoordinates.- Specified by:
setLocationin classPoint3D- Parameters:
x- the new X coordinate of thisPoint3Dy- the new Y coordinate of thisPoint3Dz- the new Z coordinate of thisPoint3D
-
moveBy
public void moveBy(double dx, double dy, double dz) Moves thePoint3Dby the amount indicated by the specifieddoublemagnitudes.NOTE: Units are NOT considered. The units of the
originand(u, v, w)components are assumed to be the same.
Therefore conversions (i.e. from DD to Meters) should happen BEFORE calling this method. -
toString
Returns aStringthat represents the value of thisPoint3D.
-