World::Object Class Reference

#include <Object.hh>

Inheritance diagram for World::Object:

Inheritance graph
[legend]
Collaboration diagram for World::Object:

Collaboration graph
[legend]

List of all members.


Detailed Description

Basic object data and interface.

All classes which define scene renderable objects derive from this one.

It enforces interface which allows scene to check collisions with objects and to store them in an octree.

Furthermore it provides functions to query object for it's color at given intersection coordinates.

Definition at line 40 of file Object.hh.


Public Member Functions

 Object (const Material &M, Bool Visible=true)
virtual ~Object ()
virtual Bool Collide (const Render::Ray &R, Double &RayPos) const =0
virtual Math::Vector NormalAt (const Math::Vector &Point) const =0
virtual Math::Point UVAt (const Math::Vector &Point) const =0
const Color ColorAt (const Math::Vector &Point, const Material::Filter F) const
Double GetProperty (Material::Property P) const

Protected Member Functions

virtual std::string Dump () const

Protected Attributes

const MaterialM
Bool Visible

Friends

std::ostream & operator<< (std::ostream &os, const Object &O)

Constructor & Destructor Documentation

World::Object::Object ( const Material M,
Bool  Visible = true 
) [inline]

Initializes object

Definition at line 52 of file Object.hh.

World::Object::~Object (  )  [virtual]

Virtual destructor

Definition at line 25 of file Object.cc.


Member Function Documentation

std::string World::Object::Dump (  )  const [protected, virtual]

Debug function

Reimplemented in World::Plane, and World::Sphere.

Definition at line 29 of file Object.cc.

References M.

Referenced by World::operator<<().

Here is the caller graph for this function:

virtual Bool World::Object::Collide ( const Render::Ray R,
Double &  RayPos 
) const [pure virtual]

Find a collision point with a ray

Implemented in World::Plane, and World::Sphere.

Referenced by World::Scene::Collide().

Here is the caller graph for this function:

virtual Math::Vector World::Object::NormalAt ( const Math::Vector Point  )  const [pure virtual]

Find a normal to the object at it's surface

Implemented in World::Plane, and World::Sphere.

Referenced by Render::Raytracer::Trace().

Here is the caller graph for this function:

virtual Math::Point World::Object::UVAt ( const Math::Vector Point  )  const [pure virtual]

Find object UV coordinates at specified surface location

Implemented in World::Plane, and World::Sphere.

Referenced by ColorAt().

Here is the caller graph for this function:

const Color World::Object::ColorAt ( const Math::Vector Point,
const Material::Filter  F 
) const [inline]

Get color of specified material filter at given object point

Definition at line 77 of file Object.hh.

References World::Material::GetColor(), M, and UVAt().

Referenced by Render::Raytracer::Trace().

Here is the call graph for this function:

Here is the caller graph for this function:

Double World::Object::GetProperty ( Material::Property  P  )  const [inline]

Get a property of object material

Definition at line 83 of file Object.hh.

References World::Material::GetProperty(), and M.

Referenced by Render::Raytracer::Trace().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Object O 
) [friend]

Pretty-printer

Definition at line 38 of file Object.cc.


Member Data Documentation

const Material& World::Object::M [protected]

Object material

Definition at line 43 of file Object.hh.

Referenced by ColorAt(), World::Sphere::Dump(), World::Plane::Dump(), Dump(), and GetProperty().

Bool World::Object::Visible [protected]

Object visibility

Definition at line 46 of file Object.hh.


The documentation for this class was generated from the following files:

Generated on Wed Mar 12 00:36:31 2008 for blaRAY by  doxygen 1.5.5