org.eclipse.gef.geometry.projective

## Class Straight3D

- java.lang.Object
- - org.eclipse.gef.geometry.projective.Straight3D

    public final class Straight3D
    extends Object

A two-dimensional infinite line that is defined by three coordinates of which the third is a so called homogeneous coordinate. Calculations are easier to do on such lines:

- the point of intersection between two lines is the cross product of their respective three dimensional vectors
- the distance from a point to the line is the scalar product of both three dimensional vectors

This is the complement to the `Vector3D` which represents a `Point` with a third, homogeneous coordinate.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Vector3D` `getIntersection(Straight3D other)` Returns the intersection between this and the given other `Straight3D`.
`Straight3D` `getOrtho()` Returns the orthogonal `Straight3D` through this `Straight3D` 's start `Vector3D`.
`Straight3D` `getOrtho(Vector3D vp)` Returns the orthogonal `Straight3D` through the given `Vector3D`.
`double` `getSignedDistanceCW(Vector3D vp)` Returns the clock-wise signed distance of the given `Vector3D` to this `Straight3D`.
`static Straight3D` `through(Vector3D start, Vector3D end)` Constructs a new `Straight3D` through the given start and end `Vector3D`s.
`Straight` `toStraight()` Transfer this `Straight3D` into a representative `Straight`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### through

    public static Straight3D through(Vector3D start,
                                     Vector3D end)

Constructs a new `Straight3D` through the given start and end `Vector3D`s.

Parameters:
  `start` - The first `Vector3D` which lies on to the `Straight3D` which is constructed.
  `end` - The second `Vector3D` which lies on the `Straight3D` which is constructed.
Returns:
  a new `Straight3D` through start and end `Vector3D`s

#### getIntersection

    public Vector3D getIntersection(Straight3D other)

Returns the intersection between this and the given other `Straight3D`. The intersection is the cross product of both `Vector3D`s.

Parameters:
  `other` - The `Straight3D` for which intersections are computed.
Returns:
  the intersection between this and the given other `Straight3D`

#### getOrtho

    public Straight3D getOrtho()

Returns the orthogonal `Straight3D` through this `Straight3D` 's start `Vector3D`.

Returns:
  the orthogonal `Straight3D` through this `Straight3D` 's start `Vector3D`

#### getOrtho

    public Straight3D getOrtho(Vector3D vp)

Returns the orthogonal `Straight3D` through the given `Vector3D`.

Parameters:
  `vp` - The `Vector3D` which lies on the orthogonal `Straight3D`.
Returns:
  the orthogonal `Straight3D` through the given `Vector3D`

#### getSignedDistanceCW

    public double getSignedDistanceCW(Vector3D vp)

Returns the clock-wise signed distance of the given `Vector3D` to this `Straight3D`. The clock-wise signed distance is the dot product of the both `Vector3D`s divided by the length of the line's (x,y) vector: `|(x,y)|`.

Parameters:
  `vp` - The `Vector3D` to which the distance is computed.
Returns:
  the clock-wise signed distance of the `Vector3D` to this `Straight3D`

#### toStraight

    public Straight toStraight()

Transfer this `Straight3D` into a representative `Straight`.

Returns:
  a representative `Straight`