VTK
|
Hardware-Assisted Visibility Sorting unstructured grid mapper, OpenGL implementation. More...
#include <vtkOpenGLHAVSVolumeMapper.h>
Hardware-Assisted Visibility Sorting unstructured grid mapper, OpenGL implementation.
vtkHAVSVolumeMapper is a class that renders polygonal data (represented as an unstructured grid) using the Hardware-Assisted Visibility Sorting (HAVS) algorithm. First the unique triangles are sorted in object space, then they are sorted in image space using a fixed size A-buffer implemented on the GPU called the k-buffer. The HAVS algorithm excels at rendering large datasets quickly. The trade-off is that the algorithm may produce some rendering artifacts due to an insufficient k size (currently 2 or 6 is supported) or read/write race conditions.
A built in level-of-detail (LOD) approach samples the geometry using one of two heuristics (field or area). If LOD is enabled, the amount of geometry that is sampled and rendered changes dynamically to stay within the target frame rate. The field sampling method generally works best for datasets with cell sizes that don't vary much in size. On the contrary, the area sampling approach gives better approximations when the volume has a lot of variation in cell size.
The HAVS algorithm uses several advanced features on graphics hardware. The k-buffer sorting network is implemented using framebuffer objects (FBOs) with multiple render targets (MRTs). Therefore, only cards that support these features can run the algorithm (at least an ATI 9500 or an NVidia NV40 (6600)).
Definition at line 128 of file vtkOpenGLHAVSVolumeMapper.h.
Reimplemented from vtkHAVSVolumeMapper.
Definition at line 134 of file vtkOpenGLHAVSVolumeMapper.h.
vtkOpenGLHAVSVolumeMapper::vtkOpenGLHAVSVolumeMapper | ( | ) | [protected] |
vtkOpenGLHAVSVolumeMapper::~vtkOpenGLHAVSVolumeMapper | ( | ) | [protected] |
static vtkOpenGLHAVSVolumeMapper* vtkOpenGLHAVSVolumeMapper::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkHAVSVolumeMapper.
static int vtkOpenGLHAVSVolumeMapper::IsTypeOf | ( | const char * | name | ) | [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 vtkHAVSVolumeMapper.
virtual int vtkOpenGLHAVSVolumeMapper::IsA | ( | const char * | name | ) | [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 vtkHAVSVolumeMapper.
static vtkOpenGLHAVSVolumeMapper* vtkOpenGLHAVSVolumeMapper::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkHAVSVolumeMapper.
virtual vtkObjectBase* vtkOpenGLHAVSVolumeMapper::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkHAVSVolumeMapper.
Reimplemented from vtkHAVSVolumeMapper.
virtual void vtkOpenGLHAVSVolumeMapper::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 vtkHAVSVolumeMapper.
virtual void vtkOpenGLHAVSVolumeMapper::Render | ( | vtkRenderer * | ren, |
vtkVolume * | vol | ||
) | [virtual] |
Render the volume
Implements vtkUnstructuredGridVolumeMapper.
virtual void vtkOpenGLHAVSVolumeMapper::ReleaseGraphicsResources | ( | vtkWindow * | ) | [virtual] |
Release any graphics resources that are being consumed by this volume renderer.
Reimplemented from vtkUnstructuredGridVolumeMapper.
virtual void vtkOpenGLHAVSVolumeMapper::SetGPUDataStructures | ( | bool | ) | [virtual] |
Set/get whether or not the data structures should be stored on the GPU for better peformance.
Implements vtkHAVSVolumeMapper.
virtual bool vtkOpenGLHAVSVolumeMapper::SupportedByHardware | ( | vtkRenderer * | r | ) | [virtual] |
Check hardware support for the HAVS algorithm. Necessary features include off-screen rendering, 32-bit fp textures, multiple render targets, and framebuffer objects. Subclasses must override this method to indicate if supported by Hardware.
virtual int vtkOpenGLHAVSVolumeMapper::FillInputPortInformation | ( | int | port, |
vtkInformation * | info | ||
) | [protected, virtual] |
Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.
Reimplemented from vtkUnstructuredGridVolumeMapper.
virtual void vtkOpenGLHAVSVolumeMapper::Initialize | ( | vtkRenderer * | ren, |
vtkVolume * | vol | ||
) | [protected, virtual] |
Implements vtkHAVSVolumeMapper.
virtual void vtkOpenGLHAVSVolumeMapper::InitializeLookupTables | ( | vtkVolume * | vol | ) | [protected, virtual] |
Reimplemented from vtkHAVSVolumeMapper.
void vtkOpenGLHAVSVolumeMapper::InitializeGPUDataStructures | ( | ) | [protected] |
void vtkOpenGLHAVSVolumeMapper::InitializeShaders | ( | ) | [protected] |
void vtkOpenGLHAVSVolumeMapper::DeleteShaders | ( | ) | [protected] |
void vtkOpenGLHAVSVolumeMapper::InitializeFramebufferObject | ( | ) | [protected] |
void vtkOpenGLHAVSVolumeMapper::RenderHAVS | ( | vtkRenderer * | ren | ) | [protected] |
void vtkOpenGLHAVSVolumeMapper::SetupFBOZBuffer | ( | int | screenWidth, |
int | screenHeight, | ||
float | depthNear, | ||
float | depthFar, | ||
float * | zbuffer | ||
) | [protected] |
void vtkOpenGLHAVSVolumeMapper::SetupFBOMRT | ( | ) | [protected] |
void vtkOpenGLHAVSVolumeMapper::DrawFBOInit | ( | int | screenWidth, |
int | screenHeight, | ||
float | depthNear, | ||
float | depthFar | ||
) | [protected] |
void vtkOpenGLHAVSVolumeMapper::DrawFBOGeometry | ( | ) | [protected] |
void vtkOpenGLHAVSVolumeMapper::DrawFBOFlush | ( | int | screenWidth, |
int | screenHeight, | ||
float | depthNear, | ||
float | depthFar | ||
) | [protected] |
void vtkOpenGLHAVSVolumeMapper::DrawBlend | ( | int | screenWidth, |
int | screenHeight, | ||
float | depthNear, | ||
float | depthFar | ||
) | [protected] |
void vtkOpenGLHAVSVolumeMapper::CheckOpenGLError | ( | const char * | str | ) | [protected] |
unsigned int vtkOpenGLHAVSVolumeMapper::VBOVertexName [protected] |
Definition at line 181 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::VBOTexCoordName [protected] |
Definition at line 182 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::VBOVertexIndexName [protected] |
Definition at line 183 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::VertexProgram [protected] |
Definition at line 184 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::FragmentProgramBegin [protected] |
Definition at line 185 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::FragmentProgram [protected] |
Definition at line 186 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::FragmentProgramEnd [protected] |
Definition at line 187 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::FramebufferObject [protected] |
Definition at line 188 of file vtkOpenGLHAVSVolumeMapper.h.
int vtkOpenGLHAVSVolumeMapper::FramebufferObjectSize [protected] |
Definition at line 189 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::FramebufferTextures[4] [protected] |
Definition at line 190 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::DepthTexture [protected] |
Definition at line 191 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::PsiTableTexture [protected] |
Definition at line 194 of file vtkOpenGLHAVSVolumeMapper.h.
unsigned int vtkOpenGLHAVSVolumeMapper::TransferFunctionTexture [protected] |
Definition at line 195 of file vtkOpenGLHAVSVolumeMapper.h.
Definition at line 197 of file vtkOpenGLHAVSVolumeMapper.h.