|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.geom3d.Face3D
public class Face3D
Represents a planar and convex polygon in 3 dimensional space.
| Constructor Summary | |
|---|---|
Face3D(float[] coords,
int[] vertices,
java.awt.Color[] colors)
Creates a new Face3D object. |
|
| Method Summary | |
|---|---|
void |
addSwipeListener(SwipeListener l)
returns the plane equation: a*x1 + b*y1 + c*z1 = -1 a*x2 + b*y2 + c*z2 = -1 a*x3 + b*y3 + c*z3 = -1 / public double[] getPlaneEquation() { return planeEquation; } /** Determines on which side of the given plane equation this face is. |
int |
compareTo(java.lang.Object o)
|
protected void |
fireSwipeEvent(java.awt.event.MouseEvent evt,
float angle)
|
java.awt.event.ActionListener |
getAction()
|
java.awt.Color |
getBorderColor()
|
double |
getBrightness(Point3D light,
double lightSourceIntensity,
double ambientLightIntensity)
Returns ambient light intensity + the intensity of this face's diffuse reflection to the light source. |
float[] |
getCoords()
|
java.awt.Color |
getFillColor()
|
int |
getSwipeListenerCount()
|
SwipeListener[] |
getSwipeListeners()
|
int[] |
getVertices()
|
boolean |
handleEvent(java.awt.event.MouseEvent evt)
|
boolean |
isVisible(Point3D observer)
|
void |
removeSwipeListener(SwipeListener l)
|
void |
setAction(java.awt.event.ActionListener action)
|
void |
setCoords(float[] coords)
|
void |
setFillColor(java.awt.Color newValue)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Face3D(float[] coords,
int[] vertices,
java.awt.Color[] colors)
coords - Coordinate data for the face. Each group of
three entries describe a vector x, y, z
in three dimensional space.vertices - Each entry represents a vertex at the
borderline of the face. Each vertex is the index of a
vector in the coords array. The vertices of the face
must be indicated in clockwise direction. All vertices
must be on the same plane and the boundary of the face
must be convex.| Method Detail |
|---|
public java.awt.Color getBorderColor()
public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color newValue)
public void setAction(java.awt.event.ActionListener action)
public boolean handleEvent(java.awt.event.MouseEvent evt)
public java.awt.event.ActionListener getAction()
public boolean isVisible(Point3D observer)
public int[] getVertices()
public float[] getCoords()
public void setCoords(float[] coords)
public double getBrightness(Point3D light,
double lightSourceIntensity,
double ambientLightIntensity)
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic void addSwipeListener(SwipeListener l)
public void removeSwipeListener(SwipeListener l)
public SwipeListener[] getSwipeListeners()
public int getSwipeListenerCount()
protected void fireSwipeEvent(java.awt.event.MouseEvent evt,
float angle)
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||