RiObjectBuilder

Base class for all primitive builders.

This is an abstract class and cannot be directly instanced.


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

Quick Index

DESCRIPTION
USING BUILD AND RESET:

Class Summary

class RiObjectBuilder
{
public:
enum Products ;
// Constructors and assignment
RiObjectBuilder(Products wanted );
~RiObjectBuilder();
// Accessors
int GetNumRayObjects() const;
RiRayObject *GetRayObject(int i) const;
// Members
bool Build(); // pure virtual
void Reset();
protected:
// Accessors for Derived classes
bool WantRayObjects() const;
void AddRayObject(RiRayObject *obj);
}; // RiObjectBuilder


DESCRIPTION

This class encapsulates building objects. It maintains the lists of various types of objects that are being built, as well as a global list of objects that can and should be deleted when the model is finished. Users get the built objects out of the builder by calling the various Get routines for the types being built. The user passes into the constructor the OR'd flags describing which type of objects should be built (Ray, Rad, Display....)


USING BUILD AND RESET:

Calling build appends the new objects to the previously built objects. Once the objects have been taken out of the builder, the user should call reset. This allows builders to be passed into readers and accumulate all geometry. Once the reader is finished, the builders can be querried for everything that was built.


enum Products ;

enumeration of the possible products, used to determine what to build.

    enum Products {noneFlag = 0, rayFlag = 1, radFlag = 2, displayFlag = 4};

RiObjectBuilder(Products wanted );

Default Constructor

    RiObjectBuilder(Products wanted = rayFlag);

~RiObjectBuilder();

Destructor

    virtual ~RiObjectBuilder();

int GetNumRayObjects() const;

    int         	 GetNumRayObjects() const;

RiRayObject *GetRayObject(int i) const;

    RiRayObject 	*GetRayObject(int i) const;

bool Build();

Builds all objects wanted. It should reset the builder to a state where it can accept new data and build more objects.

    virtual bool 	 Build();    

void Reset();

Resets the accumulated lists of built objects.

    void 		 Reset();

bool WantRayObjects() const;

should be called by Build to see if if RiRayObject should be built.

    bool		 WantRayObjects() const;

void AddRayObject(RiRayObject *obj);

Add another built RiRayObject.

    void AddRayObject(RiRayObject *obj);

All Members

public:
enum Products ;
// Accessors
int GetNumRayObjects() const;
RiRayObject *GetRayObject(int i) const;
// Members
bool Build(); // pure virtual
void Reset();
protected:
// Accessors for Derived classes
bool WantRayObjects() const;
void AddRayObject(RiRayObject *obj);

Ancestors

Class does not inherit from any other class.


Descendants


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