My Project
Public Member Functions | Public Attributes | List of all members
RayGroup Class Referenceabstract

#include <rayGroup.h>

Inheritance diagram for RayGroup:
RayShape ParametrizedRayGroup StaticRayGroup ParametrizedClosestRotationAndTranslation ParametrizedEulerAnglesAndTranslation ParametrizedMatrix4D ParametrizedQuaternionAndTranslation ParametrizedRotationLogarithmAndTranslation

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 drawOpenGL (int materialIndex)
 
- Public Member Functions inherited from RayShape
virtual int isStatic (void)
 

Public Attributes

int sNum
 
RayShape ** shapes
 
class RayShapeHithits
 
- Public Attributes inherited from RayShape
BoundingBox3D bBox
 
int openGLComplexity
 

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 ParametrizedRayGroup, and StaticRayGroup.

virtual Matrix4D RayGroup::getMatrix ( void  )
pure virtual
virtual Matrix4D RayGroup::getNormalMatrix ( void  )
pure virtual

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

Implemented in ParametrizedRayGroup, and StaticRayGroup.

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)
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 ParametrizedRayGroup, and StaticRayGroup.

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 ParametrizedRayGroup, and StaticRayGroup.

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


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