ThreadedRayCaster Class Reference

#include <ThreadedRayCaster.h>

List of all members.

Public Member Functions

 ThreadedRayCaster (void *aWindow, void *aParent, Volume *aVolume)
 ~ThreadedRayCaster ()
void drawVolume (POINT aDrawSize, RGBAColor *aResultArray, Vector3 aDirection, Vector3 aPos, Vector3 anXDirection, Vector3 aYDirection)

Public Attributes

VolumetheVolumeToUse

Private Member Functions

void issueLine (RayCalculations *aCalculator)
void nextLine ()
void loadValues ()
void writeLine (unsigned int aLineNo)
bool lineDone (unsigned int aLineNo)
int checkDone ()

Private Attributes

unsigned int theNumberOfThreads
RGBAColortheColorTransfer
RGBAColortheResultingColor
RGBAColortheTemporaryColor
POINT theDrawSize
bool * theLinesIssued
bool * theLinesDone
bool * theLinesDrawn
int theCurrLine
unsigned int theLineIncrement
void(RayCalculations::* theMode )(Vector3, Vector3, RGBAColor &)
Vector3 theDirection
Vector3 thePos
Vector3 theXDirection
Vector3 theYDirection
RayCalculationstheCalculators
std::list< unsigned int > theRunningLines
std::map< unsigned int, RayCalculations * > theAssignedWork
void * theParentCaster
void * theParentWindow


Constructor & Destructor Documentation

ThreadedRayCaster::ThreadedRayCaster ( void *  aWindow,
void *  aParent,
Volume aVolume 
)

constructor

Parameters:
aVolume the volume data

ThreadedRayCaster::~ThreadedRayCaster (  ) 

destructor


Member Function Documentation

int ThreadedRayCaster::checkDone (  )  [private]

checks if any lines have finisched

Returns:
number of finished line, -1 if none

void ThreadedRayCaster::drawVolume ( POINT  aDrawSize,
RGBAColor aResultArray,
Vector3  aDirection,
Vector3  aPos,
Vector3  anXDirection,
Vector3  aYDirection 
)

renders the volume

Parameters:
aResultArray the result will be drawn into this
aDirection direction the rays are looking at
aPos starting position of the upper left ray
anXDirection horizontal position difference between two rays
aYDirection vertical position difference between two rays

void ThreadedRayCaster::issueLine ( RayCalculations aCalculator  )  [private]

starts a new thread to render a line

Parameters:
aCalculator the instance to render the line

bool ThreadedRayCaster::lineDone ( unsigned int  aLineNo  )  [private]

finish the line and start the next one

Parameters:
aLineNo the number of the line
Returns:
whether all lines are done and the casting process finished (otherwise another line has been started)

void ThreadedRayCaster::loadValues (  )  [private]

saves all modifiable values for casting process, issued before the first thread is started

void ThreadedRayCaster::nextLine (  )  [private]

sets the current line to the next line for progressive refinement

void ThreadedRayCaster::writeLine ( unsigned int  aLineNo  )  [private]

writes the color data after a line is done

Parameters:
aLineNo number of the line data shall be written for


Member Data Documentation

std::map<unsigned int, RayCalculations*> ThreadedRayCaster::theAssignedWork [private]

RayCalculations* ThreadedRayCaster::theCalculators [private]

RGBAColor* ThreadedRayCaster::theColorTransfer [private]

int ThreadedRayCaster::theCurrLine [private]

Vector3 ThreadedRayCaster::theDirection [private]

POINT ThreadedRayCaster::theDrawSize [private]

unsigned int ThreadedRayCaster::theLineIncrement [private]

bool* ThreadedRayCaster::theLinesDone [private]

bool* ThreadedRayCaster::theLinesDrawn [private]

bool* ThreadedRayCaster::theLinesIssued [private]

void(RayCalculations::* ThreadedRayCaster::theMode)(Vector3, Vector3, RGBAColor &) [private]

unsigned int ThreadedRayCaster::theNumberOfThreads [private]

void* ThreadedRayCaster::theParentCaster [private]

void* ThreadedRayCaster::theParentWindow [private]

Vector3 ThreadedRayCaster::thePos [private]

RGBAColor* ThreadedRayCaster::theResultingColor [private]

std::list<unsigned int> ThreadedRayCaster::theRunningLines [private]

RGBAColor* ThreadedRayCaster::theTemporaryColor [private]

Volume* ThreadedRayCaster::theVolumeToUse

Vector3 ThreadedRayCaster::theXDirection [private]

Vector3 ThreadedRayCaster::theYDirection [private]


The documentation for this class was generated from the following files:
Generated on Wed Dec 6 11:27:27 2006 by  doxygen 1.4.7