VTK
9.1.0
|
A small collection of noise routines for LIC. More...
#include <vtkSurfaceLICHelper.h>
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) |
A small collection of noise routines for LIC.
Definition at line 43 of file vtkSurfaceLICHelper.h.
vtkSurfaceLICHelper::vtkSurfaceLICHelper | ( | ) |
vtkSurfaceLICHelper::~vtkSurfaceLICHelper | ( | ) |
|
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.
|
inline |
Convert viewport to texture coordinates.
Definition at line 96 of file vtkSurfaceLICHelper.h.
|
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.
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.
|
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.
|
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.
void vtkSurfaceLICHelper::RenderQuad | ( | const vtkPixelExtent & | viewExt, |
const vtkPixelExtent & | viewportExt, | ||
vtkOpenGLHelper * | cbo | ||
) |
Render a quad (to trigger a shader to run)
|
inline |
Compute the index into the 4x4 OpenGL ordered matrix.
Definition at line 152 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 visibility 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 |
vtkSmartPointer<vtkImageData> vtkSurfaceLICHelper::Noise |
Definition at line 198 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::NoiseImage |
Definition at line 199 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::DepthImage |
Definition at line 200 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::GeometryImage |
Definition at line 201 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::VectorImage |
Definition at line 202 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeVectorImage |
Definition at line 203 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::MaskVectorImage |
Definition at line 204 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeMaskVectorImage |
Definition at line 205 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::LICImage |
Definition at line 206 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::RGBColorImage |
Definition at line 207 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::HSLColorImage |
Definition at line 208 of file vtkSurfaceLICHelper.h.
bool vtkSurfaceLICHelper::HasVectors |
Definition at line 210 of file vtkSurfaceLICHelper.h.
std::deque<vtkPixelExtent> vtkSurfaceLICHelper::BlockExts |
Definition at line 211 of file vtkSurfaceLICHelper.h.
vtkOpenGLHelper* vtkSurfaceLICHelper::ColorEnhancePass |
Definition at line 213 of file vtkSurfaceLICHelper.h.
vtkOpenGLHelper* vtkSurfaceLICHelper::CopyPass |
Definition at line 214 of file vtkSurfaceLICHelper.h.
vtkOpenGLHelper* vtkSurfaceLICHelper::ColorPass |
Definition at line 215 of file vtkSurfaceLICHelper.h.
int vtkSurfaceLICHelper::Viewsize[2] |
Definition at line 217 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkSurfaceLICComposite> vtkSurfaceLICHelper::Compositor |
Definition at line 218 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkOpenGLFramebufferObject> vtkSurfaceLICHelper::FBO |
Definition at line 219 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkLineIntegralConvolution2D> vtkSurfaceLICHelper::LICer |
Definition at line 221 of file vtkSurfaceLICHelper.h.
vtkPainterCommunicator* vtkSurfaceLICHelper::Communicator |
Definition at line 222 of file vtkSurfaceLICHelper.h.
vtkPixelExtent vtkSurfaceLICHelper::DataSetExt |
Definition at line 223 of file vtkSurfaceLICHelper.h.
vtkWeakPointer<vtkOpenGLRenderWindow> vtkSurfaceLICHelper::Context |
Definition at line 225 of file vtkSurfaceLICHelper.h.
bool vtkSurfaceLICHelper::ContextNeedsUpdate |
Definition at line 227 of file vtkSurfaceLICHelper.h.
bool vtkSurfaceLICHelper::CommunicatorNeedsUpdate |
Definition at line 228 of file vtkSurfaceLICHelper.h.