librtl

rtl_subobject Class Reference

Sub-object for geometric objects. More...

#include <sobject.h>

Inherits dyn_collectable.

Inherited by rtl_groupmem and rtl_object.

List of all members.

Public Members

Static Public Members

Protected Members


Detailed Description

Sub-object for geometric objects.

This class is an abstract definition of the basic elements of a geometric object. All classes that are renderable should inherit from this class and implement the intersection and normal functions.


Member Function Documentation

virtual jFlt rtl_subobject::intersect( const rtl_ray& ray, bool = false ) [virtual]

Intersects a ray with this object. This object is the default behaviour all objects shoud call this function in their intersect routine. If the default does no return NOHIT then do not continue intersection. This function transforms the ray into object space and calls lclintersect. The bool should be true if this class is a re-hit from a csg class.

Reimplemented in rtl_triangle, rtl_soft::rtl_softvoxel, rtl_polyhedron, rtl_object and rtl_groupobj.

virtual jNorm3 rtl_subobject::normal() = 0 [pure virtual]

Returns the normal at the position of the last successfull intersection calculation.

Reimplemented in rtl_triangle, rtl_soft::rtl_softvoxel and rtl_object.

virtual bool rtl_subobject::volintersect( const jBBox& b ) const [virtual]

Returns true if this object intersects with the given axis aligned box. The default is true because this function is used to cull the object from a subdivision of space, true means the object will never be culled.

Reimplemented in rtl_triangle, rtl_polyhedron and rtl_object.

const jBBox& rtl_subobject::bounds() const

Return the bounding box for this object (in world space).

virtual rtl_material* rtl_subobject::material() [virtual]

Returns the material for this sub-object.

Reimplemented in rtl_triangle, rtl_polyhedron, rtl_object and rtl_groupmem.

rtl_flags& rtl_subobject::flags()

Returns the flags for this object.

rtl_flags& rtl_subobject::flags()

Returns the flags for this object.

virtual const rtl_subobject* rtl_subobject::subobject() const [virtual]

Returns the sub-object that was struck by the ray during the last call to intersect. The return of this function should only really differ from this in the case of a grouped object (rtl_groupobj). You should never need to override this function.

Reimplemented in rtl_groupobj.

virtual const rtl_object* rtl_subobject::group() const [virtual]

Returns the object that contains this subobject. If this object is a sub-class of rtl_groupmem then the return will not be valid, otherwise the object cannot be contained and will return 0.

Reimplemented in rtl_groupmem.

virtual void rtl_subobject::setBounds( const jBBox& _b ) [virtual]

Set the bounding box for this object (in object space). This function should not be called after an object has been added to a rtl_world object.

Reimplemented in rtl_object.

rtl_subobject::rtl_subobject() [protected]


Member Data Documentation

const jULng rtl_subobject::NegateNormal [static]

On if the illumination model should negate the normal.

const jULng rtl_subobject::Bounded [static]

On if the object has a defined bounding box, off by default. All objects must have a defined bounding box if they are to be added to scenes with space subdivision.

jBBox rtl_subobject::bnd [protected]

rtl_flags rtl_subobject::f [protected]

Reimplemented in rtl_superellipsoid.

jUInt rtl_subobject::raysig [protected]

jFlt rtl_subobject::t [protected]

Reimplemented in rtl_object.


The documentation for this class was generated from the following file:
JSP / librtl v0.2 mtigges@cpsc.ucalgary.ca