VTK
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
vtkSurfaceLICHelper Class Reference

A small collection of noise routines for LIC. More...

#include <vtkSurfaceLICHelper.h>

Collaboration diagram for vtkSurfaceLICHelper:
[legend]

Public Member Functions

 vtkSurfaceLICHelper ()
 
 ~vtkSurfaceLICHelper ()
 
void ReleaseGraphicsResources (vtkWindow *win)
 Free textures and shader programs we're holding a reference to. More...
 
void ClearTextures ()
 Free textures we're holding a reference to. More...
 
void AllocateTextures (vtkOpenGLRenderWindow *context, int *viewsize)
 Allocate textures. More...
 
void AllocateTexture (vtkOpenGLRenderWindow *context, int *viewsize, vtkSmartPointer< vtkTextureObject > &tex, int filter=vtkTextureObject::Nearest)
 Allocate a size texture, store in the given smart pointer. More...
 
void AllocateDepthTexture (vtkOpenGLRenderWindow *context, int *viewsize, vtkSmartPointer< vtkTextureObject > &tex)
 Allocate a size texture, store in the given smart pointer. More...
 
void Updated ()
 After LIC has been computed reset/clean internal state. More...
 
void UpdateAll ()
 Force all stages to re-execute. More...
 
void ViewportQuadPoints (const vtkPixelExtent &viewportExt, GLfloat *quadpts)
 Convert a viewport to a bounding box and it's texture coordinates for a screen size texture. More...
 
void ViewportQuadTextureCoords (const vtkPixelExtent &viewExt, const vtkPixelExtent &viewportExt, GLfloat *tcoords)
 Convert a viewport to a bounding box and it's texture coordinates for a screen size texture. More...
 
void RenderQuad (const vtkPixelExtent &viewExt, const vtkPixelExtent &viewportExt, vtkOpenGLHelper *cbo)
 Render a quad (to trigger a shader to run) More...
 
int idx (int row, int col)
 Compute the index into the 4x4 OpenGL ordered matrix. More...
 
bool VisibilityTest (double ndcBBox[24])
 given a axes aligned bounding box in normalized device coordinates test for view frustum visibility. More...
 
bool ProjectBounds (double PMV[16], int viewsize[2], double bounds[6], vtkPixelExtent &screenExt)
 Given world space bounds, compute bounding boxes in clip and normalized device coordinates and perform view frustum visiblity test. More...
 
int ProjectBounds (vtkRenderer *ren, vtkActor *actor, vtkDataObject *dobj, int viewsize[2], vtkPixelExtent &dataExt, std::deque< vtkPixelExtent > &blockExts)
 Compute screen space extents for each block in the input dataset and for the entire dataset. More...
 
void GetPixelBounds (float *rgba, int ni, vtkPixelExtent &ext)
 Shrink an extent to tightly bound non-zero values. More...
 
void GetPixelBounds (float *rgba, int ni, std::deque< vtkPixelExtent > &blockExts)
 Shrink a set of extents to tightly bound non-zero values cull extent if it's empty. More...
 
void ViewportQuadTextureCoords (GLfloat *tcoords)
 Convert viewport to texture coordinates. More...
 
void ViewQuadPoints (GLfloat *quadpts)
 Convert the entire view to a bounding box and it's texture coordinates for a screen size texture. More...
 
void ViewQuadTextureCoords (GLfloat *tcoords)
 Convert the entire view to a bounding box and it's texture coordinates for a screen size texture. More...
 

Static Public Member Functions

static bool IsSupported (vtkOpenGLRenderWindow *context)
 Check for OpenGL support. More...
 
static void StreamingFindMinMax (vtkFrameBufferObject2 *fbo, std::deque< vtkPixelExtent > &blockExts, float &min, float &max)
 

Public Attributes

vtkSmartPointer< vtkImageDataNoise
 
vtkSmartPointer< vtkTextureObjectNoiseImage
 
vtkSmartPointer< vtkTextureObjectDepthImage
 
vtkSmartPointer< vtkTextureObjectGeometryImage
 
vtkSmartPointer< vtkTextureObjectVectorImage
 
vtkSmartPointer< vtkTextureObjectCompositeVectorImage
 
vtkSmartPointer< vtkTextureObjectMaskVectorImage
 
vtkSmartPointer< vtkTextureObjectCompositeMaskVectorImage
 
vtkSmartPointer< vtkTextureObjectLICImage
 
vtkSmartPointer< vtkTextureObjectRGBColorImage
 
vtkSmartPointer< vtkTextureObjectHSLColorImage
 
bool HasVectors
 
std::deque< vtkPixelExtentBlockExts
 
vtkOpenGLHelperColorEnhancePass
 
vtkOpenGLHelperCopyPass
 
vtkOpenGLHelperColorPass
 
int Viewsize [2]
 
vtkSmartPointer< vtkSurfaceLICCompositeCompositor
 
vtkSmartPointer< vtkFrameBufferObject2FBO
 
vtkSmartPointer< vtkLineIntegralConvolution2DLICer
 
vtkPainterCommunicatorCommunicator
 
vtkPixelExtent DataSetExt
 
vtkWeakPointer< vtkOpenGLRenderWindowContext
 
bool ContextNeedsUpdate
 
bool CommunicatorNeedsUpdate
 

Detailed Description

A small collection of noise routines for LIC.

Definition at line 43 of file vtkSurfaceLICHelper.h.

Constructor & Destructor Documentation

vtkSurfaceLICHelper::vtkSurfaceLICHelper ( )
vtkSurfaceLICHelper::~vtkSurfaceLICHelper ( )

Member Function Documentation

static bool vtkSurfaceLICHelper::IsSupported ( vtkOpenGLRenderWindow context)
static

Check for OpenGL support.

void vtkSurfaceLICHelper::ReleaseGraphicsResources ( vtkWindow win)

Free textures and shader programs we're holding a reference to.

void vtkSurfaceLICHelper::ClearTextures ( )

Free textures we're holding a reference to.

void vtkSurfaceLICHelper::AllocateTextures ( vtkOpenGLRenderWindow context,
int viewsize 
)

Allocate textures.

void vtkSurfaceLICHelper::AllocateTexture ( vtkOpenGLRenderWindow context,
int viewsize,
vtkSmartPointer< vtkTextureObject > &  tex,
int  filter = vtkTextureObject::Nearest 
)

Allocate a size texture, store in the given smart pointer.

void vtkSurfaceLICHelper::AllocateDepthTexture ( vtkOpenGLRenderWindow context,
int viewsize,
vtkSmartPointer< vtkTextureObject > &  tex 
)

Allocate a size texture, store in the given smart pointer.

void vtkSurfaceLICHelper::Updated ( )

After LIC has been computed reset/clean internal state.

void vtkSurfaceLICHelper::UpdateAll ( )

Force all stages to re-execute.

Necessary if the context or communicator changes.

void vtkSurfaceLICHelper::ViewportQuadTextureCoords ( GLfloat *  tcoords)
inline

Convert viewport to texture coordinates.

Definition at line 103 of file vtkSurfaceLICHelper.h.

void vtkSurfaceLICHelper::ViewportQuadPoints ( const vtkPixelExtent viewportExt,
GLfloat *  quadpts 
)
inline

Convert a viewport to a bounding box and it's texture coordinates for a screen size texture.

Definition at line 114 of file vtkSurfaceLICHelper.h.

void vtkSurfaceLICHelper::ViewportQuadTextureCoords ( const vtkPixelExtent viewExt,
const vtkPixelExtent viewportExt,
GLfloat *  tcoords 
)

Convert a viewport to a bounding box and it's texture coordinates for a screen size texture.

void vtkSurfaceLICHelper::ViewQuadPoints ( GLfloat *  quadpts)
inline

Convert the entire view to a bounding box and it's texture coordinates for a screen size texture.

Definition at line 133 of file vtkSurfaceLICHelper.h.

void vtkSurfaceLICHelper::ViewQuadTextureCoords ( GLfloat *  tcoords)
inline

Convert the entire view to a bounding box and it's texture coordinates for a screen size texture.

Definition at line 145 of file vtkSurfaceLICHelper.h.

void vtkSurfaceLICHelper::RenderQuad ( const vtkPixelExtent viewExt,
const vtkPixelExtent viewportExt,
vtkOpenGLHelper cbo 
)

Render a quad (to trigger a shader to run)

int vtkSurfaceLICHelper::idx ( int  row,
int  col 
)
inline

Compute the index into the 4x4 OpenGL ordered matrix.

Definition at line 163 of file vtkSurfaceLICHelper.h.

bool vtkSurfaceLICHelper::VisibilityTest ( double  ndcBBox[24])

given a axes aligned bounding box in normalized device coordinates test for view frustum visibility.

if all points are outside one of the view frustum planes then this box is not visible. we might have false positive where more than one clip plane intersects the box.

bool vtkSurfaceLICHelper::ProjectBounds ( double  PMV[16],
int  viewsize[2],
double  bounds[6],
vtkPixelExtent screenExt 
)

Given world space bounds, compute bounding boxes in clip and normalized device coordinates and perform view frustum visiblity test.

return true if the bounds are visible. If so the passed in extent object is initialized with the corresponding screen space extents.

int vtkSurfaceLICHelper::ProjectBounds ( vtkRenderer ren,
vtkActor actor,
vtkDataObject dobj,
int  viewsize[2],
vtkPixelExtent dataExt,
std::deque< vtkPixelExtent > &  blockExts 
)

Compute screen space extents for each block in the input dataset and for the entire dataset.

Only visible blocks are used in the computations.

void vtkSurfaceLICHelper::GetPixelBounds ( float rgba,
int  ni,
vtkPixelExtent ext 
)

Shrink an extent to tightly bound non-zero values.

void vtkSurfaceLICHelper::GetPixelBounds ( float rgba,
int  ni,
std::deque< vtkPixelExtent > &  blockExts 
)

Shrink a set of extents to tightly bound non-zero values cull extent if it's empty.

static void vtkSurfaceLICHelper::StreamingFindMinMax ( vtkFrameBufferObject2 fbo,
std::deque< vtkPixelExtent > &  blockExts,
float min,
float max 
)
static

Member Data Documentation

vtkSmartPointer<vtkImageData> vtkSurfaceLICHelper::Noise

Definition at line 220 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::NoiseImage

Definition at line 221 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::DepthImage

Definition at line 222 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::GeometryImage

Definition at line 223 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::VectorImage

Definition at line 224 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeVectorImage

Definition at line 225 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::MaskVectorImage

Definition at line 226 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeMaskVectorImage

Definition at line 227 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::LICImage

Definition at line 228 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::RGBColorImage

Definition at line 229 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::HSLColorImage

Definition at line 230 of file vtkSurfaceLICHelper.h.

bool vtkSurfaceLICHelper::HasVectors

Definition at line 232 of file vtkSurfaceLICHelper.h.

std::deque<vtkPixelExtent> vtkSurfaceLICHelper::BlockExts

Definition at line 233 of file vtkSurfaceLICHelper.h.

vtkOpenGLHelper* vtkSurfaceLICHelper::ColorEnhancePass

Definition at line 235 of file vtkSurfaceLICHelper.h.

vtkOpenGLHelper* vtkSurfaceLICHelper::CopyPass

Definition at line 236 of file vtkSurfaceLICHelper.h.

vtkOpenGLHelper* vtkSurfaceLICHelper::ColorPass

Definition at line 237 of file vtkSurfaceLICHelper.h.

int vtkSurfaceLICHelper::Viewsize[2]

Definition at line 239 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkSurfaceLICComposite> vtkSurfaceLICHelper::Compositor

Definition at line 240 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkFrameBufferObject2> vtkSurfaceLICHelper::FBO

Definition at line 241 of file vtkSurfaceLICHelper.h.

vtkSmartPointer<vtkLineIntegralConvolution2D> vtkSurfaceLICHelper::LICer

Definition at line 243 of file vtkSurfaceLICHelper.h.

vtkPainterCommunicator* vtkSurfaceLICHelper::Communicator

Definition at line 244 of file vtkSurfaceLICHelper.h.

vtkPixelExtent vtkSurfaceLICHelper::DataSetExt

Definition at line 245 of file vtkSurfaceLICHelper.h.

vtkWeakPointer<vtkOpenGLRenderWindow> vtkSurfaceLICHelper::Context

Definition at line 247 of file vtkSurfaceLICHelper.h.

bool vtkSurfaceLICHelper::ContextNeedsUpdate

Definition at line 249 of file vtkSurfaceLICHelper.h.

bool vtkSurfaceLICHelper::CommunicatorNeedsUpdate

Definition at line 250 of file vtkSurfaceLICHelper.h.


The documentation for this class was generated from the following file: