Overview | Package | Class | Tree | Deprecated | Index | Help
| JTS Topology Suite version 1.13
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.math
Class Vector3D

    java.lang.Object
      com.vividsolutions.jts.math.Vector3D

    public class Vector3D

extends java.lang.Object

Represents a vector in 3-dimensional Cartesian space.

Author:
  mdavis

Constructor Summary
`Vector3D(Coordinate v)`
`Vector3D(Coordinate from, Coordinate to)`
`Vector3D(double x, double y, double z)`

Method Summary
`static Vector3D` | `create(Coordinate coord)` Creates a vector from a `Coordinate`.
`static Vector3D` | `create(double x, double y, double z)` Creates a new vector with given X and Y components.
`static double` | `dot(Coordinate v1, Coordinate v2)` Computes the 3D dot-product of two `Coordinate`s.
`static double` | `dot(Coordinate A, Coordinate B, Coordinate C, Coordinate D)` Computes the dot product of the 3D vectors AB and CD.
`double` | `dot(Vector3D v)` Computes the dot-product of two vectors
`double` | `getX()`
`double` | `getY()`
`double` | `getZ()`
`double` | `length()`
`static double` | `length(Coordinate v)`
`Vector3D` | `normalize()`
`static Coordinate` | `normalize(Coordinate v)`
`java.lang.String` | `toString()` Gets a string representation of this vector

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Vector3D

    public Vector3D(Coordinate v)

### Vector3D

    public Vector3D(Coordinate from,
                    Coordinate to)

### Vector3D

    public Vector3D(double x,
                    double y,
                    double z)

Method Detail

### dot

    public static double dot(Coordinate A,
                             Coordinate B,
                             Coordinate C,
                             Coordinate D)

  Computes the dot product of the 3D vectors AB and CD.

  Parameters:
    `A` -
    `B` -
    `C` -
    `D` -
  Returns:
    the dot product

### create

    public static Vector3D create(double x,
                                  double y,
                                  double z)

  Creates a new vector with given X and Y components.

  Parameters:
    `x` - the x component
    `y` - the y component
    `z` - the z component
  Returns:
    a new vector

### create

    public static Vector3D create(Coordinate coord)

  Creates a vector from a `Coordinate`.

  Parameters:
    `coord` - the Coordinate to copy
  Returns:
    a new vector

### dot

    public static double dot(Coordinate v1,
                             Coordinate v2)

  Computes the 3D dot-product of two `Coordinate`s.

  Parameters:
    `v1` - the first vector
    `v2` - the second vector
  Returns:
    the dot product of the vectors

### getX

    public double getX()

### getY

    public double getY()

### getZ

    public double getZ()

### dot

    public double dot(Vector3D v)

  Computes the dot-product of two vectors

  Parameters:
    `v` - a vector
  Returns:
    the dot product of the vectors

### length

    public double length()

### length

    public static double length(Coordinate v)

### normalize

    public Vector3D normalize()

### normalize

    public static Coordinate normalize(Coordinate v)

### toString

    public java.lang.String toString()

  Gets a string representation of this vector

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representing this vector

Overview | Package | Class | Tree | Deprecated | Index | Help
| JTS Topology Suite version 1.13
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD