motris.model
Class Convex2DPolygon

java.lang.Object
  extended bymotris.data.Description
      extended bymotris.model.Convex2DPolygon

public class Convex2DPolygon
extends Description

Convex 2D Image Plane Polygon.

Author:
preuter, dahlkamp

Field Summary
 double distanceFromCameraOrigin
           
static double epsilon
           
private static double EPSILON
           
 DoubleVector normalVector
           
 VolumeRepresentation parent
           
 ImageVertex[] vertices
          Vertices with (cw or ccw ordered) border points of this Polygon.
 
Fields inherited from class motris.data.Description
 
Constructor Summary
Convex2DPolygon()
           
 
Method Summary
 EdgeInterval collide(SceneEdge sceneEdge, ImageEdge imageEdge, Camera cam, boolean alwaysMarkInvisible, java.awt.Rectangle boundingBox, Double4Vector tmp, Double4Vector tmp2)
           
 EdgeInterval collide2d(ImageEdge edge)
           
 EdgeInterval collide3d(SceneEdge sceneEdge, ImageEdge imageEdge, Camera cam, boolean alwaysMarkInvisible, Double4Vector tmp, Double4Vector tmp2)
           
 void fillInBoundingBox(java.awt.Rectangle boundingBox)
           
 boolean pointInside(double posX, double posY)
          Check if a 2D MotrisImage Point is inside this Polygon
 java.lang.String toString()
           
 void transform(JSci.maths.DoubleSquareMatrix a)
           
 
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
 

Field Detail

EPSILON

private static double EPSILON

epsilon

public static final double epsilon
See Also:
Constant Field Values

vertices

public ImageVertex[] vertices
Vertices with (cw or ccw ordered) border points of this Polygon. Note that the polygon does NOT own these points and may not make modifications to them. Instead, they are shared among different polygons


normalVector

public DoubleVector normalVector

distanceFromCameraOrigin

public double distanceFromCameraOrigin

parent

public VolumeRepresentation parent
Constructor Detail

Convex2DPolygon

public Convex2DPolygon()
Method Detail

collide2d

public final EdgeInterval collide2d(ImageEdge edge)

fillInBoundingBox

public void fillInBoundingBox(java.awt.Rectangle boundingBox)

collide

public final EdgeInterval collide(SceneEdge sceneEdge,
                                  ImageEdge imageEdge,
                                  Camera cam,
                                  boolean alwaysMarkInvisible,
                                  java.awt.Rectangle boundingBox,
                                  Double4Vector tmp,
                                  Double4Vector tmp2)

collide3d

public final EdgeInterval collide3d(SceneEdge sceneEdge,
                                    ImageEdge imageEdge,
                                    Camera cam,
                                    boolean alwaysMarkInvisible,
                                    Double4Vector tmp,
                                    Double4Vector tmp2)

transform

public void transform(JSci.maths.DoubleSquareMatrix a)

pointInside

public boolean pointInside(double posX,
                           double posY)
Check if a 2D MotrisImage Point is inside this Polygon

Parameters:
posX - X Coordinate of point to be checked
posY - Y Coordinate of point to be checked
Returns:
true if point is inside

toString

public java.lang.String toString()