rtVTK  0.6.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Public Attributes
rl::RayRecord Struct Reference

The rl struct for handling each ray. More...

List of all members.

Public Member Functions

 RayRecord ()
 default constructor - sets all members to zero
 RayRecord (const Point &origin, const Vector &dir, RayType type, const void *data=NULL, size_t nbytes=0)
 sets all location members to zero, and all other members as requested
 RayRecord (const RayRecord &r)
 copies the given RayRecord
 ~RayRecord ()
 deletes dynamically allocated memory if it has been allocated
RayRecordoperator= (const RayRecord &)
 copies the given RayRecord
void changeData (const void *, size_t)

Public Attributes

Point origin
 the origin of the ray
Vector distance
 the directed distance: see details
RayType type
 the ray's type
void * data
 pointer to ray data
size_t nbytes
 size of ray data
uint depth
 depth of the ray: the head ray is at depth 0
uint parent
 the index of the ray's parent: the head ray has parent -1
uint child
 the index of the ray's first child: if it does not have one, -1
uint next
 the index of the next ray: -1 if absent
uint prev
 the index of the previous ray: -1 if absent

Detailed Description

The rl struct for handling each ray.

rl::RayLogger uses RayRecord to store the data for each ray and how to navigate from one ray to the next.


Constructor & Destructor Documentation

default constructor - sets all members to zero

rl::RayRecord::RayRecord ( const Point &  origin,
const Vector &  dir,
RayType  type,
const void *  data = NULL,
size_t  nbytes = 0 
)

sets all location members to zero, and all other members as requested

References changeData(), and data.

copies the given RayRecord

References changeData(), data, and nbytes.

deletes dynamically allocated memory if it has been allocated

References data.


Member Function Documentation

void rl::RayRecord::changeData ( const void *  data_,
size_t  nbytes_ 
)

References data, and nbytes.

Referenced by operator=(), and RayRecord().

RayRecord & rl::RayRecord::operator= ( const RayRecord r)

copies the given RayRecord

References changeData(), child, data, depth, distance, nbytes, next, origin, parent, prev, and type.


Member Data Documentation

the index of the ray's first child: if it does not have one, -1

Referenced by rl::RayLogger::addRay(), rl::RayLogger::endForest(), rl::RayLogger::GetRayRecord(), rl::operator<<(), operator=(), and rl::RayLogger::readRay().

depth of the ray: the head ray is at depth 0

Referenced by rl::RayLogger::addRay(), rl::RayLogger::GetRayRecord(), rl::operator<<(), operator=(), and rl::RayLogger::readRay().

the directed distance: see details

If the length of the ray is non-infinite, this stores direction times distance. Otherwise, the x and y coordinates are components of the normalized ray and the z coordinate is infinity * sign(normalized z). This makes the disk representation of the ray record smaller while retaining directional data on infinite-length rays.

Referenced by rl::RayLogger::endForest(), rl::operator<<(), operator=(), and rl::RayLogger::readRay().

the index of the next ray: -1 if absent

Referenced by rl::RayLogger::addRay(), rl::RayLogger::GetRayRecord(), rl::operator<<(), operator=(), and rl::RayLogger::readRay().

the origin of the ray

Referenced by rl::operator<<(), operator=(), and rl::RayLogger::readRay().

the index of the ray's parent: the head ray has parent -1

Referenced by rl::RayLogger::addRay(), rl::RayLogger::GetRayRecord(), rl::operator<<(), operator=(), and rl::RayLogger::readRay().

the index of the previous ray: -1 if absent

Referenced by rl::RayLogger::addRay(), rl::RayLogger::GetRayRecord(), rl::operator<<(), operator=(), and rl::RayLogger::readRay().


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends