org.apache.commons.math3.geometry.euclidean.threed

## Class OutlineExtractor

- java.lang.Object
- - org.apache.commons.math3.geometry.euclidean.threed.OutlineExtractor

-     public class OutlineExtractor
      extends Object

  Extractor for `polyhedrons sets` outlines.

  This class extracts the 2D outlines from {`polyhedrons sets` in a specified projection plane.

  Since:
    3.0
  Version:
    $Id: OutlineExtractor.java 1416643 2012-12-03 19:37:14Z tn $

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `private class` | `OutlineExtractor.BoundaryProjector` Visitor projecting the boundary facets on a plane.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Vector3D` | `u` Abscissa axis of the projection plane.
    `private Vector3D` | `v` Ordinate axis of the projection plane.
    `private Vector3D` | `w` Normal of the projection plane (viewing direction).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OutlineExtractor(Vector3D u, Vector3D v)` Build an extractor for a specific projection plane.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Vector2D[][]` | `getOutline(PolyhedronsSet polyhedronsSet)` Extract the outline of a polyhedrons set.
    `private boolean` | `pointIsBetween(Vector2D[] loop, int n, int i)` Check if a point is geometrically between its neighbour in an array.

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

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

- - ### Field Detail

    - #### u

          private Vector3D u

      Abscissa axis of the projection plane.

    - #### v

          private Vector3D v

      Ordinate axis of the projection plane.

    - #### w

          private Vector3D w

      Normal of the projection plane (viewing direction).

  - ### Constructor Detail

    - #### OutlineExtractor

          public OutlineExtractor(Vector3D u,
                          Vector3D v)

      Build an extractor for a specific projection plane.
      Parameters:
        `u` - abscissa axis of the projection point
        `v` - ordinate axis of the projection point

  - ### Method Detail

    - #### getOutline

          public Vector2D[][] getOutline(PolyhedronsSet polyhedronsSet)

      Extract the outline of a polyhedrons set.
      Parameters:
        `polyhedronsSet` - polyhedrons set whose outline must be extracted
      Returns:
        an outline, as an array of loops.

    - #### pointIsBetween

          private boolean pointIsBetween(Vector2D[] loop,
                               int n,
                               int i)

      Check if a point is geometrically between its neighbour in an array.

      The neighbours are computed considering the array is a loop (i.e. point at index (n-1) is before point at index 0)

      Parameters:
        `loop` - points array
        `n` - number of points to consider in the array
        `i` - index of the point to check (must be between 0 and n-1)
      Returns:
        true if the point is exactly between its neighbours

Copyright (c) 2003-2013 Apache Software Foundation