VTK
9.4.20250129
|
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. | |
void | ClearTextures () |
Free textures we're holding a reference to. | |
void | AllocateTextures (vtkOpenGLRenderWindow *context, int *viewsize) |
Allocate textures. | |
void | AllocateTexture (vtkOpenGLRenderWindow *context, int *viewsize, vtkSmartPointer< vtkTextureObject > &tex, int filter=vtkTextureObject::Nearest) |
Allocate a size texture, store in the given smart pointer. | |
void | AllocateDepthTexture (vtkOpenGLRenderWindow *context, int *viewsize, vtkSmartPointer< vtkTextureObject > &tex) |
Allocate a size texture, store in the given smart pointer. | |
void | Updated () |
After LIC has been computed reset/clean internal state. | |
void | UpdateAll () |
Force all stages to re-execute. | |
void | ViewportQuadPoints (const vtkPixelExtent &viewportExt, GLfloat *quadpts) |
Convert a viewport to a bounding box and it's texture coordinates for a screen size texture. | |
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. | |
void | RenderQuad (const vtkPixelExtent &viewExt, const vtkPixelExtent &viewportExt, vtkOpenGLHelper *cbo) |
Render a quad (to trigger a shader to run) | |
int | idx (int row, int col) |
Compute the index into the 4x4 OpenGL ordered matrix. | |
bool | VisibilityTest (double ndcBBox[24]) |
given a axes aligned bounding box in normalized device coordinates test for view frustum visibility. | |
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. | |
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. | |
void | GetPixelBounds (float *rgba, int ni, vtkPixelExtent &ext) |
Shrink an extent to tightly bound non-zero values. | |
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. | |
void | ViewportQuadTextureCoords (GLfloat *tcoords) |
Convert viewport to texture coordinates. | |
void | ViewQuadPoints (GLfloat *quadpts) |
Convert the entire view to a bounding box and it's texture coordinates for a screen size texture. | |
void | ViewQuadTextureCoords (GLfloat *tcoords) |
Convert the entire view to a bounding box and it's texture coordinates for a screen size texture. | |
Static Public Member Functions | |
static bool | IsSupported (vtkOpenGLRenderWindow *context) |
Check for OpenGL support. | |
static void | StreamingFindMinMax (vtkOpenGLFramebufferObject *fbo, std::deque< vtkPixelExtent > &blockExts, float &min, float &max) |
A small collection of noise routines for LIC.
Definition at line 32 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 85 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 96 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 113 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 125 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 141 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 187 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::NoiseImage |
Definition at line 188 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::DepthImage |
Definition at line 189 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::GeometryImage |
Definition at line 190 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::VectorImage |
Definition at line 191 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeVectorImage |
Definition at line 192 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::MaskVectorImage |
Definition at line 193 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::CompositeMaskVectorImage |
Definition at line 194 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::LICImage |
Definition at line 195 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::RGBColorImage |
Definition at line 196 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkTextureObject> vtkSurfaceLICHelper::HSLColorImage |
Definition at line 197 of file vtkSurfaceLICHelper.h.
bool vtkSurfaceLICHelper::HasVectors |
Definition at line 199 of file vtkSurfaceLICHelper.h.
std::deque<vtkPixelExtent> vtkSurfaceLICHelper::BlockExts |
Definition at line 200 of file vtkSurfaceLICHelper.h.
vtkOpenGLHelper* vtkSurfaceLICHelper::ColorEnhancePass |
Definition at line 202 of file vtkSurfaceLICHelper.h.
vtkOpenGLHelper* vtkSurfaceLICHelper::CopyPass |
Definition at line 203 of file vtkSurfaceLICHelper.h.
vtkOpenGLHelper* vtkSurfaceLICHelper::ColorPass |
Definition at line 204 of file vtkSurfaceLICHelper.h.
int vtkSurfaceLICHelper::Viewsize[2] |
Definition at line 206 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkSurfaceLICComposite> vtkSurfaceLICHelper::Compositor |
Definition at line 207 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkOpenGLFramebufferObject> vtkSurfaceLICHelper::FBO |
Definition at line 208 of file vtkSurfaceLICHelper.h.
vtkSmartPointer<vtkLineIntegralConvolution2D> vtkSurfaceLICHelper::LICer |
Definition at line 210 of file vtkSurfaceLICHelper.h.
vtkPainterCommunicator* vtkSurfaceLICHelper::Communicator |
Definition at line 211 of file vtkSurfaceLICHelper.h.
vtkPixelExtent vtkSurfaceLICHelper::DataSetExt |
Definition at line 212 of file vtkSurfaceLICHelper.h.
vtkWeakPointer<vtkOpenGLRenderWindow> vtkSurfaceLICHelper::Context |
Definition at line 214 of file vtkSurfaceLICHelper.h.
bool vtkSurfaceLICHelper::ContextNeedsUpdate |
Definition at line 216 of file vtkSurfaceLICHelper.h.
bool vtkSurfaceLICHelper::CommunicatorNeedsUpdate |
Definition at line 217 of file vtkSurfaceLICHelper.h.