public class Constraint extends Sign
. ____ . --- --- . / /|\ . / / |=\ . | / |==| 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 $
| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Vector3d vector)
check whether a vector is inside this constraint
|
double |
d()
give back distance
|
void |
invert()
Invert a constraint
|
String |
toString()
convert data to string
|
Vector3d |
v()
give back constraint direction
|
public Vector3d a_
public double d_
public double s_
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)
constraint - The constraint to be copiedpublic void invert()
public boolean contains(Vector3d vector)
vector - Vector3d to be checkedpublic Vector3d v()
public double d()