rtVTK  0.6.0
Classes | Typedefs | Enumerations | Functions
rl Namespace Reference

RayLog namespace. More...

Classes

class  RayLogger
 C++ ray tree storage management. More...
struct  RayRecord
 The rl struct for handling each ray. More...
struct  Ray
 user-side struct for reading rays More...
struct  Tree
 user-side struct for reading trees More...
struct  TreeRecord
 The rl struct for handling each tree. More...

Typedefs

typedef vector< RayRecord >
::iterator 
RRiter
typedef vector< TreeRecord >
::iterator 
TRiter
typedef unsigned short int ushort
 To make the trees take less disk space.

Enumerations

enum  IOMode { InvalidMode = -1, ReadMode = 0, WriteMode, ImmediateMode }
 Stores the I/O mode of the object. More...
enum  TraversalMode { BreadthFirst = 0, DepthFirst }
 Stores the traversal mode of the object. More...
enum  RayType {
  InvalidRay = -1, EyeRay = 0, ShadowRay, ReflectionRay,
  TransmissionRay, DiffuseRay, NRayTypes
}
enum  Error {
  NoError = 0, Init_NoRLClose = 100, Init_InvalidFName, Init_FileOpenFailed,
  Init_InvalidFile, Init_NoTrees, NextRay_InvalidState = 200, NextRay_InvalidMode,
  NextRay_InvalidContext, NextRay_NoTrees, NextRay_InvalidTree, NextRay_TreeEnded,
  NextRay_EmptyTree, NextRay_NoMoreRays, DescendTree_InvalidState = 300, DescendTree_InvalidMode,
  DescendTree_InvalidContext, DescendTree_NoTrees, DescendTree_InvalidTree, DescendTree_TreeEnded,
  DescendTree_EmptyTree, DescendTree_NoChild, AscendTree_InvalidState = 400, AscendTree_InvalidMode,
  AscendTree_InvalidContext, AscendTree_NoTrees, AscendTree_InvalidTree, AscendTree_TreeEnded,
  AscendTree_EmptyTree, AscendTree_TopLevel, NextTree_InvalidMode = 500, NextTree_InvalidContext,
  NextTree_NoMoreTrees, PrevTree_InvalidMode = 600, PrevTree_NoMoreTrees, ReadTree_InvalidMode = 700,
  ReadTree_InvalidContext, ReadTree_Uninitialized, ReadRays_InvalidMode = 800, ReadRays_Uninitialized,
  PopulateTree_InvalidMode = 900, PopulateTree_InvalidContext, PopulateTree_Uninitialized, ReadRay_InvalidMode = 1000,
  ReadRay_InvalidContext, ReadRay_Uninitialized, ReadRay_NoMoreRays, StartRays_InvalidMode = 1100,
  StartRays_InvalidContext, StartRays_Uninitialized, BeginForest_InvalidMode = 1200, BeginForest_NoEndForest,
  EndForest_InvalidMode = 1300, EndForest_NoBeginForest, EndForest_OpenTrees, BeginTree_InvalidMode = 1400,
  BeginTree_InvalidContext, EndTree_InvalidMode = 1500, EndTree_InvalidContext, EndTree_NoTrees,
  EndTree_InvalidTree, EndTree_AlreadyEnded, AddRay_InvalidMode = 1600, AddRay_InvalidContext,
  AddRay_NoTrees, AddRay_InvalidTree, AddRay_TreeEnded, AddRay_OneHeadRay
}
 List of all expected rl errors. More...

Functions

ostream & operator<< (ostream &out, const RayLogger::TreeRecordIO &rtout)
istream & operator>> (istream &in, RayLogger::TreeRecordIO &rtin)
ostream & operator<< (ostream &out, const RayLogger::RayRecordIO &rrout)
istream & operator>> (istream &in, RayLogger::RayRecordIO &rrin)
ostream & operator<< (ostream &, const RayRecord &)
 overloaded insertion operator
ostream & operator<< (ostream &out, const Ray &r)
ostream & operator<< (ostream &out, const Tree &t)
istream & operator>> (istream &in, RayType &rt)
ostream & operator<< (ostream &out, const RayType &rt)
bool read (istream &in, RayType &rt)
bool write (ostream &out, const RayType &rt)
ostream & operator<< (ostream &, const TreeRecord &)
 overloaded insertion operator

Detailed Description

RayLog namespace.

Collects functionality for manipulating rays.


Typedef Documentation

typedef vector<RayRecord>::iterator rl::RRiter
typedef vector<TreeRecord>::iterator rl::TRiter
typedef unsigned short int rl::ushort

To make the trees take less disk space.


Enumeration Type Documentation

enum rl::Error

List of all expected rl errors.

Enumerator:
NoError 

all is well: no errors

Init_NoRLClose 

this->close was not called

Init_InvalidFName 

the file name is invalid - either non-blank in rl::ImmediateMode or blank in the other modes

Init_FileOpenFailed 

the file could not be opened in rl::ReadMode or rl::WriteMode

Init_InvalidFile 

the file is not in the right format in rl::ReadMode

Init_NoTrees 

there are no trees in the file in rl::ReadMode

NextRay_InvalidState 

cannot be called in rl::DepthFirst mode

NextRay_InvalidMode 

cannot be called in rl::ReadMode, or there was a previous fatal error

NextRay_InvalidContext 

cannot be called before a beginTree call

NextRay_NoTrees 

cannot be called when no trees exist

NextRay_InvalidTree 

the insertion point is on the beginning or end, not a tree

NextRay_TreeEnded 

the current tree has been ended

NextRay_EmptyTree 

the current tree is empty - there is no ray to move to

NextRay_NoMoreRays 

there are no more rays to move to

DescendTree_InvalidState 

cannot be called in rl::BreadthFirst mode

DescendTree_InvalidMode 

cannot be called in rl::ReadMode, or there was a previous fatal error

DescendTree_InvalidContext 

cannot be called before beginForest (beginTree for rl::ImmediateMode)

DescendTree_NoTrees 

cannot be called when no trees exist

DescendTree_InvalidTree 

the insertion point is on the beginning or end, not a tree

DescendTree_TreeEnded 

the current tree has been ended

DescendTree_EmptyTree 

the current tree is empty - there is no ray to move to

DescendTree_NoChild 

the current ray has no child to move to

AscendTree_InvalidState 

cannot be called in rl::BreadthFirst mode

AscendTree_InvalidMode 

cannot be called in rl::ReadMode, or there was a previous fatal error

AscendTree_InvalidContext 

cannot be called before beginForest (beginTree for rl::ImmediateMode)

AscendTree_NoTrees 

cannot be called when no trees exist

AscendTree_InvalidTree 

the insertion point is on the beginning or end, not a tree

AscendTree_TreeEnded 

the current tree has been ended

AscendTree_EmptyTree 

the current tree is empty - there is no ray to move to

AscendTree_TopLevel 

the current ray has no parent to move to

NextTree_InvalidMode 

cannot be called in rl::ImmediateMode

NextTree_InvalidContext 

cannot be called in rl::WriteMode before beginForest

NextTree_NoMoreTrees 

no more trees to which to move

PrevTree_InvalidMode 

can only be called in rl::ReadMode

PrevTree_NoMoreTrees 

no more trees to which to move

ReadTree_InvalidMode 

cannot be called in rl::WriteMode

ReadTree_InvalidContext 

cannot be called before endTree in rl::ImmediateMode

ReadTree_Uninitialized 

the current tree is the beginning or end, not a tree

ReadRays_InvalidMode 

can only be called in rl::ReadMode

ReadRays_Uninitialized 

the current tree is the beginning or end, not a tree

PopulateTree_InvalidMode 

cannot be called in rl::WriteMode

PopulateTree_InvalidContext 

cannot be called before endTree in rl::ImmediateMode

PopulateTree_Uninitialized 

the current tree is the beginning or end, not a tree

ReadRay_InvalidMode 

cannot be called in rl::WriteMode

ReadRay_InvalidContext 

cannot be called before endTree in rl::ImmediateMode

ReadRay_Uninitialized 

the current tree is the beginning or end, not a tree

ReadRay_NoMoreRays 

no more rays to read

StartRays_InvalidMode 

cannot be called in rl::WriteMode

StartRays_InvalidContext 

cannot be called before endTree in rl::ImmediateMode

StartRays_Uninitialized 

the current tree is the beginning or end, not a tree

BeginForest_InvalidMode 

can only be called in rl::WriteMode

BeginForest_NoEndForest 

cannot be called multiple times before endForest

EndForest_InvalidMode 

can only be called in rl::WriteMode

EndForest_NoBeginForest 

cannot be called before beginForest

EndForest_OpenTrees 

some trees are still open - warning only

BeginTree_InvalidMode 

cannot be called in rl::ReadMode

BeginTree_InvalidContext 

cannot be called before beginForest in rl::ReadMode, or after another beginTree for rl::ImmediateMode

EndTree_InvalidMode 

cannot be called in rl::ReadMode

EndTree_InvalidContext 

cannot be called before beginForest (beginTree in rl::ImmediateMode)

EndTree_NoTrees 

no trees in forest

EndTree_InvalidTree 

the current tree is the beginning or end, not a tree

EndTree_AlreadyEnded 

the current tree has been ended

AddRay_InvalidMode 

cannot be called in rl::ReadMode

AddRay_InvalidContext 

cannot be called after endForest (endTree in rl::ImmediateMode)

AddRay_NoTrees 

no trees in forest

AddRay_InvalidTree 

the current tree is the beginning or end, not a tree

AddRay_TreeEnded 

the current tree has been ended

AddRay_OneHeadRay 

trying to set multiple head rays - not allowed

enum rl::IOMode

Stores the I/O mode of the object.

Enumerator:
InvalidMode 

invalid mode - please never use it

ReadMode 

read rays from disk

WriteMode 

write rays to disk

ImmediateMode 

keep rays in memory

Enumerator:
InvalidRay 
EyeRay 
ShadowRay 
ReflectionRay 
TransmissionRay 
DiffuseRay 
NRayTypes 

Stores the traversal mode of the object.

Enumerator:
BreadthFirst 

traverse horizontally

DepthFirst 

traverse vertically


Function Documentation

ostream & rl::operator<< ( ostream &  out,
const TreeRecord &  t 
)
ostream & rl::operator<< ( ostream &  out,
const Ray &  r 
)
ostream & rl::operator<< ( ostream &  out,
const RayRecord &  r 
)
ostream & rl::operator<< ( ostream &  out,
const Tree &  t 
)
Todo:
TODO(dje) - support for manipulators would be very cool here

References rl::Tree::origin, rl::Tree::px, and rl::Tree::py.

ostream & rl::operator<< ( ostream &  out,
const RayType &  rt 
)
ostream& rl::operator<< ( ostream &  out,
const RayLogger::TreeRecordIO &  rtout 
)
ostream& rl::operator<< ( ostream &  out,
const RayLogger::RayRecordIO &  rrout 
)
istream & rl::operator>> ( istream &  in,
RayType &  rt 
)
istream& rl::operator>> ( istream &  in,
RayLogger::TreeRecordIO &  rtin 
)
istream& rl::operator>> ( istream &  in,
RayLogger::RayRecordIO &  rrin 
)
bool rl::read ( istream &  in,
RayType &  rt 
)
bool rl::write ( ostream &  out,
const RayType &  rt 
)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends