|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.jhu.htm.core.Sign | +--edu.jhu.htm.core.Constraint
The Constraint is really a cone on the sky-sphere. It is characterized by its direction a_, the opening angle s_ and its cosine -- the distance of the plane intersecting the sphere and the sphere center. If d_ = 0, we have a half-sphere. If it is negative, we have a 'hole' i.e. the room angle is larger than 90degrees. Example: positive distance
. ____ . --- --- . / /|\ . / / |=\ . | / |==| this side is in the convex. . | /\s |===| . |------------|---| -> direction a . | \ |===| . | \ |==| . \ \ |=/ . \ \|/ . ---____--- . . . <-d-> is positive (s < 90)Example: negative distance
. ____ . ---====--- . this side is /========/|\ . in the /========/=| \ . convex |==== s__/==| | . |===== / /===| | . dir. a <- |------------|---| 'hole' in the sphere . |========\===| | . |========\==| | . \========\=| / . \========\|/ . ---____--- . . . <-d-> is negative (s > 90)for d=0 we have a half-sphere. Combining such, we get triangles, rectangles etc on the sphere surface (pure ZERO convexes)
Current Version =============== ID: $Id: Constraint.java,v 1.3 2003/02/19 15:46:11 womullan Exp $ Revision: $Revision: 1.3 $ Date/time: $Date: 2003/02/19 15:46:11 $
Field Summary | |
Vector3d |
a_
|
double |
d_
|
double |
s_
|
Fields inherited from class edu.jhu.htm.core.Sign |
mIXED, nEG, pOS, sign_, zERO |
Constructor Summary | |
Constraint()
Default Constructor |
|
Constraint(Constraint copy)
Copy constructor |
|
Constraint(double distance)
Construct by setting only the distance |
|
Constraint(double x,
double y,
double z,
double distance)
Initialization constructor |
|
Constraint(Vector3d vector,
double distance)
Initialization constructor |
Method Summary | |
boolean |
contains(Vector3d vector)
check whether a vector is inside this constraint |
double |
d()
give back distance |
void |
invert()
Invert a constraint |
java.lang.String |
toString()
convert data to string |
Vector3d |
v()
give back constraint direction |
Methods inherited from class edu.jhu.htm.core.Sign |
printSign |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public Vector3d a_
public double d_
public double s_
Constructor Detail |
public Constraint()
public Constraint(double distance)
distance
- set the distance to the cappublic Constraint(Vector3d vector, double distance)
vector
- Vector3d specifying the direction of the capdistance
- The distance of the cutting plane from the originpublic Constraint(double x, double y, double z, double distance)
x
- x-direction of vector specifying the direction of the capy
- y-direction of vector specifying the direction of the capz
- z-direction of vector specifying the direction of the capdistance
- The distance of the cutting plane from the originpublic Constraint(Constraint copy)
Method Detail |
public void invert()
public boolean contains(Vector3d vector)
vector
- Vector3d to be checked
public Vector3d v()
public double d()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |