Main Page | Class Hierarchy | Class List | File List | Class Members

BoundingBox Class Reference

#include <boundingbox.h>

List of all members.

Public Member Functions

 BoundingBox (Vector3 edgemin, Vector3 edgemax)
void translate (const Vector3 &v)
void scale (const Vector3 &v)
void rotateDeg (const Vector3 &v)
void rotateRad (const Vector3 &v)
void applyOrthogonalMatrix (const Matrix &m)
void applyMatrix (const Matrix &m)
Vector3 getBoxMin () const
Vector3 getBoxMax () const
void transformate (const TransparentTransformatable &t)
DBL intersect (const Ray &r) const
DBL intersect (const Ray &r, DBL tmax) const
bool isInsideAt (const Vector3 &a) const


Detailed Description

A boundingbox encloses the object's surface. The whole surface is inside the box between boxmin and boxmax. Boundingboxes are in upper-level space and always axis-aligned.
Author:
Micha Riser


Constructor & Destructor Documentation

BoundingBox::BoundingBox Vector3  edgemin,
Vector3  edgemax
[inline]
 

Generates a bounding box from two edge points. All components of edgemin have to be smaller than the corresponding components of edgemax.


Member Function Documentation

Vector3 BoundingBox::getBoxMax  )  const [inline]
 

Returns:
Maximum edge point of the box.

Vector3 BoundingBox::getBoxMin  )  const [inline]
 

Returns:
Minimum edge point of the box.

DBL BoundingBox::intersect const Ray r,
DBL  tmax
const
 

Intersect Box with Ray limited to maximum time.

Parameters:
r the Ray
tmax Maximum intersection time.
Returns:
-1 if no intersection, INTERSECTION_TIME_EPSILON if Ray's origin is inside the box otherwise the time of first intersection.

DBL BoundingBox::intersect const Ray r  )  const
 

Intersect Box with Ray.

Parameters:
r the Ray
Returns:
-1 if no intersection, INTERSECTION_TIME_EPSILON if Ray's origin is inside the box otherwise the time of first intersection.

bool BoundingBox::isInsideAt const Vector3 a  )  const
 

Test point for box insidness.

Parameters:
a the point
Returns:
true if the point is inside the box else false

void BoundingBox::transformate const TransparentTransformatable t  ) 
 

Transformate the box the same way as the given Transformatable.

Parameters:
t the Transformatable


The documentation for this class was generated from the following files:
Generated on Thu Jan 27 12:16:06 2005 for raytracer.kdevelop by doxygen 1.3.8