#include <Object.hh>


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 Material & | M |
| Bool | Visible |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Object &O) |
| World::Object::Object | ( | const Material & | M, | |
| Bool | Visible = true | |||
| ) | [inline] |
| 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<<().

| 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().

| 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().

| 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().

| 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().


| 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().


| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Object & | O | |||
| ) | [friend] |
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] |
1.5.5