public class Convex extends Sign
Current Version =============== ID: $Id: Convex.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 $
| Modifier and Type | Field and Description |
|---|---|
(package private) Constraint |
boundingCircle_ |
(package private) List |
constraints_ |
(package private) List |
corners_ |
protected int |
olevel |
| Constructor and Description |
|---|
Convex()
Default Constructor
|
Convex(Vector3d v1,
Vector3d v2,
Vector3d v3)
Constructor from a triangle Initialize domain from a triangle.
|
Convex(Vector3d v1,
Vector3d v2,
Vector3d v3,
Vector3d v4)
Constructor from a rectangle Initialize convex from a rectangle.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Constraint c)
Add a constraint.
|
boolean |
contains(Vector3d p) |
(package private) boolean |
eSolve(Vector3d v1,
Vector3d v2,
int cIndex)
eSolve: solve the quadratic equation for the edge v1,v2 of
constraint[cIndex]
|
Constraint |
getConstraint(int c) |
Vector3d |
getCorner(int c) |
int |
getNumberOfConstraints() |
int |
getOlevel() |
void |
intersect(HTMindexImp idx,
HTMrange htmrange,
boolean varlen)
Intersect with index.
|
(package private) int |
NC(HTMindexImp idx,
int n,
int m) |
static String |
printMark(short mark) |
protected void |
saveTrixel(long htmid,
HTMrange hr,
boolean varlen)
adds the given trixel tot he HTMrange
|
void |
setOlevel(int lev) |
void |
simplify()
simplify: We have the following decision tree for the simplification of
convexes: Always test two constraints against each other.
|
(package private) void |
simplify0()
simplify0: simplify zERO convexes.
|
(package private) boolean |
testBoundingCircle(Vector3d v0,
Vector3d v1,
Vector3d v2)
Test if bounding circle intersects with a constraint
|
(package private) boolean |
testConstraintInside(Vector3d v0,
Vector3d v1,
Vector3d v2,
int cIndex)
Test for a constraint lying inside or outside of triangle
|
(package private) int |
testConstraints(int i,
int j)
Test for constraint relative position; intersect, one in the other,
disjoint.
|
(package private) boolean |
testEdge(Vector3d v0,
Vector3d v1,
Vector3d v2)
testEdge: look whether one of the constraints intersects with one of the
edges of node with the corners v0,v1,v2.
|
(package private) boolean |
testEdge0(Vector3d v0,
Vector3d v1,
Vector3d v2)
testEdge0: test the edges of the triangle against the edges of the zERO
convex.
|
(package private) boolean |
testEdgeConstraint(Vector3d v0,
Vector3d v1,
Vector3d v2,
int cIndex)
Test if a constraint intersects the edges
|
(package private) boolean |
testHole(Vector3d v0,
Vector3d v1,
Vector3d v2)
testHole : look for 'holes', i.e.
|
(package private) short |
testNode(int nodeIndex,
HTMindexImp idx)
the same routine as above, but for a given saved node
|
(package private) short |
testNode(Vector3d v0,
Vector3d v1,
Vector3d v2)
test each QuadNode for intersections.
|
(package private) int |
testOtherPosNone(Vector3d v0,
Vector3d v1,
Vector3d v2)
Look for any positive constraint that does not intersect the edges
|
(package private) void |
testPartial(int level,
long id,
Vector3d v0,
Vector3d v1,
Vector3d v2,
int PPrev,
HTMindexImp idx,
HTMrange range,
boolean varlen)
test a triangle's subtriangles whether they are partial.
|
(package private) short |
testTriangle(Vector3d v0,
Vector3d v1,
Vector3d v2,
int vsum)
testTriangle: tests a triangle given by 3 vertices if it intersects the
convex.
|
(package private) short |
testTrixel(int id,
HTMindexImp idx,
HTMrange range,
boolean varlen)
TestTrixel: this is the main test of a trixel vs a Convex.
|
(package private) boolean |
testVectorInside(Vector3d v0,
Vector3d v1,
Vector3d v2,
Vector3d v)
Test for a vector lying inside or outside of triangle For vectors abc, if
(a ^ b * c) < 0, abc are ordered clockwise.
|
(package private) int |
testVertex(Vector3d v)
Test if vertices are inside the convex
|
String |
toString() |
List constraints_
List corners_
Constraint boundingCircle_
protected int olevel
public Convex()
public Convex(Vector3d v1, Vector3d v2, Vector3d v3)
public Convex(Vector3d v1, Vector3d v2, Vector3d v3, Vector3d v4)
public void add(Constraint c)
void simplify0()
public void simplify()
int testConstraints(int i,
int j)
public void intersect(HTMindexImp idx, HTMrange htmrange, boolean varlen)
protected void saveTrixel(long htmid,
HTMrange hr,
boolean varlen)
short testTrixel(int id,
HTMindexImp idx,
HTMrange range,
boolean varlen)
void testPartial(int level,
long id,
Vector3d v0,
Vector3d v1,
Vector3d v2,
int PPrev,
HTMindexImp idx,
HTMrange range,
boolean varlen)
short testNode(int nodeIndex,
HTMindexImp idx)
short testNode(Vector3d v0, Vector3d v1, Vector3d v2)
short testTriangle(Vector3d v0, Vector3d v1, Vector3d v2, int vsum)
int testVertex(Vector3d v)
boolean testHole(Vector3d v0, Vector3d v1, Vector3d v2)
boolean testEdge0(Vector3d v0, Vector3d v1, Vector3d v2)
boolean testEdge(Vector3d v0, Vector3d v1, Vector3d v2)
boolean eSolve(Vector3d v1, Vector3d v2, int cIndex)
boolean testBoundingCircle(Vector3d v0, Vector3d v1, Vector3d v2)
boolean testEdgeConstraint(Vector3d v0, Vector3d v1, Vector3d v2, int cIndex)
int testOtherPosNone(Vector3d v0, Vector3d v1, Vector3d v2)
boolean testConstraintInside(Vector3d v0, Vector3d v1, Vector3d v2, int cIndex)
boolean testVectorInside(Vector3d v0, Vector3d v1, Vector3d v2, Vector3d v)
public Constraint getConstraint(int c)
public int getNumberOfConstraints()
public Vector3d getCorner(int c)
int NC(HTMindexImp idx, int n, int m)
public static String printMark(short mark)
public void setOlevel(int lev)
public int getOlevel()
public boolean contains(Vector3d p)