#include <vuSampleRay.h>
Inheritance diagram for ns_vu1112112::vuSampleRay:
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 | |
vuSampleRay & | operator= (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 DatGrid * | m_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 | |
DatPnt * | cell [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 |
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.
|
Default constructor.
Definition at line 21 of file Spectral/vuSampleRay.cpp. |
|
Copy constructor.
Definition at line 29 of file Spectral/vuSampleRay.cpp. |
|
Copy constructor for simple vuRay.
Definition at line 37 of file Spectral/vuSampleRay.cpp. |
|
Destructor.
Definition at line 44 of file Spectral/vuSampleRay.cpp. |
|
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:
|
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:
|
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:
|
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:
|
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:
|
returns current sampling distance
Definition at line 58 of file Spectral/vuSampleRay.cpp. |
|
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:
|
Definition at line 24 of file Spectral/vuSampleRay.h. |
|
Definition at line 25 of file Spectral/vuSampleRay.h. |
|
[0] is ID of predominant axis, [1] and [2] are
Definition at line 59 of file Spectral/vuSampleRay.h. |
|
Definition at line 69 of file Spectral/vuSampleRay.h. Referenced by advanceRay(), getSamplePoint(), and getSamplePointWithGradient(). |
|
not used
Definition at line 62 of file Spectral/vuSampleRay.h. |
|
false if current cell is empty
Definition at line 73 of file Spectral/vuSampleRay.h. Referenced by advanceRay(). |
|
Definition at line 57 of file Spectral/vuSampleRay.h. |
|
location in grid
Definition at line 58 of file Spectral/vuSampleRay.h. |
|
increments for chosen direction
Definition at line 61 of file Spectral/vuSampleRay.h. |
|
grid ray is within
Definition at line 56 of file Spectral/vuSampleRay.h. Referenced by advanceRay(), attachToGrid(), operator=(), SamplingDistance(), and vuSampleRay(). |
|
side IDs for leaving and entering the data cube
Definition at line 65 of file Spectral/vuSampleRay.h. |
|
Definition at line 65 of file Spectral/vuSampleRay.h. |
|
sampling distance (length of direction vector)
Definition at line 54 of file Spectral/vuSampleRay.h. Referenced by SamplingDistance(), and vuSampleRay(). |
|
Definition at line 63 of file Spectral/vuSampleRay.h. |
|
total and current number of samples
Definition at line 63 of file Spectral/vuSampleRay.h. |
|
indexed position in the grid (for cell[0])
Definition at line 71 of file Spectral/vuSampleRay.h. Referenced by advanceRay(). |
|
forward/backward steps (1 or -1)
Definition at line 60 of file Spectral/vuSampleRay.h. |
|
number of samples until leaving the grid
Definition at line 67 of file Spectral/vuSampleRay.h. Referenced by advanceRay(), attachToGrid(), operator=(), SamplingDistance(), and vuSampleRay(). |
|
components are between 0 and 1
Definition at line 72 of file Spectral/vuSampleRay.h. Referenced by advanceRay(), and attachToGrid(). |
|
weights for triliniar interpolation
Definition at line 70 of file Spectral/vuSampleRay.h. Referenced by advanceRay(), getSamplePoint(), and getSamplePointWithGradient(). |