Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ns_vu1112112::vuSampleRay Class Reference

Defines a Ray using the direction vector as sampling step. More...

#include <vuSampleRay.h>

Inheritance diagram for ns_vu1112112::vuSampleRay:

Inheritance graph
[legend]
Collaboration diagram for ns_vu1112112::vuSampleRay:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuSampleRay ()
 Default constructor.
 vuSampleRay (const vuSampleRay &r)
 Copy constructor.
 vuSampleRay (const vuRay &r)
 Copy constructor for simple vuRay.
 ~vuSampleRay ()
 Destructor.
void SamplingDistance (float sd)
 modifies length of direction vector to sd
float SamplingDistance () const
 returns current sampling distance
vuSampleRayoperator= (vuSampleRay &rhs)
 Assignment operator.
bool advanceRay ()
bool getSamplePoint (DatPnt &dat) const
 get sampled point WITHOUT gradient depending on the implementation material percentages or data value will be interpolated.
bool getSamplePointWithGradient (DatPnt &dat) const
 get sampled point with gradient
bool attachToGrid (const DatGrid &grid)
 attach ray to a data grid.

Protected Attributes

float m_SmpDist
 sampling distance (length of direction vector)
const DatGridm_Grid
 grid ray is within
int grid_index
int gridPos [3]
 location in grid
int axis [3]
 [0] is ID of predominant axis, [1] and [2] are
int step [3]
 forward/backward steps (1 or -1)
float incr [2][2]
 increments for chosen direction
float dist [3]
 not used
int maxSmp
int numSmp
 total and current number of samples
int m_Side
int m_InSide
 side IDs for leaving and entering the data cube
int steps
 number of samples until leaving the grid
DatPntcell [8]
float w [8]
 weights for triliniar interpolation
int p [3]
 indexed position in the grid (for cell[0])
float t [3]
 components are between 0 and 1
bool emptySample
 false if current cell is empty

Friends

class DatGrid
class DatPnt

Detailed Description

Defines a Ray using the direction vector as sampling step.

Derived from the vuRay class and adds a feature to change position by a certain sampling step, keeping track of current position in Grid. Because of its orientation to specific grid type probably not a general tool.

Definition at line 22 of file Spectral/vuSampleRay.h.


Constructor & Destructor Documentation

ns_vu1112112::vuSampleRay::vuSampleRay  ) 
 

Default constructor.

Definition at line 21 of file Spectral/vuSampleRay.cpp.

References m_Grid, m_SmpDist, and steps.

ns_vu1112112::vuSampleRay::vuSampleRay const vuSampleRay r  ) 
 

Copy constructor.

Definition at line 29 of file Spectral/vuSampleRay.cpp.

References m_Grid, m_SmpDist, and steps.

ns_vu1112112::vuSampleRay::vuSampleRay const vuRay r  ) 
 

Copy constructor for simple vuRay.

Definition at line 37 of file Spectral/vuSampleRay.cpp.

References m_Grid, and m_SmpDist.

ns_vu1112112::vuSampleRay::~vuSampleRay  ) 
 

Destructor.

Definition at line 44 of file Spectral/vuSampleRay.cpp.


Member Function Documentation

bool ns_vu1112112::vuSampleRay::advanceRay  ) 
 

Definition at line 71 of file Spectral/vuSampleRay.cpp.

References cell, emptySample, ns_vu1112112::DatPnt::getFlag(), ns_vu1112112::DatGrid::layXY, m_Grid, ns_vu1112112::DatGrid::maxX, ns_vu1112112::DatGrid::maxY, ns_vu1112112::DatGrid::maxZ, p, steps, t, ns_vu1112112::DatGrid::vol, and w.

Referenced by ns_vu1112112::vu1112112::Cast().

Here is the call graph for this function:

bool ns_vu1112112::vuSampleRay::attachToGrid const DatGrid grid  ) 
 

attach ray to a data grid.

returns false if ray doesn't hit the cube

Definition at line 186 of file Spectral/vuSampleRay.cpp.

References ns_vu1112112::DatGrid::clipRay(), vuRay::m_Direction, m_Grid, vuRay::m_Position, steps, and t.

Referenced by ns_vu1112112::vu1112112::Cast().

Here is the call graph for this function:

bool ns_vu1112112::vuSampleRay::getSamplePoint DatPnt dat  )  const
 

get sampled point WITHOUT gradient depending on the implementation material percentages or data value will be interpolated.

For both illum will hold the interpolated illumination for current position

Definition at line 121 of file Spectral/vuSampleRay.cpp.

References cell, ns_vu1112112::DatPnt::data, ns_vu1112112::DatPnt::illum, ns_vu1112112::DatPnt::reset(), and w.

Referenced by ns_vu1112112::vu1112112::Cast().

Here is the call graph for this function:

bool ns_vu1112112::vuSampleRay::getSamplePointWithGradient DatPnt dat  )  const
 

get sampled point with gradient

Definition at line 149 of file Spectral/vuSampleRay.cpp.

References cell, ns_vu1112112::DatPnt::data, ns_vu1112112::DatPnt::grad, ns_vu1112112::DatPnt::illum, ns_vu1112112::DatPnt::length, ns_vu1112112::DatPnt::reset(), and w.

Referenced by ns_vu1112112::vu1112112::Cast().

Here is the call graph for this function:

vuSampleRay & ns_vu1112112::vuSampleRay::operator= vuSampleRay rhs  ) 
 

Assignment operator.

Definition at line 49 of file Spectral/vuSampleRay.cpp.

References m_Grid, vuRay::operator=(), and steps.

Here is the call graph for this function:

float ns_vu1112112::vuSampleRay::SamplingDistance  )  const
 

returns current sampling distance

Definition at line 58 of file Spectral/vuSampleRay.cpp.

void ns_vu1112112::vuSampleRay::SamplingDistance float  sd  ) 
 

modifies length of direction vector to sd

Definition at line 63 of file Spectral/vuSampleRay.cpp.

References m_Grid, m_SmpDist, vuVector::norm(), and steps.

Referenced by ns_vu1112112::vu1112112::Cast().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class DatGrid [friend]
 

Definition at line 24 of file Spectral/vuSampleRay.h.

friend class DatPnt [friend]
 

Definition at line 25 of file Spectral/vuSampleRay.h.


Member Data Documentation

int ns_vu1112112::vuSampleRay::axis[3] [protected]
 

[0] is ID of predominant axis, [1] and [2] are

Definition at line 59 of file Spectral/vuSampleRay.h.

DatPnt* ns_vu1112112::vuSampleRay::cell[8] [protected]
 

Definition at line 69 of file Spectral/vuSampleRay.h.

Referenced by advanceRay(), getSamplePoint(), and getSamplePointWithGradient().

float ns_vu1112112::vuSampleRay::dist[3] [protected]
 

not used

Definition at line 62 of file Spectral/vuSampleRay.h.

bool ns_vu1112112::vuSampleRay::emptySample [protected]
 

false if current cell is empty

Definition at line 73 of file Spectral/vuSampleRay.h.

Referenced by advanceRay().

int ns_vu1112112::vuSampleRay::grid_index [protected]
 

Definition at line 57 of file Spectral/vuSampleRay.h.

int ns_vu1112112::vuSampleRay::gridPos[3] [protected]
 

location in grid

Definition at line 58 of file Spectral/vuSampleRay.h.

float ns_vu1112112::vuSampleRay::incr[2][2] [protected]
 

increments for chosen direction

Definition at line 61 of file Spectral/vuSampleRay.h.

const DatGrid* ns_vu1112112::vuSampleRay::m_Grid [protected]
 

grid ray is within

Definition at line 56 of file Spectral/vuSampleRay.h.

Referenced by advanceRay(), attachToGrid(), operator=(), SamplingDistance(), and vuSampleRay().

int ns_vu1112112::vuSampleRay::m_InSide [protected]
 

side IDs for leaving and entering the data cube

Definition at line 65 of file Spectral/vuSampleRay.h.

int ns_vu1112112::vuSampleRay::m_Side [protected]
 

Definition at line 65 of file Spectral/vuSampleRay.h.

float ns_vu1112112::vuSampleRay::m_SmpDist [protected]
 

sampling distance (length of direction vector)

Definition at line 54 of file Spectral/vuSampleRay.h.

Referenced by SamplingDistance(), and vuSampleRay().

int ns_vu1112112::vuSampleRay::maxSmp [protected]
 

Definition at line 63 of file Spectral/vuSampleRay.h.

int ns_vu1112112::vuSampleRay::numSmp [protected]
 

total and current number of samples

Definition at line 63 of file Spectral/vuSampleRay.h.

int ns_vu1112112::vuSampleRay::p[3] [protected]
 

indexed position in the grid (for cell[0])

Definition at line 71 of file Spectral/vuSampleRay.h.

Referenced by advanceRay().

int ns_vu1112112::vuSampleRay::step[3] [protected]
 

forward/backward steps (1 or -1)

Definition at line 60 of file Spectral/vuSampleRay.h.

int ns_vu1112112::vuSampleRay::steps [protected]
 

number of samples until leaving the grid

Definition at line 67 of file Spectral/vuSampleRay.h.

Referenced by advanceRay(), attachToGrid(), operator=(), SamplingDistance(), and vuSampleRay().

float ns_vu1112112::vuSampleRay::t[3] [protected]
 

components are between 0 and 1

Definition at line 72 of file Spectral/vuSampleRay.h.

Referenced by advanceRay(), and attachToGrid().

float ns_vu1112112::vuSampleRay::w[8] [protected]
 

weights for triliniar interpolation

Definition at line 70 of file Spectral/vuSampleRay.h.

Referenced by advanceRay(), getSamplePoint(), and getSamplePointWithGradient().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:22:13 2004 for vuVolume by  doxygen 1.3.9.1