motris.model
Class ConvexHull

java.lang.Object
  extended bymotris.data.Description
      extended bymotris.model.Convex3DPolygon
          extended bymotris.model.ConvexHull

public class ConvexHull
extends Convex3DPolygon

Creates a convex hull of the points supplied. Currently, this class is unused in Motris and may contain bugs

Author:
Hendrik Dahlkamp

Nested Class Summary
private  class ConvexHull.AngleComparator
          Sorts Points by Angle
private  class ConvexHull.ByXComparator
          Sorts Points by X direction.
 
Field Summary
 
Fields inherited from class motris.model.Convex3DPolygon
normalVector, parent, vertices
 
Fields inherited from class motris.data.Description
 
Constructor Summary
ConvexHull(DoubleVector[] pts)
          Creates a convex hull of the points supplied.
 
Method Summary
private  boolean leftTurn(DoubleVector p, DoubleVector q, DoubleVector r)
          Returns true if the curve specified by the points p,q,r is a left Curve
 
Methods inherited from class motris.model.Convex3DPolygon
collideWithLine, computeNormal, getBoundingBox, getDistanceFromCameraOrigin, getEdges, project, toString, transform
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConvexHull

public ConvexHull(DoubleVector[] pts)
Creates a convex hull of the points supplied. While computing this hull, only X- and Y-Coordinates of the points are considered, i.e. we create a 2-dimensional convex hull. Naturally, this only makes sense if all points supplied lie in one plane

Parameters:
pts -
Method Detail

leftTurn

private boolean leftTurn(DoubleVector p,
                         DoubleVector q,
                         DoubleVector r)
Returns true if the curve specified by the points p,q,r is a left Curve

Parameters:
p -
q -
r -
Returns: