physics
Class SimpleGeometry
java.lang.Object
physics.GeometryImpl
physics.SimpleGeometry
- All Implemented Interfaces:
- GeometryInterface
- Direct Known Subclasses:
- GeometryReference
public class SimpleGeometry
- extends GeometryImpl
SimpleGeometry alters the behavior of GeometyImpl by removing the
doughnut optimizations. This often reduces the running time of the
timeUntilRotating* methods, but will reduce accuracy unless
a small maximumForesight is used. Most callers will not use
SimpleGeometry directly, but will use the singleton Geometry
instead.
The doughnut optimizations are used by the timeUntilRotating*
methods to narrow the possible times during which a collision might
happen, in order to narrow the search space and improve accuracy.
When doughnut optimizations are disabled, the timeUntilRotating*
methods will always evaluate at least searchSlices
data points between 0 and maximumForesight to search
for a root. This will be faster for the cases where the doughnut
calculations do not lead to a useful decrease in the time being
searched, but will be slower for the cases where the doughnut
optimizations would have deduced that no collision was possible.
- See Also:
GeometryImpl,
Geometry
|
Constructor Summary |
SimpleGeometry(double maximumForesight,
int searchForCollisionSlices)
|
|
Method Summary |
protected IntervalList |
restrictSearchInterval(IntervalList intervals,
double inner_radius,
double outer_radius,
double phi_1,
double phi_2,
double omega,
Vect center,
Circle ball,
Vect velocity)
Given the path of a ball and the path of something rotating in a
circle, restricts the possible time periods during which they
might collide by doing some crazy confusing analysis originally
concocted by Professor Ernst. |
| Methods inherited from class physics.GeometryImpl |
applyReflectionCoeff, distanceSquared, distanceSquared, minQuadraticSolution, perpendicularPoint, perpendicularPointWholeLine, quadraticSolution, reflectBalls, reflectCircle, reflectCircle, reflectRotatingCircle, reflectRotatingCircle, reflectRotatingWall, reflectRotatingWall, reflectWall, reflectWall, rotateAround, rotateAround, rotateAround, timeUntilBallBallCollision, timeUntilCircleCollision, timeUntilCircleCollision, timeUntilRotatingCircleCollision, timeUntilRotatingWallCollision, timeUntilWallCollision |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleGeometry
public SimpleGeometry(double maximumForesight,
int searchForCollisionSlices)
- See Also:
GeometryImpl
restrictSearchInterval
protected IntervalList restrictSearchInterval(IntervalList intervals,
double inner_radius,
double outer_radius,
double phi_1,
double phi_2,
double omega,
Vect center,
Circle ball,
Vect velocity)
- Description copied from class:
GeometryImpl
- Given the path of a ball and the path of something rotating in a
circle, restricts the possible time periods during which they
might collide by doing some crazy confusing analysis originally
concocted by Professor Ernst. Subclass SimpleGeometry disables these
optimizations.
- Overrides:
restrictSearchInterval in class GeometryImpl
- See Also:
SimpleGeometry