#include <iobject.h>
Inheritance diagram for toxic::IObject:

Public Types | |
| enum | IntersectionMask { INTERSECT_NO_RAYS = 0, INTERSECT_VISIBILITY_RAYS = 1, INTERSECT_PRIMARY_RAYS = 2, INTERSECT_REFLECTED_RAYS = 4, INTERSECT_SHADOW_RAYS = 8, INTERSECT_PHOTON_RAYS = 16, INTERSECT_PRIMARY_FG_RAYS = 32, INTERSECT_SECONDARY_FG_RAYS = 64, INTERSECT_AUTOFOCUS_RAYS = 128, INTERSECT_ALL_RAYS } |
Public Member Functions | |
| IObject (const sheep::Matrix4 &m, const ISurfaceShader *surface_shader=0, IntersectionMask intersection_mask=INTERSECT_ALL_RAYS) | |
| virtual | ~IObject () |
| virtual void | Finalize (const Context &context) |
| virtual int | GetObjectCount () const |
| void | SetSurfaceShader (const ISurfaceShader *surface_shader) |
| const ISurfaceShader * | GetSurfaceShader () const |
| virtual bool | Intersect (const Context &context, const Ray &ray, Hit *hit=0) const=0 |
| virtual void | Annotate (const Context &context, const ICamera *camera, Framebuffer *framebuffer) const |
Public Attributes | |
| int | m_mailbox_ray_id |
| Id of the last ray tested against this object. | |
Protected Attributes | |
| const ISurfaceShader * | m_surface_shader |
| IntersectionMask | m_intersection_mask |
|
|
|
|
||||||||||||||||
|
m is the object space to world space transformation matrix. The 'surface_shader' pointer may be null because some objects (like the Collection and Octree objects) don't need a shader. Definition at line 29 of file iobject.cpp. References USE_MAILBOXES. |
|
|
|
|
||||||||||||||||
|
Reimplemented in toxic::Collection, toxic::Mesh, and toxic::Octree. Definition at line 103 of file iobject.h. Referenced by toxic::Renderer::Annotate(). |
|
|
This method must be called only once, after the object is completely configured, and before it is used for the first time. Reimplemented in toxic::Collection, toxic::IAreaLight, toxic::Mesh, and toxic::Octree. Definition at line 83 of file iobject.h. Referenced by toxic::Octree::Finalize(), and toxic::Collection::Finalize(). |
|
|
This method returns the number of objects contained into this object. For primitives, it returns 1. For composite objects (like the Collection object), it returns the number of child objects. Reimplemented in toxic::Collection, and toxic::Octree. Definition at line 88 of file iobject.h. Referenced by toxic::Octree::Finalize(), toxic::Collection::Finalize(), and main(). |
|
|
||||||||||||||||
|
This method returns true if the ray intersect the object, or false otherwise. If 'hit' is not null, intersection data are reported through the 'hit' parameter (only if an intersection has been found; if no intersection has been found, the 'hit' parameter is left unchanged). The ray is expressed in world space. Implemented in toxic::Collection, toxic::Cube, toxic::DummyObject, toxic::Mesh, toxic::Octree, toxic::Plane, toxic::Ring, toxic::Sphere, and toxic::Square. Referenced by toxic::Octree::Intersect(), toxic::Collection::Intersect(), and toxic::Octree::octree_full_visitor::Trace(). |
|
|
|
|
|
|
|
|
Id of the last ray tested against this object.
Definition at line 67 of file iobject.h. Referenced by toxic::Octree::octree_full_visitor::Trace(). |
|
|
|
1.3.6