RiRayObjectVisitor

Visitor for RiRayObjects, allowing object specific actions to be performed for each object.

[ Ray | Source | Search | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION
PATTERN

Class Summary

class RiRayObjectVisitor
{
public:
~RiRayObjectVisitor() ;;
// Members
void VisitMaterial(RiRayObject *obj, RiMaterial *mat);
void VisitTransform(RiRayObject *obj, const RiAffineTMatrix3 &mat);
void VisitComposite(RiRayObject *obj);
void VisitSimple(RiRayObject *obj);
protected:
}; // RiRayObjectVisitor


DESCRIPTION

The visitor is accepted by all RiRayObjects. Any appropriate state actions are called by the object and then if the object has any children, the visitor is sent to each child. The VisitComposite action is called AFTER descending to the children (this allows the visitor to do any necessary initialization first. The appropriate actions are called in a specific order.
Traversal Ordering
VisitMaterial
VisitTransform
Descend to children if they exist
Visit[Composite|Simple]


PATTERN

Visitor Template Method (since multiple VisitXXXX functions may be called depending upon the object)


~RiRayObjectVisitor() ;;

Destructor

    virtual ~RiRayObjectVisitor()   ;
;

Function is currently defined inline.


void VisitMaterial(RiRayObject *obj, RiMaterial *mat);

Actions for objects with materials (default is do nothing)

    virtual void VisitMaterial(RiRayObject *obj, RiMaterial *mat);

void VisitTransform(RiRayObject *obj, const RiAffineTMatrix3 &mat);

Actions for objects with transformations on children (default is do nothing)

    virtual void VisitTransform(RiRayObject *obj, const RiAffineTMatrix3 &mat);

void VisitComposite(RiRayObject *obj);

Actions for Composite objects (default is do nothing)

    virtual void VisitComposite(RiRayObject *obj);

void VisitSimple(RiRayObject *obj);

Actions for Simple (Leaf) objects (default is do nothing)

    virtual void VisitSimple(RiRayObject *obj);

All Members

public:
// Members
void VisitMaterial(RiRayObject *obj, RiMaterial *mat);
void VisitTransform(RiRayObject *obj, const RiAffineTMatrix3 &mat);
void VisitComposite(RiRayObject *obj);
void VisitSimple(RiRayObject *obj);
protected:

Ancestors

Class does not inherit from any other class.


Descendants

Class is not inherited by any others.


Generated from source by the Cocoon utilities on Fri Feb 25 15:15:55 2000 .