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

## com.vividsolutions.jts.algorithm
Class VectorMath

    java.lang.Object
      com.vividsolutions.jts.algorithm.VectorMath

public class VectorMath
extends java.lang.Object

Functions for performing vector mathematics.

Version:
  1.0
Author:
  Martin Davis

Constructor Summary
`VectorMath()`

Method Summary
`static Coordinate` | `crossProduct(Coordinate v1, Coordinate v2)`
`static double` | `det(double a1, double a2, double b1, double b2)`
`static double` | `dotProduct(Coordinate v1, Coordinate v2)`
`static void` | `normalize(Coordinate v)`
`static Coordinate` | `normalToTriangle(Coordinate p0, Coordinate p1, Coordinate p2)` Computes the normal vector to the triangle p0-p1-p2.

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

Constructor Detail

### VectorMath

    public VectorMath()

Method Detail

### normalToTriangle

    public static Coordinate normalToTriangle(Coordinate p0,
                                              Coordinate p1,
                                              Coordinate p2)

  Computes the normal vector to the triangle p0-p1-p2. In order to compute the normal each triangle coordinate must have a Z value. If this is not the case, the returned Coordinate will have NaN values. The returned vector has unit length.

  Parameters:
    `p0` -
    `p1` -
    `p2` -
  Returns:

### normalize

    public static void normalize(Coordinate v)

### crossProduct

    public static Coordinate crossProduct(Coordinate v1,
                                          Coordinate v2)

### dotProduct

    public static double dotProduct(Coordinate v1,
                                    Coordinate v2)

### det

    public static double det(double a1,
                             double a2,
                             double b1,
                             double b2)

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