#include <cube.h>
Inheritance diagram for toxic::Cube:

Public Member Functions | |
| Cube (const sheep::Matrix4 &m, const ISurfaceShader *surface_shader, IntersectionMask intersection_mask=INTERSECT_ALL_RAYS) | |
| m is the object space to world space transformation matrix. | |
| 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 |
Private Attributes | |
| sheep::Point3 | m_center |
| Center of the object, expressed in world space. | |
| sheep::Vector3 | m_ex |
| sheep::Vector3 | m_ey |
| sheep::Vector3 | m_ez |
| Basis vectors, expressed in world space. | |
| sheep::AABB3 | m_aabb |
| Bounding box of the object, expressed in world space. | |
|
||||||||||||||||
|
m is the object space to world space transformation matrix.
Definition at line 42 of file cube.cpp. References sheep::AABB3::Extend(), m_aabb, toxic::OBJECT_AABB_EXTENSION(), and sheep::AABB3::Transform(). |
|
|
Computes the surface area of this object.
Implements toxic::IBoundedObject. |
|
||||||||||||||||
|
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. |
|
|
Returns the Axis Aligned Bounding Box of this object. The AABB is expressed in world space. Implements toxic::IBoundedObject. |
|
||||||||||||||||
|
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 74 of file cube.cpp. References toxic::Ray::GetType(), toxic::Hit::m_abscissa, toxic::Ray::m_direction, toxic::Hit::m_geometric_normal, toxic::Statistics::m_intersections_found, toxic::Hit::m_object, toxic::Ray::m_origin, toxic::Hit::m_shading_normal, toxic::Context::m_statistics, toxic::Statistics::m_tested_intersections, sheep::Point3::m_x, sheep::Vector3::m_x, sheep::Vector3::m_y, sheep::Point3::m_y, sheep::Vector3::m_z, sheep::Point3::m_z, max(), and toxic::Basis::TransformToLocal(). |
|
|
Bounding box of the object, expressed in world space.
Definition at line 85 of file cube.h. Referenced by Cube(). |
|
|
Center of the object, expressed in world space.
|
|
|
|
|
|
|
|
|
Basis vectors, expressed in world space.
|
1.3.6