jbt_bracket Class Reference
A class for storing the bracketing of a root. More...
#include <bracket.h>
List of all members.
Public Members
- jbt_bracket ( jFlt _a, jFlt _b, const jVec3& _p )
- jFlt A () const
- jFlt B () const
- const jVec3& pos () const
Static Public Members
- void Flatten ( link*, jbt_bracket*&, int& )
Detailed Description
A class for storing the bracketing of a root.
-
Author(s):
-
Mark Tigges
This class is used in the numerical intersection routine. Every
geometric object needs to compute the possible brackets of intersections
with the surface. These brackets are stored in an instance of this class.
The brackets are refined later using a root finder, appropriate choices
are one of false position, secant, brents, ridders method. Do not use
newton-raphson for two reasons: a, the function has a zero derivative
close to the root (in fact two), b, we don't know the derivative
exactly.
Typically a bracket is computed by the jbt_primitive::bracket() functions.
This can be done in the following way, intersect the bounding box of the
primitive, compute the position along the ray closest to the skeleton. If
the ray penetrates the bounding box, then this produces two brackets. Be
careful for primitives which may have more than one entry/exit pair for
a single ray, like a circle skeleton.
Member Function Documentation
jbt_bracket::jbt_bracket( jFlt _a, jFlt _b, const jVec3& _p )
Construct a new bracket.
-
Parameters:
-
_a - the lower bound on the bracket.
-
_b - the upper bound on the bracket.
-
_p - the closest point on the skeleton.
jFlt jbt_bracket::A() const
jFlt jbt_bracket::B() const
const jVec3& jbt_bracket::pos() const
void jbt_bracket::Flatten( link*, jbt_bracket*&, int& ) [static]
Flattens the given list of brackets. The returns are the array and
the number of elements in the array. The array is also sorted on
the value of a.
The documentation for this class was generated from the following file:
JSP /
libjbt v0.1
mtigges@cpsc.ucalgary.ca