Main Page | Class Hierarchy | Class List | Class Members

RayGroup Class Reference

Inheritance diagram for RayGroup:

RayShape ParametrizedRayGroup StaticRayGroup ParametrizedClosestRotationAndTranslation ParametrizedEulerAnglesAndTranslation ParametrizedMatrix4D ParametrizedQuaternionAndTranslation ParametrizedRotationLogarithmAndTranslation List of all members.

Public Member Functions

void addShape (RayShape *shape)
int shapeNum (void)
void write (int indent, FILE *fp=stdout)
virtual void writeBegin (int indent, FILE *fp=stdout)=0
virtual void writeEnd (int indent, FILE *fp=stdout)=0
virtual Matrix4D getMatrix (void)=0
virtual Matrix4D getInverseMatrix (void)=0
virtual Matrix4D getNormalMatrix (void)=0
BoundingBox3D setBoundingBox (void)
double intersect (Ray3D ray, struct RayIntersectionInfo &iInfo, double mx=-1)
void setUpOpenGL (int cplx, int setCallList)
int drawOpenGL (int materialIndex)
int getOpenGLCallList (void)

Public Attributes

int sNum
RayShape ** shapes
RayShapeHithits

Detailed Description

This class represents a node in the scene graph with an associated transformation.


Member Function Documentation

void RayGroup::addShape RayShape shape  ) 
 

This method allows one to add a shape to the node.

int RayGroup::drawOpenGL int  materialIndex  )  [virtual]
 

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

Implements RayShape.

virtual Matrix4D RayGroup::getInverseMatrix void   )  [pure virtual]
 

This method returns the inverse of the transformation associated with the group.

Implemented in StaticRayGroup, and ParametrizedRayGroup.

virtual Matrix4D RayGroup::getMatrix void   )  [pure virtual]
 

This method returns the transformation associated with the group.

Implemented in StaticRayGroup, ParametrizedRayGroup, ParametrizedMatrix4D, ParametrizedEulerAnglesAndTranslation, ParametrizedClosestRotationAndTranslation, ParametrizedRotationLogarithmAndTranslation, and ParametrizedQuaternionAndTranslation.

virtual Matrix4D RayGroup::getNormalMatrix void   )  [pure virtual]
 

This method returns the transformation that acts on the surface normals.

Implemented in StaticRayGroup, and ParametrizedRayGroup.

int RayGroup::getOpenGLCallList void   ) 
 

This method generates an OpenGL call list and returns the handle.

double RayGroup::intersect Ray3D  ray,
struct RayIntersectionInfo iInfo,
double  mx = -1
[virtual]
 

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.

BoundingBox3D RayGroup::setBoundingBox void   )  [virtual]
 

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

Implements RayShape.

void RayGroup::setUpOpenGL int  cplx,
int  setCallList
[virtual]
 

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.

int RayGroup::shapeNum void   ) 
 

This method returns the number of shapes associated to the node.

void RayGroup::write int  indent,
FILE *  fp = stdout
[virtual]
 

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.

virtual void RayGroup::writeBegin int  indent,
FILE *  fp = stdout
[pure virtual]
 

This virtual method specifies how the header of the node should be written out to a .ray file.

Implemented in StaticRayGroup, and ParametrizedRayGroup.

virtual void RayGroup::writeEnd int  indent,
FILE *  fp = stdout
[pure virtual]
 

This virtual method specifies how the footer of the node should be written out to a .ray file.

Implemented in StaticRayGroup, and ParametrizedRayGroup.


Member Data Documentation

class RayShapeHit* RayGroup::hits
 

An array of RayShapeHit elements that can be used for bounding-volume sorting

RayShape** RayGroup::shapes
 

The shapes that are associated to the node

int RayGroup::sNum
 

The number of shapes associated to the node


Generated on Wed Feb 22 15:44:23 2006 for Assignment 2 by  doxygen 1.4.1