class Object3D

Superclass of all objects. More...

Contains pure virtuals
Definition#include <raytracer/object3d.h>
InheritsTransformatable [public ]
Inherited byBox, CSG, Isosurface, Plane, Sphere
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members

Protected Methods

Private Methods


Detailed Description

Superclass of all objects.

Material3D* material

material

BoundingBox* boundingbox

boundingbox

bool inversed

inversed

 Object3D ()

Object3D

Constructs an object at origin. Material and bounding box default to 0 and object not inversed.

 Object3D (Vector3 location)

Object3D

Constructs an object at given position. Material and bounding box default to 0 and object not inversed.

Parameters:
locationPosition to create the object.

 ~Object3D ()

~Object3D

[virtual]

 Object3D (const Object3D &o)

Object3D

[protected]

Copy constructor.

Object3D&  operator= (const Object3D&)

operator=

[private]

Reimplemented from Transformatable.

Object3D*  duplicate ()

duplicate

[const pure virtual]

Create a duplicate of the object.

Returns: duplicate

Intersection*  intersectUnBounded (const Ray &r)

intersectUnBounded

[pure virtual]

Intersect object with ray.

Parameters:
rthe Ray

Returns: 0 if no intersection else Intersection object

Intersection*  intersectUnBounded (const Ray &r, DBL maxtime)

intersectUnBounded

[pure virtual]

Intersect object with ray limited to maximum time

Parameters:
rthe Ray
maxtimemaximal intersecting time

Returns: 0 if no intersection else Intersection object

bool  isInsideAt (const Vector3 &locallocation)

isInsideAt

[const pure virtual]

Test point for insidness.

Parameters:
locallocationpoint in object space to test

Returns: true if point is inside the object else false

void  setMaterial (const Material3D &m)

setMaterial

Set / override object's material.

Parameters:
mnew Material3D

void  setTexture (const Texture3D &t)

setTexture

Set / override object's texture.

Parameters:
tnew Texture3D

void  setPigment (const Pigment3D &p)

setPigment

Set / override object's pigment.

Parameters:
pnew Pigment3D

void  setFinish (const Finish &f)

setFinish

Set / override object's finish.

Parameters:
fnew Finish

void  setInterior (const Interior &i)

setInterior

Set / override object's interior.

Parameters:
inew Interior

void  setMedia (const Media3D &m)

setMedia

Set / override object's media.

Parameters:
mnew Media3D

void  translate (const Vector3 &v)

translate

[virtual]

Reimplemented from Transformatable.

void  scale (Vector3 v)

scale

[virtual]

Reimplemented from Transformatable.

void  rotate (const Vector3 &v)

rotate

[virtual]

Reimplemented from Transformatable.

void  transform (const Transformatable& t)

transform

[virtual]

Reimplemented from Transformatable.

void  transformInverse (const Transformatable& t)

transformInverse

[virtual]

Reimplemented from Transformatable.

void  inverse ()

inverse

[virtual]

Inverse the object.

void  listInside (const Vector3& location, InsideList& l)

listInside

[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:
locationthe test point
llist to add the object

void  prepareToRender ()

prepareToRender

[virtual]

Prepare object for render process. Some optimisations can be done only before the rendering starts. This is the method that is to be called just before doing so.

bool  isInsideAtBounded (Vector3 location)

isInsideAtBounded

[const]

Test point for insidness.

Parameters:
locationtest point

Returns: true if point is inside object else false

bool  hitsBounding (const Ray& r)

hitsBounding

Test ray against object's bounding.

Parameters:
rtest ray

Returns: false if ray misses the bounding else true

bool  hitsBounding (const Ray& r, double tmax)

hitsBounding

Test ray against object's bounding with limited maximum time.

Parameters:
rtest ray
tmaxmaximal intersecting time

Returns: false if ray misses the bounding else true

bool  isInversed ()

isInversed

[const]

Returns: true if object is inversed else false