|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jhu.htmIndex.SpatialSign | +--jhu.htmIndex.SpatialConvex
The SpatialConvex class encapsulates all the code for intersection and lookup. It represents a convex on the unit sphere (see SpatialDomain).
Field Summary | |
(package private) int |
addlevel_
|
(package private) boolean |
bitresult_
|
(package private) SpatialConstraint |
boundingCircle_
|
(package private) java.util.List |
constraints_
|
(package private) java.util.List |
corners_
|
(package private) java.util.List |
flist_
|
(package private) java.util.BitSet |
full_
|
(package private) SpatialIndex |
index_
|
(package private) SpatialMarkup |
markup_
|
(package private) java.util.BitSet |
partial_
|
(package private) java.util.List |
plist_
|
Fields inherited from class jhu.htmIndex.SpatialSign |
mIXED, nEG, pOS, sign_, zERO |
Constructor Summary | |
SpatialConvex()
Default Constructor |
|
SpatialConvex(SpatialVector v1,
SpatialVector v2,
SpatialVector v3)
Constructor from a triangle Initialize domain from a triangle. |
|
SpatialConvex(SpatialVector v1,
SpatialVector v2,
SpatialVector v3,
SpatialVector v4)
Constructor from a rectangle Initialize convex from a rectangle. |
Method Summary | |
void |
add(SpatialConstraint c)
Add a constraint |
(package private) void |
doIntersect()
Do the intersection (common function for overloaded intersect()) |
(package private) boolean |
eSolve(SpatialVector v1,
SpatialVector v2,
int cIndex)
eSolve: solve the quadratic equation for the edge v1,v2 of constraint[cIndex] |
(package private) void |
fillChildren(int nodeIndex)
fillChildren: Mark the child nodes as markup. |
SpatialConstraint |
getConstraint(int c)
|
SpatialVector |
getCorner(int c)
|
int |
getNumberOfConstraints()
|
void |
intersect(SpatialIndex idx,
SpatialMarkup markup,
java.util.BitSet partial,
java.util.BitSet full)
Intersect with index. |
void |
intersect(SpatialIndex idx,
SpatialMarkup markup,
java.util.List partial,
java.util.List full)
Same intersection, but the result is given in a list of nodes. |
(package private) int |
NC(int n,
int m)
|
void |
read(java.io.Reader in)
|
void |
readRaDec(java.io.Reader in)
|
(package private) void |
setfull(int id,
int level)
setfull: set the bitlist leaves at level maxlevel to full. |
(package private) 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(SpatialVector v0,
SpatialVector v1,
SpatialVector v2)
Test if bounding circle intersects with a constraint |
(package private) boolean |
testConstraintInside(SpatialVector v0,
SpatialVector v1,
SpatialVector 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(SpatialVector v0,
SpatialVector v1,
SpatialVector 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(SpatialVector v0,
SpatialVector v1,
SpatialVector v2)
testEdge0: test the edges of the triangle against the edges of the zERO convex. |
(package private) boolean |
testEdgeConstraint(SpatialVector v0,
SpatialVector v1,
SpatialVector v2,
int cIndex)
Test if a constraint intersects the edges |
(package private) boolean |
testHole(SpatialVector v0,
SpatialVector v1,
SpatialVector v2)
testHole : look for 'holes', i.e. |
(package private) short |
testNode(int nodeIndex)
the same routine as above, but for a given saved node |
(package private) short |
testNode(SpatialVector v0,
SpatialVector v1,
SpatialVector v2)
test each SpatialQuadNode for intersections. |
(package private) int |
testOtherPosNone(SpatialVector v0,
SpatialVector v1,
SpatialVector v2)
Look for any positive constraint that does not intersect the edges |
(package private) void |
testPartial(int level,
int id,
SpatialVector v0,
SpatialVector v1,
SpatialVector v2)
test a triangle's subtriangles whether they are partial. |
(package private) void |
testSubTriangle(int level,
int id,
SpatialVector v0,
SpatialVector v1,
SpatialVector v2)
testSubTriangle: call full or partial depending on result of testNode. |
(package private) short |
testTriangle(SpatialVector v0,
SpatialVector v1,
SpatialVector v2,
int vsum)
testTriangle: tests a triangle given by 3 vertices if it intersects the convex. |
(package private) boolean |
testVectorInside(SpatialVector v0,
SpatialVector v1,
SpatialVector v2,
SpatialVector 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(int vIndex)
Test if vertices are inside the convex for a saved node. |
(package private) int |
testVertex(SpatialVector v)
|
java.lang.String |
toString()
|
(package private) short |
triangleTest(int nodeIndex)
triangleTest: this is the main test of a triangle vs a Convex. |
Methods inherited from class jhu.htmIndex.SpatialSign |
printSign |
Methods inherited from class java.lang.Object |
|
Field Detail |
java.util.List constraints_
java.util.List corners_
SpatialIndex index_
SpatialMarkup markup_
SpatialConstraint boundingCircle_
int addlevel_
java.util.BitSet full_
java.util.BitSet partial_
java.util.List flist_
java.util.List plist_
boolean bitresult_
Constructor Detail |
public SpatialConvex()
public SpatialConvex(SpatialVector v1, SpatialVector v2, SpatialVector v3)
public SpatialConvex(SpatialVector v1, SpatialVector v2, SpatialVector v3, SpatialVector v4)
Method Detail |
public void add(SpatialConstraint c)
void simplify0()
void simplify()
int testConstraints(int i, int j)
public void intersect(SpatialIndex idx, SpatialMarkup markup, java.util.BitSet partial, java.util.BitSet full)
public void intersect(SpatialIndex idx, SpatialMarkup markup, java.util.List partial, java.util.List full)
void doIntersect()
short triangleTest(int nodeIndex)
void fillChildren(int nodeIndex)
void setfull(int id, int level)
void testPartial(int level, int id, SpatialVector v0, SpatialVector v1, SpatialVector v2)
void testSubTriangle(int level, int id, SpatialVector v0, SpatialVector v1, SpatialVector v2)
short testNode(SpatialVector v0, SpatialVector v1, SpatialVector v2)
short testNode(int nodeIndex)
short testTriangle(SpatialVector v0, SpatialVector v1, SpatialVector v2, int vsum)
int testVertex(int vIndex)
int testVertex(SpatialVector v)
boolean testHole(SpatialVector v0, SpatialVector v1, SpatialVector v2)
boolean testEdge0(SpatialVector v0, SpatialVector v1, SpatialVector v2)
boolean testEdge(SpatialVector v0, SpatialVector v1, SpatialVector v2)
boolean eSolve(SpatialVector v1, SpatialVector v2, int cIndex)
boolean testBoundingCircle(SpatialVector v0, SpatialVector v1, SpatialVector v2)
boolean testEdgeConstraint(SpatialVector v0, SpatialVector v1, SpatialVector v2, int cIndex)
int testOtherPosNone(SpatialVector v0, SpatialVector v1, SpatialVector v2)
boolean testConstraintInside(SpatialVector v0, SpatialVector v1, SpatialVector v2, int cIndex)
boolean testVectorInside(SpatialVector v0, SpatialVector v1, SpatialVector v2, SpatialVector v)
public SpatialConstraint getConstraint(int c)
public int getNumberOfConstraints()
public SpatialVector getCorner(int c)
int NC(int n, int m)
public java.lang.String toString()
toString
in class java.lang.Object
public void read(java.io.Reader in) throws java.io.IOException
public void readRaDec(java.io.Reader in) throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |