GEL
2
GEL is a library for Geometry and Linear Algebra
|
Abstract BOUNDINGNODE node. More...
#include <BoundingNode.h>
Inherited by Geometry::BoundingINode< BoxType >, and Geometry::BoundingLNode< BoxType >.
Public Member Functions | |
BoundingNode (const BoxType &box) | |
virtual int | intersect_cnt (const CGLA::Vec3f &, const CGLA::Vec3f &) const =0 |
Count number of intersections from a point in a given direction. | |
virtual bool | intersect (const CGLA::Vec3f &, const CGLA::Vec3f &, float &) const =0 |
Find the surface intersection point. | |
virtual void | intersect (Ray &r) const =0 |
virtual void | sq_distance (const CGLA::Vec3f &, float &, float &, float &) const |
Static Public Member Functions | |
static BoundingNode * | build (std::vector< Triangle > &triangles) |
Abstract BOUNDINGNODE node.
void Geometry::BoundingNode< BoxType >::sq_distance | ( | const CGLA::Vec3f & | p, |
float & | dmin, | ||
float & | dmax, | ||
float & | s | ||
) | const [virtual] |
For a given point, return the min and max square distance and the sign. Non-leafs return zero for the sign. Leaves return the square of the true distance as both min and max.
Reimplemented in Geometry::BoundingLNode< BoxType >.