Class Point3D.Float

java.lang.Object
ucar.nc2.dt.ugrid.geom.Point3D
ucar.nc2.dt.ugrid.geom.Point3D.Float
All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
Point3D

public static class Point3D.Float extends Point3D implements Serializable
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class ucar.nc2.dt.ugrid.geom.Point3D

    Point3D.Double, Point3D.Float
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
    The X coordinate of this Point3D.
    float
    The Y coordinate of this Point3D.
    float
    The Z coordinate of this Point3D.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs and initializes a Point3D with coordinates (0, 0, 0).
    Float(float x, float y, float z)
    Constructs and initializes a Point3D with the specified coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the X coordinate of this Point3D in double precision.
    double
    Returns the Y coordinate of this Point3D in double precision.
    double
    Returns the Z coordinate of this Point3D in double precision.
    void
    moveBy(double dx, double dy, double dz)
    Moves the Point3D by the amount indicated by the specified double magnitudes.
    void
    moveBy(float dx, float dy, float dz)
    Moves the Point3D by the amount indicated by the specified float magnitudes.
    void
    setLocation(double x, double y, double z)
    Sets the location of this Point3D to the specified double coordinates.
    void
    setLocation(float x, float y, float z)
    Sets the location of this Point3D to the specified float coordinates.
    Returns a String that represents the value of this Point3D.

    Methods inherited from class ucar.nc2.dt.ugrid.geom.Point3D

    clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, setLocation

    Methods inherited from class java.lang.Object

    finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      public float x
      The X coordinate of this Point3D.
    • y

      public float y
      The Y coordinate of this Point3D.
    • z

      public float z
      The Z coordinate of this Point3D.
  • Constructor Details

    • Float

      public Float()
      Constructs and initializes a Point3D with coordinates (0, 0, 0).
    • Float

      public Float(float x, float y, float z)
      Constructs and initializes a Point3D with the specified coordinates.
      Parameters:
      x - the X coordinate of the newly constructed Point3D
      y - the Y coordinate of the newly constructed Point3D
      z - the Z coordinate of the newly constructed Point3D
  • Method Details

    • getX

      public double getX()
      Returns the X coordinate of this Point3D in double precision.
      Specified by:
      getX in class Point3D
      Returns:
      the X coordinate of this Point3D.
    • getY

      public double getY()
      Returns the Y coordinate of this Point3D in double precision.
      Specified by:
      getY in class Point3D
      Returns:
      the Y coordinate of this Point3D.
    • getZ

      public double getZ()
      Returns the Z coordinate of this Point3D in double precision.
      Specified by:
      getZ in class Point3D
      Returns:
      the Z coordinate of this Point3D.
    • setLocation

      public void setLocation(double x, double y, double z)
      Sets the location of this Point3D to the specified double coordinates.
      Specified by:
      setLocation in class Point3D
      Parameters:
      x - the new X coordinate of this Point3D
      y - the new Y coordinate of this Point3D
      z - the new Z coordinate of this Point3D
    • setLocation

      public void setLocation(float x, float y, float z)
      Sets the location of this Point3D to the specified float coordinates.
      Parameters:
      x - the new X coordinate of this Point3D
      y - the new Y coordinate of this Point3D
      z - the new Z coordinate of this Point3D
    • moveBy

      public void moveBy(double dx, double dy, double dz)
      Moves the Point3D by the amount indicated by the specified double magnitudes.

      NOTE: Units are NOT considered. The units of the origin and (u, v, w) components are assumed to be the same.
      Therefore conversions (i.e. from DD to Meters) should happen BEFORE calling this method.

      Specified by:
      moveBy in class Point3D
      Parameters:
      dx - the amount to move this Point3D in the X direction
      dy - the amount to move this Point3D in the Y direction
      dz - the amount to move this Point3D in the Z direction
    • moveBy

      public void moveBy(float dx, float dy, float dz)
      Moves the Point3D by the amount indicated by the specified float magnitudes.

      NOTE: Units are NOT considered. The units of the origin and (u, v, w) components are assumed to be the same.
      Therefore conversions (i.e. from DD to Meters) should happen BEFORE calling this method.

      Parameters:
      dx - the amount to move this Point3D in the X direction
      dy - the amount to move this Point3D in the Y direction
      dz - the amount to move this Point3D in the Z direction
    • toString

      public String toString()
      Returns a String that represents the value of this Point3D.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this Point3D.