Constructor from a rectangle
Copy constructor
Assignment
Add a constraint
Simplify the convex, remove redundancies
Intersect with index. The partial and full bitlists for the result have to be given. The markup accelerates the intersection for the index that is in memory, but is not used for the dynamically built triangles. If the conves occupies a large percent of the area of the sphere, bitlists are the preferred result method.
Same intersection, but the result is given in a list of nodes. If the conves is very small, this is the preferred result method.
Return the number of constraints
[] operator: give back constraint
read from stream
write to stream
Simplification routine for zERO convexes. This is called by simplify() in case we have all zERO constraints.
This is the testsuit for the intersection.
triangleTest: Test the nodes of the index if the convex hits it the argument gives the index of the nodes_ array to specify the QuadNode
fillChildren: Mark the child nodes as markup.
test each quadnode for intersections. Calls testTriangle after having tested the vertices using testVertex.
the same routine, but for a given saved node
testTriangle: tests a triangle given by 3 vertices if it intersects the convex. Here the whole logic of deciding whether it is partial, full, swallowed or unknown is handled.
setfull: set the full bitlist for each node below this level.
test a triangle's subtriangles whether they are partial. If level is nonzero, recurse: subdivide the triangle according to our rules and test each subdivision. (our rules are: each subdivided triangle has to be given ordered counter-clockwise, 0th index starts off new 0-node, 1st index starts off new 1-node, 2nd index starts off new 2-node middle triangle gives new 3-node.) if we are at the bottom, set this id's leafindex in partial bitlist.
call full or partial depending on result of testNode.
Test for constraint relative position; intersect, one in the other, disjoint.
Test if vertices are inside the convex for a saved node. makes use of the markup (this is where the speedup occurs)
Same testVertex but for any vector v, no handling using markup.
testHole : look for 'holes', i.e. negative constraints that have their centers inside the node with the three corners v0,v1,v2.
testEdge0: test the edges of the triangle against the edges of the zERO convex. The convex is stored in corners_ so that the convex is always on the left-hand-side of an edge corners_(i) - corners_(i+1). (just like the triangles). This makes testing for intersections with the edges easy.
testEdge: look whether one of the constraints intersects with one of the edges of node with the corners v0,v1,v2.
eSolve: solve the quadratic equation for the edge v1,v2 of constraint[cIndex]
Test if bounding circle intersects with a constraint
Test if a constraint intersects the edges
Look for any positive constraint that does not intersect the edges
Test for a constraint lying inside or outside of triangle
Test for a vector lying inside or outside of triangle