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

Object3D Class Reference

#include <object3d.h>

Inheritance diagram for Object3D:

SurfacePatch3D TransparentTransformatable Transformatable Box Cylinder Isosurface ObjectContainer Plane Sphere List of all members.

Public Member Functions

 Object3D ()
 Object3D (Vector3 location)
virtual void translate (const Vector3 &v)
virtual void scale (const Vector3 &v)
virtual void rotateDeg (const Vector3 &v)
virtual void rotateRad (const Vector3 &v)
virtual void applyOrthogonalMatrix (const Matrix &m)
virtual void applyMatrix (const Matrix &m)
virtual void transform (const TransparentTransformatable &t)
virtual void transformInverse (const TransparentTransformatable &t)
virtual bool hasFinitBounding () const
virtual Vector3 getBoundingMin () const
virtual Vector3 getBoundingMax () const
virtual DBL intersectBounding (const Ray &r) const
virtual DBL intersectBounding (const Ray &r, DBL tmax) const
virtual Intersectionintersect (const Ray &r) const
virtual IntersectionintersectLimitedTime (const Ray &r, DBL maxtime) const
void setMaterial (const Material3D &m)
void setTexture (const Texture3D &t)
void setPigment (const Pigment3D &p)
void setFinish (const Finish &f)
void setInterior (const Interior &i)
void setMedia (const Media3D &m)
virtual Object3Dinvert () const
virtual PatchObject * toPatch (double precision) const
virtual void listInside (const Vector3 &location, InsideList &l) const
bool isInsideAtBounded (Vector3 location) const
bool isInverse () const

Public Attributes

Material3Dmaterial

Protected Member Functions

 Object3D (const Object3D &o)
virtual IntersectionintersectLocal (const Ray &r) const
virtual IntersectionintersectLocalLimitedTime (const Ray &r, DBL maxtime) const =0
virtual bool isInsideAt (const Vector3 &locallocation) const =0

Protected Attributes

BoundingBoxboundingbox
bool inverse

Detailed Description

Superclass of all objects. As enhancement to SurfacePatch3D the Object3D class has a well-defined interior and therefore have to provide a function which defines if a point is inside or not.
Author:
Micha Riser


Constructor & Destructor Documentation

Object3D::Object3D  )  [inline]
 

Constructs an object at origin. Material defaults to 0 and object not inversed.

Object3D::Object3D Vector3  location  )  [inline]
 

Constructs an object at given position. Material defaults to 0 and object not inversed.

Parameters:
location Position to create the object.

Object3D::Object3D const Object3D o  )  [protected]
 

Copy constructor.


Member Function Documentation

void Object3D::applyMatrix const Matrix m  )  [virtual]
 

Transform by non-singular matrix.

Parameters:
M matrix for which matrix L exists with M*L = I

Reimplemented from TransparentTransformatable.

void Object3D::applyOrthogonalMatrix const Matrix m  )  [virtual]
 

Transform by orthogonal matrix.

Parameters:
M matrix for which M * M^T = I holds

Reimplemented from TransparentTransformatable.

virtual Vector3 Object3D::getBoundingMax  )  const [inline, virtual]
 

Get bounding dimension (maximum edge).

Implements SurfacePatch3D.

Reimplemented in Box, and Sphere.

virtual Vector3 Object3D::getBoundingMin  )  const [inline, virtual]
 

Get bounding dimension (minimum edge).

Implements SurfacePatch3D.

Reimplemented in Box, and Sphere.

virtual bool Object3D::hasFinitBounding  )  const [inline, virtual]
 

Returns true if the surface can be enclosed by a finit box.

Implements SurfacePatch3D.

Reimplemented in Box, and Sphere.

virtual Intersection* Object3D::intersect const Ray r  )  const [inline, virtual]
 

Intersect object with ray.

Parameters:
r the Ray
Returns:
0 if no intersection else Intersection object

Reimplemented from SurfacePatch3D.

DBL Object3D::intersectBounding const Ray r,
DBL  tmax
const [virtual]
 

Intersect Bounding 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 bounding. Otherwise it returns the time of first intersection with box.

Implements SurfacePatch3D.

DBL Object3D::intersectBounding const Ray r  )  const [virtual]
 

Intersect Bounding with Ray.

Parameters:
r the Ray
Returns:
-1 if no intersection, INTERSECTION_TIME_EPSILON if Ray's origin is inside the bounding. Otherwise it returns the time of first intersection with box.

Implements SurfacePatch3D.

virtual Intersection* Object3D::intersectLimitedTime const Ray r,
DBL  maxtime
const [inline, virtual]
 

Intersect object with ray limited to maximum time.

Parameters:
r the Ray
maxtime maximal intersecting time
Returns:
0 if no intersection else Intersection object

Implements SurfacePatch3D.

virtual Object3D* Object3D::invert  )  const [inline, virtual]
 

Inverse the object.

Returns:
a copy of the object with inversed interior

virtual bool Object3D::isInsideAt const Vector3 locallocation  )  const [protected, pure virtual]
 

Test point for insideness.

Parameters:
locallocation point in object space to test
Returns:
true if point is inside the object else false

Implemented in Box, Cylinder, Isosurface, Plane, and Sphere.

bool Object3D::isInsideAtBounded Vector3  location  )  const [inline]
 

Test point for insidness.

Parameters:
location test point
Returns:
true if point is inside object else false

bool Object3D::isInverse  )  const [inline]
 

Returns:
true if object is inversed else false

void Object3D::listInside const Vector3 location,
InsideList l
const [virtual]
 

Create insidness list. Adds the object (or all subcomponents in the case of a container object) to the given list if the location is inside.

Parameters:
location the test point
l list to add the object

void Object3D::rotateDeg const Vector3 v  )  [virtual]
 

Rotate around x,y and z axis.

Parameters:
v vector holding the rotation angles in degrees

Reimplemented from TransparentTransformatable.

Reimplemented in Box, and Sphere.

void Object3D::rotateRad const Vector3 v  )  [virtual]
 

Rotate around x,y and z axis.

Parameters:
v vector holding the rotation angles in radians

Reimplemented from TransparentTransformatable.

Reimplemented in Box, and Sphere.

void Object3D::scale const Vector3 v  )  [virtual]
 

Scale by x,y,z factor from vector.

Reimplemented from TransparentTransformatable.

Reimplemented in Box, and Sphere.

void Object3D::setFinish const Finish f  ) 
 

Set / override object's finish.

Parameters:
f new Finish

void Object3D::setInterior const Interior i  ) 
 

Set / override object's interior.

Parameters:
i new Interior

void Object3D::setMaterial const Material3D m  ) 
 

Set / override object's material.

Parameters:
m new Material3D

void Object3D::setMedia const Media3D m  ) 
 

Set / override object's media.

Parameters:
m new Media3D

void Object3D::setPigment const Pigment3D p  ) 
 

Set / override object's pigment.

Parameters:
p new Pigment3D

void Object3D::setTexture const Texture3D t  ) 
 

Set / override object's texture.

Parameters:
t new Texture3D

virtual PatchObject* Object3D::toPatch double  precision  )  const [inline, virtual]
 

Creates an approximatly equivalent object out of 'patches'. Returns

Parameters:
precision max tolerance for the surface to be away from the original
Returns:
pointer to approximated object, 0 if method not implemented

Reimplemented in Sphere.

void Object3D::transform const TransparentTransformatable t  )  [virtual]
 

Transform the same way as given Transformatable.

Reimplemented from TransparentTransformatable.

void Object3D::transformInverse const TransparentTransformatable t  )  [virtual]
 

Transform inverse as given Transformatble.

Reimplemented from TransparentTransformatable.

void Object3D::translate const Vector3 v  )  [virtual]
 

Translate by vector.

Reimplemented from TransparentTransformatable.

Reimplemented in Box.


Member Data Documentation

BoundingBox* Object3D::boundingbox [protected]
 

The object's bounding box.

bool Object3D::inverse [protected]
 

Holds the object's inverting status. True means inversed.

Reimplemented from TransparentTransformatable.

Material3D* Object3D::material
 

The object's material.


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