Cone Class Reference
Representation of a vertical 3D cone enclosed in the unit box (-.5,-.5,-.5) to (.5,.5,.5) -- the tip is at (0,.5,0). More...
#include <Cone.h>

Public Member Functions | |
| Cone () | |
| virtual | ~Cone () |
Intersection routines | |
| virtual real_t | getIntersection (const Ray &ray, SurfacePoint &pt) |
| Tests the given ray with this object for intersection. If a valid intersection exists, its "t" value will be returned and the given SurfacePoint will be initialized with enough data for this object to later fill in all relevant information lazily (world space normal at intersection point, uv coordinates, etc.). | |
| virtual bool | intersects (const Ray &ray, real_t tMax=INFINITY) |
| Used for occlusion/visibility testing where you don't necessarily care about anything other than whether or not an intersection exists. (generally faster than getIntersection). | |
Core functionality | |
| virtual void | preview () |
Protected Member Functions | |
| virtual void | _getUV (SurfacePoint &pt) const |
| virtual void | _getGeometricNormal (SurfacePoint &pt) const |
Protected Attributes | |
| GLUquadric * | m_quadric |
Detailed Description
Representation of a vertical 3D cone enclosed in the unit box (-.5,-.5,-.5) to (.5,.5,.5) -- the tip is at (0,.5,0).
- Date:
- Fall 2008
Definition at line 17 of file Cone.h.
Constructor & Destructor Documentation
Member Function Documentation
| real_t Cone::getIntersection | ( | const Ray & | ray, | |
| SurfacePoint & | pt | |||
| ) | [virtual] |
Tests the given ray with this object for intersection. If a valid intersection exists, its "t" value will be returned and the given SurfacePoint will be initialized with enough data for this object to later fill in all relevant information lazily (world space normal at intersection point, uv coordinates, etc.).
- Note:
- if you only care about whether or not an intersection exists and don't actually need to know the exact intersection point, see the intersects method instead.
- Returns:
- the smallest positive "t" value of any intersections found, or INFINITY if no valid intersection exists
Implements Intersectable.
Used for occlusion/visibility testing where you don't necessarily care about anything other than whether or not an intersection exists. (generally faster than getIntersection).
- Note:
- default implementation defers to getIntersection
- Returns:
- whether or not the given ray intersects this object with a positive "t" value greater than EPSILON and less than the given
tMax
Reimplemented from Intersectable.
| void Cone::preview | ( | ) | [virtual] |
Display a crude OpenGL preview of this shape
- Note:
- Default implementation sets the ModelView matrix appropriately with respect to this Transformable's transformation
Reimplemented from Transformable.
| void Cone::_getUV | ( | SurfacePoint & | pt | ) | const [protected, virtual] |
| void Cone::_getGeometricNormal | ( | SurfacePoint & | pt | ) | const [protected, virtual] |
Member Data Documentation
GLUquadric* Cone::m_quadric [protected] |
The documentation for this class was generated from the following files:
Generated on 28 Feb 2009 for Milton by
1.5.6