#include <octree.h>
Inheritance diagram for toxic::Octree:

Public Member Functions | |
| Octree (const sheep::Matrix4 &m, int pop_threshold=DEFAULT_OCTREE_POP_THRESHOLD, int max_subdiv=DEFAULT_OCTREE_MAX_SUBDIV, IntersectionMask intersection_mask=INTERSECT_ALL_RAYS) | |
| m is the object space to world space transformation matrix. | |
| virtual | ~Octree () |
| An octree deletes its children when it is destructed. | |
| void | Insert (IBoundedObject *object) |
| virtual void | Finalize (const Context &context) |
| virtual int | GetObjectCount () const |
| virtual const sheep::AABB3 & | GetAABB () const |
| virtual sheep::Real | ComputeSurfaceArea () const |
| Computes the surface area of this object. | |
| virtual void | EvaluateSurface (const sheep::Point2 &input, sheep::Point3 *point, sheep::Vector3 *geometric_normal) 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< IBoundedObject * > | object_vector |
| typedef object_vector::const_iterator | object_vector_const_it |
| typedef sheep::OctreeNode< const IBoundedObject * > | octree_node |
| typedef sheep::Octree< const IBoundedObject * > | octree |
Private Attributes | |
| object_vector | m_objects |
| int | m_object_count |
| Number of child objects. Computed by the Finalize() method. | |
| int | m_pop_threshold |
| Octree parameters. | |
| int | m_max_subdiv |
| octree * | m_octree |
| Used only if the octree contains enough objects. | |
| sheep::AABB3 | m_aabb |
| Bounding box of the object, expressed in world space. | |
|
|
Definition at line 107 of file toxic/src/renderer/octree.h. |
|
|
Definition at line 108 of file toxic/src/renderer/octree.h. |
|
|
Definition at line 111 of file toxic/src/renderer/octree.h. Referenced by Finalize(). |
|
|
Definition at line 110 of file toxic/src/renderer/octree.h. |
|
||||||||||||||||||||
|
m is the object space to world space transformation matrix.
Definition at line 37 of file toxic/src/renderer/octree.cpp. |
|
|
An octree deletes its children when it is destructed.
Definition at line 49 of file toxic/src/renderer/octree.cpp. |
|
||||||||||||||||
|
Reimplemented from toxic::IObject. Definition at line 180 of file toxic/src/renderer/octree.cpp. |
|
|
Computes the surface area of this object.
Implements toxic::IBoundedObject. Definition at line 101 of file toxic/src/renderer/octree.cpp. |
|
||||||||||||||||
|
Given a point in the unit square (the set of points in [0..1]^2), this method computes the corresponding surface point and normal (both are expressed in world space).
Implements toxic::IBoundedObject. Definition at line 107 of file toxic/src/renderer/octree.cpp. |
|
|
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 62 of file toxic/src/renderer/octree.cpp. References toxic::IObject::Finalize(), toxic::IObject::GetObjectCount(), sheep::AABB3::Include(), sheep::AABB3::Invalidate(), m_max_subdiv, m_pop_threshold, and octree. |
|
|
Returns the Axis Aligned Bounding Box of this object. The AABB is expressed in world space. Implements toxic::IBoundedObject. Definition at line 184 of file toxic/src/renderer/octree.h. |
|
|
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 179 of file toxic/src/renderer/octree.h. |
|
|
Definition at line 57 of file toxic/src/renderer/octree.cpp. Referenced by toxic::SceneBuilder::insert_into_scene(). |
|
||||||||||||||||
|
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 118 of file toxic/src/renderer/octree.cpp. References toxic::Ray::GetType(), toxic::IObject::Intersect(), toxic::Hit::m_abscissa, toxic::Ray::m_direction, toxic::Octree::octree_test_visitor::m_found, toxic::Octree::octree_full_visitor::m_nearest, toxic::Ray::m_origin, and max(). |
|
|
Bounding box of the object, expressed in world space.
Definition at line 153 of file toxic/src/renderer/octree.h. |
|
|
Definition at line 149 of file toxic/src/renderer/octree.h. Referenced by Finalize(). |
|
|
Number of child objects. Computed by the Finalize() method.
Definition at line 145 of file toxic/src/renderer/octree.h. |
|
|
Definition at line 144 of file toxic/src/renderer/octree.h. |
|
|
Used only if the octree contains enough objects.
Definition at line 151 of file toxic/src/renderer/octree.h. |
|
|
Octree parameters.
Definition at line 148 of file toxic/src/renderer/octree.h. Referenced by Finalize(). |
1.3.6