VTK  9.1.0
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 visibility 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 (vtkOpenGLFramebufferObject *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< vtkOpenGLFramebufferObjectFBO
 
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()

vtkSurfaceLICHelper::~vtkSurfaceLICHelper ( )

Member Function Documentation

◆ IsSupported()

static bool vtkSurfaceLICHelper::IsSupported ( vtkOpenGLRenderWindow context)
static

Check for OpenGL support.

◆ ReleaseGraphicsResources()

void vtkSurfaceLICHelper::ReleaseGraphicsResources ( vtkWindow win)

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

◆ ClearTextures()

void vtkSurfaceLICHelper::ClearTextures ( )

Free textures we're holding a reference to.

◆ AllocateTextures()

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

Allocate textures.

◆ AllocateTexture()

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

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

◆ AllocateDepthTexture()

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

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

◆ Updated()

void vtkSurfaceLICHelper::Updated ( )

After LIC has been computed reset/clean internal state.

◆ UpdateAll()

void vtkSurfaceLICHelper::UpdateAll ( )

Force all stages to re-execute.

Necessary if the context or communicator changes.

◆ ViewportQuadTextureCoords() [1/2]

void vtkSurfaceLICHelper::ViewportQuadTextureCoords ( GLfloat *  tcoords)
inline

Convert viewport to texture coordinates.

Definition at line 96 of file vtkSurfaceLICHelper.h.

◆ ViewportQuadPoints()

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 107 of file vtkSurfaceLICHelper.h.

◆ ViewportQuadTextureCoords() [2/2]

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.

◆ ViewQuadPoints()

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 124 of file vtkSurfaceLICHelper.h.

◆ ViewQuadTextureCoords()

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 136 of file vtkSurfaceLICHelper.h.

◆ RenderQuad()

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

Render a quad (to trigger a shader to run)

◆ idx()

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

Compute the index into the 4x4 OpenGL ordered matrix.

Definition at line 152 of file vtkSurfaceLICHelper.h.

◆ VisibilityTest()

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.

◆ ProjectBounds() [1/2]

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 visibility test.

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

◆ ProjectBounds() [2/2]

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.

◆ GetPixelBounds() [1/2]

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

Shrink an extent to tightly bound non-zero values.

◆ GetPixelBounds() [2/2]

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.

◆ StreamingFindMinMax()

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

Member Data Documentation

◆ Noise

vtkSmartPointer<vtkImageData> vtkSurfaceLICHelper::Noise

Definition at line 198 of file vtkSurfaceLICHelper.h.

◆ NoiseImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::NoiseImage

Definition at line 199 of file vtkSurfaceLICHelper.h.

◆ DepthImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::DepthImage

Definition at line 200 of file vtkSurfaceLICHelper.h.

◆ GeometryImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::GeometryImage

Definition at line 201 of file vtkSurfaceLICHelper.h.

◆ VectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::VectorImage

Definition at line 202 of file vtkSurfaceLICHelper.h.

◆ CompositeVectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeVectorImage

Definition at line 203 of file vtkSurfaceLICHelper.h.

◆ MaskVectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::MaskVectorImage

Definition at line 204 of file vtkSurfaceLICHelper.h.

◆ CompositeMaskVectorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeMaskVectorImage

Definition at line 205 of file vtkSurfaceLICHelper.h.

◆ LICImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::LICImage

Definition at line 206 of file vtkSurfaceLICHelper.h.

◆ RGBColorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::RGBColorImage

Definition at line 207 of file vtkSurfaceLICHelper.h.

◆ HSLColorImage

vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::HSLColorImage

Definition at line 208 of file vtkSurfaceLICHelper.h.

◆ HasVectors

bool vtkSurfaceLICHelper::HasVectors

Definition at line 210 of file vtkSurfaceLICHelper.h.

◆ BlockExts

std::deque<vtkPixelExtent> vtkSurfaceLICHelper::BlockExts

Definition at line 211 of file vtkSurfaceLICHelper.h.

◆ ColorEnhancePass

vtkOpenGLHelper* vtkSurfaceLICHelper::ColorEnhancePass

Definition at line 213 of file vtkSurfaceLICHelper.h.

◆ CopyPass

vtkOpenGLHelper* vtkSurfaceLICHelper::CopyPass

Definition at line 214 of file vtkSurfaceLICHelper.h.

◆ ColorPass

vtkOpenGLHelper* vtkSurfaceLICHelper::ColorPass

Definition at line 215 of file vtkSurfaceLICHelper.h.

◆ Viewsize

int vtkSurfaceLICHelper::Viewsize[2]

Definition at line 217 of file vtkSurfaceLICHelper.h.

◆ Compositor

vtkSmartPointer<vtkSurfaceLICComposite> vtkSurfaceLICHelper::Compositor

Definition at line 218 of file vtkSurfaceLICHelper.h.

◆ FBO

vtkSmartPointer<vtkOpenGLFramebufferObject> vtkSurfaceLICHelper::FBO

Definition at line 219 of file vtkSurfaceLICHelper.h.

◆ LICer

vtkSmartPointer<vtkLineIntegralConvolution2D> vtkSurfaceLICHelper::LICer

Definition at line 221 of file vtkSurfaceLICHelper.h.

◆ Communicator

vtkPainterCommunicator* vtkSurfaceLICHelper::Communicator

Definition at line 222 of file vtkSurfaceLICHelper.h.

◆ DataSetExt

vtkPixelExtent vtkSurfaceLICHelper::DataSetExt

Definition at line 223 of file vtkSurfaceLICHelper.h.

◆ Context

vtkWeakPointer<vtkOpenGLRenderWindow> vtkSurfaceLICHelper::Context

Definition at line 225 of file vtkSurfaceLICHelper.h.

◆ ContextNeedsUpdate

bool vtkSurfaceLICHelper::ContextNeedsUpdate

Definition at line 227 of file vtkSurfaceLICHelper.h.

◆ CommunicatorNeedsUpdate

bool vtkSurfaceLICHelper::CommunicatorNeedsUpdate

Definition at line 228 of file vtkSurfaceLICHelper.h.


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