RiRayObject

Describes Functionality for all objects that are to be ray traced

This is an abstract class and cannot be directly instanced.


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

Quick Index

DESCRIPTION
IMPLEMENTATION DETAILS:

Class Summary

class RiRayObject
{
public:
~RiRayObject() ;
// Members
RiInterval GetMinMax(const RiUnitVector3 &) const; // pure virtual
bool Shadow(RiRay3 &) const; // pure virtual
bool Intersect(RiRay3 &, RiRayHit &); // pure virtual
void Accept(RiRayObjectVisitor &visitor); // pure virtual
RiLightObject *BuildLightObject(const RiAffineTMatrix3 &mat);
RiReal ConditionalHit() const;
protected:
}; // RiRayObject


DESCRIPTION

This is a Mixin class. It contains no data, only functionality It is abstract. All objects to be ray traced must inherit from RiRayObject. In general, RiRayObject can be querried to create an RiBBox and can be intersected by an RiRay. The intersection results in an RiRayHit. All of these functions are const. If the internals change (evaluation of procedural geometry), use that volitile construct.


IMPLEMENTATION DETAILS:

The Intersect routine must set data in the hit and in the ray. The fields that must be set by the object are Object, Material, Normal, and UV's. The ray must have it's max distance set to the intersection t value.


~RiRayObject() ;

Destructor

    virtual ~RiRayObject()   
;

Function is currently defined inline.


RiInterval GetMinMax(const RiUnitVector3 &) const;

General interface for acceleration querries such as bounding boxes and spheres.

    virtual RiInterval  GetMinMax(const RiUnitVector3 &) const;    

bool Shadow(RiRay3 &) const;

Does the ray hit the object. Nothing more.

    virtual bool	Shadow(RiRay3 &) const;    

bool Intersect(RiRay3 &, RiRayHit &);

Compute an intersection and return it and any other data in the RiRayHit structure. The T value for the ray is set correctly based on the intersection point.

    virtual bool	Intersect(RiRay3 &, RiRayHit &);    

void Accept(RiRayObjectVisitor &visitor);

Accept a visitor to perform (structure preserving) actions on the hierarchy

    virtual void	Accept(RiRayObjectVisitor &visitor);    

RiLightObject *BuildLightObject(const RiAffineTMatrix3 &mat);

Build a RiLightObject if possible, otherwise return NULL;

    virtual RiLightObject *BuildLightObject(const RiAffineTMatrix3 &mat);

RiReal ConditionalHit() const;

Estimated probability of hitting a primitive given that a ray hits this object's bounding box.

    virtual RiReal 	ConditionalHit() const;

All Members

public:
// Members
RiInterval GetMinMax(const RiUnitVector3 &) const; // pure virtual
bool Shadow(RiRay3 &) const; // pure virtual
bool Intersect(RiRay3 &, RiRayHit &); // pure virtual
void Accept(RiRayObjectVisitor &visitor); // pure virtual
RiLightObject *BuildLightObject(const RiAffineTMatrix3 &mat);
RiReal ConditionalHit() const;
protected:

Ancestors

Class does not inherit from any other class.


Descendants


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