HE_Mesh  6.0.1
wblut.geom.WB_Ring Class Reference
+ Inheritance diagram for wblut.geom.WB_Ring:

Public Member Functions

WB_Vector getDirection (final int i)
 
WB_Vector getNormal (final int i)
 
double a (final int i)
 
double b (final int i)
 
double c (final int i)
 
double getLength (final int i)
 
boolean equals (final Object o)
 
boolean isCCW ()
 
WB_Ring apply (final WB_Transform T)
 
WB_Point getPoint (final int i)
 
double getd (final int i, final int j)
 
float getf (final int i, final int j)
 
WB_Point getPointOnLine (final double t)
 
WB_Point getParametricPointOnLine (final double t)
 
int getNumberOfPoints ()
 
WB_Segment getSegment (final int i)
 
- Public Member Functions inherited from wblut.geom.WB_PolyLine
WB_Point getPoint (final int i)
 
double getd (final int i, final int j)
 
float getf (final int i, final int j)
 
WB_Point getPointOnLine (final double t)
 
WB_Point getParametricPointOnLine (final double t)
 
WB_Vector getDirection (final int i)
 
WB_Vector getNormal (final int i)
 
double a (final int i)
 
double b (final int i)
 
double c (final int i)
 
int getNumberOfPoints ()
 
WB_Segment getSegment (final int i)
 
int getNumberSegments ()
 
double getLength (final int i)
 
 WB_PolyLine (final Collection<?extends WB_Coord > points)
 
 WB_PolyLine (final WB_Coord...points)
 
boolean equals (final Object o)
 
int hashCode ()
 
WB_PolyLine apply (final WB_Transform T)
 
WB_CoordCollection getPoints ()
 

Protected Member Functions

 WB_Ring ()
 
 WB_Ring (final List<?extends WB_Coord > points)
 
 WB_Ring (final WB_Coord[] points)
 
- Protected Member Functions inherited from wblut.geom.WB_PolyLine
 WB_PolyLine ()
 

Private Member Functions

void getDirections ()
 

Private Attributes

WB_GeometryFactory geometryfactory = new WB_GeometryFactory()
 

Constructor & Destructor Documentation

wblut.geom.WB_Ring.WB_Ring ( )
protected
wblut.geom.WB_Ring.WB_Ring ( final List<?extends WB_Coord points)
protected
Parameters
points

References wblut.geom.WB_Ring.getDirections().

wblut.geom.WB_Ring.WB_Ring ( final WB_Coord[]  points)
protected
Parameters
points

References wblut.geom.WB_Ring.getDirections().

Member Function Documentation

double wblut.geom.WB_Ring.a ( final int  i)

a.x+b.y+c=0

Parameters
i
Returns
a for a 2D line
WB_Ring wblut.geom.WB_Ring.apply ( final WB_Transform  T)
double wblut.geom.WB_Ring.b ( final int  i)

a.x+b.y+c=0

Parameters
i
Returns
b for a 2D line
double wblut.geom.WB_Ring.c ( final int  i)

a.x+b.y+c=0

Parameters
i
Returns
c for a 2D line
double wblut.geom.WB_Ring.getd ( final int  i,
final int  j 
)
WB_Vector wblut.geom.WB_Ring.getDirection ( final int  i)

Get direction.

Parameters
i
Returns
direction
void wblut.geom.WB_Ring.getDirections ( )
private
float wblut.geom.WB_Ring.getf ( final int  i,
final int  j 
)
double wblut.geom.WB_Ring.getLength ( final int  i)
WB_Vector wblut.geom.WB_Ring.getNormal ( final int  i)
int wblut.geom.WB_Ring.getNumberOfPoints ( )
WB_Point wblut.geom.WB_Ring.getParametricPointOnLine ( final double  t)
WB_Point wblut.geom.WB_Ring.getPoint ( final int  i)
WB_Point wblut.geom.WB_Ring.getPointOnLine ( final double  t)
WB_Segment wblut.geom.WB_Ring.getSegment ( final int  i)
boolean wblut.geom.WB_Ring.isCCW ( )
Returns

This check catches cases where the ring contains an A-B-A configuration of points. This can happen if the ring does not contain 3 distinct points (including the case where the input array has fewer than 4 elements), or it contains coincident line segments.

If disc is exactly 0, lines are collinear. There are two possible cases: (1) the lines lie along the x axis in opposite directions (2) the lines lie on top of one another

(1) is handled by checking if next is left of prev ==> CCW (2) will never happen if the ring is valid, so don't check for it (Might want to assert this)

References wblut.geom.WB_Point.equals(), wblut.geom.WB_Ring.getNumberOfPoints(), wblut.geom.WB_Ring.getPoint(), wblut.geom.WB_Predicates.orient2D(), wblut.geom.WB_MutableCoordinate.xd(), and wblut.geom.WB_MutableCoordinate.yd().

Member Data Documentation

WB_GeometryFactory wblut.geom.WB_Ring.geometryfactory = new WB_GeometryFactory()
private

The documentation for this class was generated from the following file: