My Project
Public Member Functions | List of all members
RayFileInstance Class Reference

#include <rayFileInstance.h>

Inheritance diagram for RayFileInstance:

Public Member Functions

 RayFileInstance (RayFile *rayFile)
void write (int indent, FILE *fp=stdout)
double intersect (Ray3D ray, struct RayIntersectionInfo &iInfo, double mx=-1)
BoundingBox3D setBoundingBox (void)
void setUpOpenGL (int cplx)
int drawOpenGL (int materialIndex)
int isStatic (void)

Additional Inherited Members

- Public Attributes inherited from RayShape
BoundingBox3D bBox
int openGLComplexity

Detailed Description

This subclass of RayShape stores a reference to a .ray file included in the scene-graph.

Member Function Documentation

int RayFileInstance::drawOpenGL ( int  materialIndex)

This method calls the necessary OpenGL commands to render the primitive.

Implements RayShape.

double RayFileInstance::intersect ( Ray3D  ray,
struct RayIntersectionInfo iInfo,
double  mx = -1 

This method computes the intersection of the shape with the ray. If the ray hits the shape and either mx is less than zero or the intersection occurs at a distance less than mx along the ray the intersection information in iInfo is set and a value greater than 0 is returned. Otherwise, -1 is returned. (This is useful for shadow testing when you may want to ignore hits beyond a certain distance).

Implements RayShape.

int RayFileInstance::isStatic ( void  )

This method returns a value of 1 if the RayShape's geometry doesn't change.

Reimplemented from RayShape.

BoundingBox3D RayFileInstance::setBoundingBox ( void  )

This method sets and returns a bounding box containing the shape.

Implements RayShape.

void RayFileInstance::setUpOpenGL ( int  cplx)

This method sets up all the stuff that's necessary prior to OpenGL rendering. The value cplx represents the desired resolution of tessalation for objects such as spheres, cylinders, etc..

Implements RayShape.

void RayFileInstance::write ( int  indent,
FILE *  fp = stdout 

This method writes the RayShape out to a .ray file, indenting the output by the specified amount. If no file is specified, the information gets written to stdout.

Implements RayShape.

The documentation for this class was generated from the following files: