Class Plane

java.lang.Object
  |
  +--Plane

class Plane
extends java.lang.Object

Author:
Erhan Oztop, 2001-2002

Source code by Erhan Oztop (erhan@atr.co.jp)
Copyright August 2002 via
University of Southern California Ph.D. publication copyright

Field Summary
 double A
           
 double B
           
 double C
           
 Point3d CP
           
 java.awt.Point Cr
           
 double D
           
 double depth
           
 int fill_color
           
 int in_fill_color
           
 int in_line_color
           
 int line_color
           
 int N
           
 Point3d normal
           
 double objectCenterValue
           
 Point3d[] P
           
 java.awt.Point[] r
           
 int side
           
static int side_IN
           
static int side_NONE
           
static int side_OUT
           
 int texture
           
(package private)  double tt
           
 
Constructor Summary
Plane(Point3d P0, Point3d P1, Point3d P2, Point3d P3, java.awt.Point r0, java.awt.Point r1, java.awt.Point r2, java.awt.Point r3)
           
Plane(Point3d P0, Point3d P1, Point3d P2, java.awt.Point r0, java.awt.Point r1, java.awt.Point r2)
           
Plane(java.util.Vector v)
           
 
Method Summary
 void adjustCenterSide(Point3d objCenter)
           
 Point3d align(Point3d p, Point3d rot)
           
 boolean contained(Point3d q)
          check whether p is contained in the polygon area.
 Point3d intersect2d(Point3d p0, Point3d u0, Point3d p1, Point3d u1)
           
 Point3d intersection(Point3d p, Point3d u)
           
 Point3d lineintersect(Point3d A0, Point3d A1, Point3d B0, Point3d B1)
           
 boolean old_contained(Point3d q)
          check whether p is contained in the polygon area.
 int sameSide(Point3d p)
           
 void set2dCenter()
           
 void setCenter()
           
 void setColor(int fill, int line)
           
 void setGeom()
           
 java.lang.String str()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

N

public int N

r

public java.awt.Point[] r

P

public Point3d[] P

CP

public Point3d CP

Cr

public java.awt.Point Cr

normal

public Point3d normal

A

public double A

B

public double B

C

public double C

D

public double D

fill_color

public int fill_color

line_color

public int line_color

in_fill_color

public int in_fill_color

in_line_color

public int in_line_color

texture

public int texture

depth

public double depth

side_OUT

public static final int side_OUT

side_IN

public static final int side_IN

side_NONE

public static final int side_NONE

side

public int side

objectCenterValue

public double objectCenterValue

tt

double tt
Constructor Detail

Plane

public Plane(Point3d P0,
             Point3d P1,
             Point3d P2,
             Point3d P3,
             java.awt.Point r0,
             java.awt.Point r1,
             java.awt.Point r2,
             java.awt.Point r3)

Plane

public Plane(Point3d P0,
             Point3d P1,
             Point3d P2,
             java.awt.Point r0,
             java.awt.Point r1,
             java.awt.Point r2)

Plane

public Plane(java.util.Vector v)
Method Detail

set2dCenter

public void set2dCenter()

setCenter

public void setCenter()

setGeom

public void setGeom()

adjustCenterSide

public void adjustCenterSide(Point3d objCenter)

str

public java.lang.String str()

setColor

public void setColor(int fill,
                     int line)

intersection

public Point3d intersection(Point3d p,
                            Point3d u)

contained

public boolean contained(Point3d q)
check whether p is contained in the polygon area. Note that p must lie in the plane of polygon. The sum of internal angles of a point inside the polygon must be 2*pi. If the point is outside this angle will be less than 2pi.

old_contained

public boolean old_contained(Point3d q)
check whether p is contained in the polygon area. Note that p must lie in the plane of polygon. Works but slow. Makes many calls to lineintersect....

align

public Point3d align(Point3d p,
                     Point3d rot)

lineintersect

public Point3d lineintersect(Point3d A0,
                             Point3d A1,
                             Point3d B0,
                             Point3d B1)

intersect2d

public Point3d intersect2d(Point3d p0,
                           Point3d u0,
                           Point3d p1,
                           Point3d u1)

sameSide

public int sameSide(Point3d p)