librtl

rtl_groupobj Class Reference

A renderable object which is a collection of renderable objects. More...

#include <groupobject.h>

Inherits rtl_object.

Inherited by rtl_polyhedron and rtl_soft.

List of all members.

Public Members

Protected Members

Static Protected Members


Detailed Description

A renderable object which is a collection of renderable objects.

This class provides the ability to group a large number of closely spaced objects within a local bounding space. This can provide for efficient intersection calculation with a group of primitives like polygons.

The add functions may be called only up until the first intersection calculation. After the first call to lclintersect the object is considered to be completely defined and objects and materials are ignored after this time.


Member Function Documentation

rtl_groupobj::rtl_groupobj()

Constructs an empty mass of objects.

rtl_groupobj::rtl_groupobj( rtl_groupobj* )

Constructs a mass of objects which references (through pointers) the group of objects in the given group.

rtl_groupobj::~rtl_groupobj()

void rtl_groupobj::add( rtl_groupmem* )

Add a renderable primitive to the group of objects.

void rtl_groupobj::add( rtl_material* )

Add a material to the table of materials.

Examples:
Polyhedrons.

rtl_material* rtl_groupobj::getMaterial( jInt i )

Returns the ith material, or the material for this object if i is not -1. Note that this implies no other range checking.

const rtl_subobject* rtl_groupobj::subobject() const

Returns the sub-object that was struck during the last intersection calculation.

Reimplemented from rtl_subobject.

jFlt rtl_groupobj::intersect( const rtl_ray& ray, bool rehit ) [protected]

Reimplemented from rtl_subobject.

Reimplemented in rtl_polyhedron.

jFlt rtl_groupobj::lclintersect( const rtl_ray& ) [protected]

Computes the local space intersection with the primitives in this object.

Reimplemented from rtl_object.

Reimplemented in rtl_soft.

jNorm3 rtl_groupobj::lclnormal( const jVec3& ) [protected]

Returns the normal at the point last intersected.

Reimplemented from rtl_object.

Reimplemented in rtl_soft.


Member Data Documentation

union { ... } rtl_groupobj::mat [protected]

Table (or linked list) of materials for the primitives in this group.

Reimplemented from rtl_object.

jInt rtl_groupobj::mcnt [protected]

The number of materials in the table.

rtl_lclvoxel* rtl_groupobj::voxel [protected]

Local space subdivision for the acceleration of the local space intersection calculation.

rtl_groupmem* rtl_groupobj::last_hit [protected]

const jULng rtl_groupobj::Reference [static, protected]

Is this group object referencing another.


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