RiRadObject

Abstraction of all operations needed for an object to participate in a radiosity simulation.

This is an abstract class and cannot be directly instanced.


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

Quick Index

DESCRIPTION

Class Summary

class RiRadObject
{
public:
RiRadObject();
~RiRadObject() ;
// Members
RiReal GetSample(RiRadRegion &sample, const RiVector2 &uv); // pure virtual
RiReal GetFormFactorSample(RiRadRegion &sample, const RiMaterialRegion &interestedSample, const RiVector2 &uv);
void ComputeTransfer(const RiMaterialRegion &sample, RiTransferData &data); // pure virtual
RiRadData *GetRadData(); // pure virtual
RiConvexHull GetConvexHull(); // pure virtual
bool IsVisible(const RiConvexHull &hull); // pure virtual
// Structural
int GetNumChildren(); // pure virtual
RiRadObject *GetChild(int i); // pure virtual
bool Subdivide(); // pure virtual
RiReal GetArea(); // pure virtual
RiRadObject *GetRadObject(const RiMaterialRegion &sample);
void SetParent(RiRadObject *obj);
RiRadObject *GetParent();
protected:
}; // RiRadObject


DESCRIPTION

All operations needed for an object to participate in a radiosity simulation are included here. This task was made simpler by three other classes. RiRadRegion hides the notion of a sample point on a RiRadObject. RiTransferData hides the data needed to describe a transfer, either energy or form factors. RiRadData hides the energy and link values and temporaries that may be needed by the simulation.


RiRadObject();

Sets parent to NULL

    RiRadObject();

~RiRadObject() ;

Empty virtual destructor

    virtual ~RiRadObject()  
;

Function is currently defined inline.


RiReal GetSample(RiRadRegion &sample, const RiVector2 &uv);

Fills in the data in sample, and returns the Area Weight for the sample. This is the probability density of this point being chosen (1 over the area of the object for uniform sampling.

    virtual RiReal GetSample(RiRadRegion &sample, const RiVector2 &uv);    

RiReal GetFormFactorSample(RiRadRegion &sample, const RiMaterialRegion &interestedSample, const RiVector2 &uv);

Fills in the data in sample, and returns the Form Factor weight for the sample to the interestedSample. interestedSample is used to direct the object so that it will hopefully pick a point visible to the intersted point, reducing variance. Form Factor weight is FFdi,dx / p(x) where p(x) is often the return value from GetSample

    virtual RiReal GetFormFactorSample(RiRadRegion &sample, const RiMaterialRegion &interestedSample,
				       const RiVector2 &uv);

void ComputeTransfer(const RiMaterialRegion &sample, RiTransferData &data);

Compute transfer data for links and lighting. Should eventually include visibility, but currently it does not.

    virtual void	 ComputeTransfer(const RiMaterialRegion &sample, RiTransferData &data);    

RiRadData *GetRadData();

Get the Rad Data from the object

    virtual RiRadData  *GetRadData();    

RiConvexHull GetConvexHull();

Get a convex hull containing the object

    virtual RiConvexHull GetConvexHull();    

bool IsVisible(const RiConvexHull &hull);

Can the object see the convex hull. Note that this operation ONLY involves the object and the hull, not the environment. This is the equivalent of back face culling.

    virtual bool	 IsVisible(const RiConvexHull &hull);    

int GetNumChildren();

Determine the number of children this object has. (0 if no subdivision has been done

    virtual int		 GetNumChildren();    

RiRadObject *GetChild(int i);

Get the ith child (i MUST be less than GetNumChildren)

    virtual RiRadObject *GetChild(int i);    

bool Subdivide();

Subdivide if possible. If already subdivided, do nothing. Return true if subdividable.

    virtual bool	 Subdivide();    

RiReal GetArea();

Compute the surface area (or a good estimate of it) of the object

    virtual RiReal	 GetArea();    

RiRadObject *GetRadObject(const RiMaterialRegion &sample);

find the leaf associated with this sample (If no leaf, return NULL)

    virtual RiRadObject *GetRadObject(const RiMaterialRegion &sample);

void SetParent(RiRadObject *obj);

    void	 SetParent(RiRadObject *obj);

RiRadObject *GetParent();

    RiRadObject *GetParent();

All Members

public:
// Members
RiReal GetSample(RiRadRegion &sample, const RiVector2 &uv); // pure virtual
RiReal GetFormFactorSample(RiRadRegion &sample, const RiMaterialRegion &interestedSample, const RiVector2 &uv);
void ComputeTransfer(const RiMaterialRegion &sample, RiTransferData &data); // pure virtual
RiRadData *GetRadData(); // pure virtual
RiConvexHull GetConvexHull(); // pure virtual
bool IsVisible(const RiConvexHull &hull); // pure virtual
// Structural
int GetNumChildren(); // pure virtual
RiRadObject *GetChild(int i); // pure virtual
bool Subdivide(); // pure virtual
RiReal GetArea(); // pure virtual
RiRadObject *GetRadObject(const RiMaterialRegion &sample);
void SetParent(RiRadObject *obj);
RiRadObject *GetParent();
protected:

Ancestors

Class does not inherit from any other class.


Descendants


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