Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

vtkRayCaster Class Reference

A helper object for renderer that controls ray casting. More...

#include <vtkRayCaster.h>

Inheritance diagram for vtkRayCaster:

Inheritance graph
[legend]
Collaboration diagram for vtkRayCaster:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
float * GetPerspectiveViewRays ()
void GetViewRaysSize (int size[2])
float * GetParallelStartPosition (void)
float * GetParallelIncrements (void)
void SetImageScale (int level, float scale)
float GetImageScale (int level)
int GetImageScaleCount (void)
virtual void SetSelectedImageScaleIndex (int)
virtual int GetSelectedImageScaleIndex ()
void SetViewRaysStepSize (int level, float scale)
float GetViewRaysStepSize (int level)
virtual int GetAutomaticScaleAdjustment ()
void AutomaticScaleAdjustmentOn (void)
void AutomaticScaleAdjustmentOff (void)
virtual void SetAutomaticScaleLowerLimit (float)
virtual float GetAutomaticScaleLowerLimit ()
virtual void SetBilinearImageZoom (int)
virtual int GetBilinearImageZoom ()
virtual void BilinearImageZoomOn ()
virtual void BilinearImageZoomOff ()
virtual float GetTotalRenderTime ()
virtual void SetNumberOfThreads (int)
virtual int GetNumberOfThreads ()
int GetNumberOfSamplesTaken ()
virtual void SetRenderer (vtkRenderer *)
virtual vtkRendererGetRenderer ()
void Render (vtkRenderer *, int, vtkProp **, int, vtkProp **)
float GetViewportScaleFactor (vtkRenderer *ren)
float GetViewportStepSize ()
float * GetCurrentZBuffer ()

Static Public Methods

vtkRayCaster * New ()
int IsTypeOf (const char *type)
vtkRayCaster * SafeDownCast (vtkObject *o)

Public Attributes

int ** RowBounds
int * RowBoundsSize
vtkProp ** SoftwareProps
vtkProp ** RayCastProps

Protected Methods

 vtkRayCaster ()
 ~vtkRayCaster ()
 vtkRayCaster (const vtkRayCaster &)
void operator= (const vtkRayCaster &)
void NearestNeighborZoom (float *smallImage, float *largeImage, int smallDims[2], int largeDims[2])
void BilinearZoom (float *smallImage, float *largeImage, int smallDims[2], int largeDims[2])
void RescaleImage ()
void RenderFrameBufferVolumes (vtkRenderer *ren)
void InitializeRenderBuffers (vtkRenderer *ren)
void InitializeRayCasting (vtkRenderer *ren)
void ComputeRowBounds (vtkRenderer *ren, vtkProp *prop, int index)

Protected Attributes

vtkMultiThreaderThreader
int NumberOfThreads
int NumberOfSamplesTaken [VTK_MAX_THREADS]
vtkRendererRenderer
vtkViewRaysViewRays [VTK_MAX_VIEW_RAYS_LEVEL+1]
float * SelectedViewRays
float ImageScale [VTK_MAX_VIEW_RAYS_LEVEL+1]
int ImageSize [2]
int FullImageSize [2]
int BilinearImageZoom
int SelectedImageScaleIndex
int StableImageScaleCounter
float PreviousAllocatedTime
int AutomaticScaleAdjustment
float AutomaticScaleLowerLimit
float ImageRenderTime [2]
float ViewRaysStepSize [VTK_MAX_VIEW_RAYS_LEVEL]
float TotalRenderTime
float * RGBAImage
float * ZImage
vtkVolume ** RayCastVolumes
VolumeRayCastVolumeInfoStruct * VolumeInfo
int RayCastPropCount
int SoftwareBufferPropCount
vtkTransformViewToWorldTransform
float CameraClippingRange [2]
float ViewToWorldMatrix [4][4]
int FirstBlend
float CameraInverse22
float CameraInverse23
float CameraInverse32
float CameraInverse33
float CameraPosition [3]
float * ParallelStartPosition
float * ParallelIncrements
int ParallelProjection
int NeedBackgroundBlend
float Background [3]

Friends

VTK_THREAD_RETURN_TYPE RayCast_RenderImage (void *arg)

Detailed Description

A helper object for renderer that controls ray casting.

Date:
2000/12/10 20:08:49
Revision:
1.27

vtkRayCaster is an automatically created object within vtkRenderer. It is used for ray casting operations. It stores variables such as the view rays, and information on multiresolution image rendering which are queried by the specific ray casters.

See also:
vtkRenderer vtkViewRays


Member Function Documentation

void vtkRayCaster::AutomaticScaleAdjustmentOff void   
 

Turn the automatic scale adjustment off

void vtkRayCaster::AutomaticScaleAdjustmentOn void   
 

Turn the automatic scale adjustment on

void vtkRayCaster::BilinearZoom float *    smallImage,
float *    largeImage,
int    smallDims[2],
int    largeDims[2]
[protected]
 

Zoom the small image up the full size using bilinear interpolation

virtual int vtkRayCaster::GetAutomaticScaleAdjustment   [virtual]
 

Get the value of AutomaticScaleAdjustment. 0 = off, 1 = on

virtual const char* vtkRayCaster::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

float* vtkRayCaster::GetCurrentZBuffer   [inline]
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS

int vtkRayCaster::GetImageScaleCount void    [inline]
 

Get the number of levels of resolution.

int vtkRayCaster::GetNumberOfSamplesTaken  
 

Get the number of samples taken during the last image rendered. This is the number of samples for ray cast images only - any samples taken from other types of mapper will be reported in that mapper directly

float* vtkRayCaster::GetParallelIncrements void   
 

For a parallel projection, get the (x,y,z) world increments to move one pixel along the image plane x and the image plane y axes.

float* vtkRayCaster::GetParallelStartPosition void   
 

For a parallel projection, get the starting position of a ray in the lower left hand corder of the viewport.

float* vtkRayCaster::GetPerspectiveViewRays  
 

Method for a vtkVolumeMapper to retrieve the view rays for a perspective projection

virtual float vtkRayCaster::GetTotalRenderTime   [virtual]
 

Get the total time required for ray casting.

float vtkRayCaster::GetViewportScaleFactor vtkRenderer   ren
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS This method returns the scale that should be applied to the viewport for geometric rendering, and for the image in volume rendering. It is either explicitly set (if AutomaticScaleAdjustment is off) or is adjusted automatically to get the desired frame rate. Note: IMPORTANT!!!! This should only be called once per render!!!

float vtkRayCaster::GetViewportStepSize  
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS Get the step size that should be used

void vtkRayCaster::GetViewRaysSize int    size[2]
 

Get the size in pixels of the view rays for the selected scale index

virtual int vtkRayCaster::IsA const char *    type [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

int vtkRayCaster::IsTypeOf const char *    type [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

void vtkRayCaster::NearestNeighborZoom float *    smallImage,
float *    largeImage,
int    smallDims[2],
int    largeDims[2]
[protected]
 

Zoom the small image up the full size using nearest neighbor interpolation

vtkRayCaster* vtkRayCaster::New   [static]
 

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

void vtkRayCaster::PrintSelf ostream &    os,
vtkIndent    indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkRayCaster::Render vtkRenderer  ,
int   ,
vtkProp **   ,
int   ,
vtkProp **   
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERING PROCESS Render all prop that require ray casting or that render into an image buffer. Merge the results with the image generated from updating the geometry, and place it on the screen.

void vtkRayCaster::RescaleImage   [protected]
 

Rescale the image from the small size to the full size using one of the two interpolation methods above - NearestNeighborZoom or BilinearZoom.

vtkRayCaster* vtkRayCaster::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

virtual void vtkRayCaster::SetAutomaticScaleLowerLimit float    [virtual]
 

Set / Get the lower limit for scaling an image. This will define the worst resolution allowed during multiresolution rendering. The default value is 0.15.

virtual void vtkRayCaster::SetBilinearImageZoom int    [virtual]
 

Set/Get the value of bilinear image zooming.

void vtkRayCaster::SetImageScale int    level,
float    scale
 

Set/Get the scale factor for a given level. This is used during multi- resolution interactive rendering

virtual void vtkRayCaster::SetNumberOfThreads int    [virtual]
 

Set / Get the number of threads used during ray casting

virtual void vtkRayCaster::SetRenderer vtkRenderer   [virtual]
 

WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE This method allows the ray caster to know about the renderer with which it is associated

virtual void vtkRayCaster::SetSelectedImageScaleIndex int    [virtual]
 

During multi-resolution rendering, this indicated the selected level of resolution

void vtkRayCaster::SetViewRaysStepSize int    level,
float    scale
 

For each level of resolution, set the step size associated with that level. This may be used by the vtkVolumeMapper.


The documentation for this class was generated from the following file:
Generated on Tue Mar 19 13:31:58 2002 for VTK by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002