#include <collection.h>
Inheritance diagram for toxic::Collection:

Public Member Functions | |
| Collection (const sheep::Matrix4 &m, IntersectionMask intersection_mask=INTERSECT_ALL_RAYS) | |
| m is the object space to world space transformation matrix. | |
| virtual | ~Collection () |
| A collection deletes its children when it is destructed. | |
| void | Insert (IObject *object) |
| virtual void | Finalize (const Context &context) |
| virtual int | GetObjectCount () const |
| virtual bool | Intersect (const Context &context, const Ray &ray, Hit *hit=0) const |
| virtual void | Annotate (const Context &context, const ICamera *camera, Framebuffer *framebuffer) const |
Private Types | |
| typedef std::vector< IObject * > | object_vector |
| typedef object_vector::const_iterator | object_vector_const_it |
Private Attributes | |
| object_vector | m_objects |
| int | m_object_count |
| Number of child objects. Computed by the Finalize() method. | |
|
|
Definition at line 79 of file collection.h. |
|
|
Definition at line 80 of file collection.h. Referenced by Annotate(), Finalize(), Intersect(), and ~Collection(). |
|
||||||||||||
|
m is the object space to world space transformation matrix.
Definition at line 34 of file collection.cpp. |
|
|
A collection deletes its children when it is destructed.
Definition at line 41 of file collection.cpp. References object_vector_const_it. |
|
||||||||||||||||
|
Reimplemented from toxic::IObject. Definition at line 105 of file collection.cpp. References object_vector_const_it. |
|
|
This method must be called only once, after the object is completely configured, and before it is used for the first time. Reimplemented from toxic::IObject. Definition at line 52 of file collection.cpp. References toxic::IObject::Finalize(), toxic::IObject::GetObjectCount(), m_object_count, and object_vector_const_it. Referenced by toxic::SceneBuilder::SceneBuilder(). |
|
|
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 from toxic::IObject. Definition at line 109 of file collection.h. |
|
|
Definition at line 47 of file collection.cpp. Referenced by toxic::SceneBuilder::insert_into_scene(), and toxic::SceneBuilder::SceneBuilder(). |
|
||||||||||||||||
|
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.
Implements toxic::IObject. Definition at line 64 of file collection.cpp. References toxic::Ray::GetType(), toxic::IObject::Intersect(), toxic::Hit::m_abscissa, max(), and object_vector_const_it. |
|
|
Number of child objects. Computed by the Finalize() method.
Definition at line 83 of file collection.h. Referenced by Finalize(). |
|
|
Definition at line 82 of file collection.h. |
1.3.6