Interface OrientablePrimitive

All Superinterfaces:
Cloneable, Comparable, Geometry, org.gvsig.tools.util.GetItem<Point>, org.gvsig.tools.util.IsEmpty, Primitive, Serializable, Shape, org.gvsig.tools.util.Size
All Known Subinterfaces:
Arc, Circle, Circumference, Curve, Ellipse, EllipticArc, FilledSpline, Line, OrientableCurve, OrientableSurface, PeriEllipse, Polygon, Ring, Spline, Surface

public interface OrientablePrimitive extends Primitive, org.gvsig.tools.util.IsEmpty, org.gvsig.tools.util.Size, org.gvsig.tools.util.GetItem<Point>

This interface is equivalent to the GM_OrientablePrimitive specified in ISO 19107. Orientable primitives are those that can be mirrored into new geometric objects in terms of their internal local coordinate systems (manifold charts).

For curves, the orientation reflects the direction in which the curve is traversed, that is, the sense of its parameterization. When used as boundary curves, the surface being bounded is to the "left" of the oriented curve.

For surfaces, the orientation reflects from which direction the local coordinate system can be viewed as right handed, the "top" or the surface being the direction of a completing z-axis that would form a right-handed system.

When used as a boundary surface, the bounded solid is "below" the surface. The orientation of points and solids has no immediate geometric interpretation in 3-dimensional space.

OrientablePrimitive objects are essentially references to geometric primitives that carry an "orientation" reversal flag (either "+" or "-") that determines whether this primitive agrees or disagrees with the orientation of the referenced object.

Author:
Jorge Piera
See Also:
  • Method Details

    • getCoordinateAt

      double getCoordinateAt(int index, int dimension)
      Gets the one of the values of a coordinate (direct position) in a concrete dimension.
      Parameters:
      index - The index of the direct position to set.
      dimension - The dimension of the direct position.
      Returns:
      The value of the coordinate
    • setCoordinateAt

      OrientablePrimitive setCoordinateAt(int index, int dimension, double value)
      Sets the value of a coordinate (direct position) in a concrete dimension
      Parameters:
      index - The index of the direct position to set
      dimension - The dimension of the direct position
      value - The value to set
      Returns:
    • addVertex

      OrientablePrimitive addVertex(Point point)
      Adds a vertex (or direct position) to the curve
      Parameters:
      point - The new point to add
      Returns:
    • addVertex

      OrientablePrimitive addVertex(double x, double y)
      Utility method for add a vertex
      Parameters:
      x -
      y -
      Returns:
      See Also:
    • addVertex

      OrientablePrimitive addVertex(double x, double y, double z)
      Utility method for add a vertex
      Parameters:
      x -
      y -
      z -
      Returns:
      See Also:
    • removeVertex

      void removeVertex(int index)
      Remove a vertex (direct position) to the curve
      Parameters:
      index - The index of the vertex to remove
    • getVertex

      Point getVertex(int index)
      Gets a vertex (direct position)
      Parameters:
      index - The index of the vertex to get
      Returns:
      One point
    • getNumVertices

      int getNumVertices()
      Gets the number of vertices (direct positions) of the curve
      Returns:
      The number of vertices
    • insertVertex

      OrientablePrimitive insertVertex(int index, Point p)
      Inserts a vertex (direct position) to the curve.
      Parameters:
      index - The index of the vertex where the new point has to be added.
      p - The vertex to add.
      Returns:
    • setVertex

      OrientablePrimitive setVertex(int index, Point p)
      Sets a vertex in a concrete position and replaces the previous one that was in this position.
      Parameters:
      index - The index of the vertex where the new point has to be replaced.
      p - The vertex to set.
      Returns:
    • setGeneralPath

      void setGeneralPath(GeneralPathX generalPathX)
      Sets all the coordinates of the curve
      Parameters:
      generalPathX - The generalPath that contains all the coordinates
    • addMoveToVertex

      void addMoveToVertex(Point point)
      Adds a vertex (or direct position) to the curve
      Parameters:
      point - The new point to add
    • closePrimitive

      void closePrimitive()
      Closes the geometry
    • ensureCapacity

      OrientablePrimitive ensureCapacity(int capacity)