Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

VectorViz::VectorSpeckle Class Reference
[Visualization Modules for Vector Fields]

Render a vector field as points with normal vector according to the vector values, simple and fast. More...

#include <VectorSpeckles.hpp>

List of all members.

Classes

Public Types

Public Member Functions

Static Public Member Functions

Public Attributes


Detailed Description

Render a vector field as points with normal vector according to the vector values, simple and fast.

See also:
This visualization is similar to the work Enhancing Spot Noise Visualizations of 2D and 3D Vector Fields by Markus Sabadello, Institute of Computer Graphics, Vienna University of Technology, Vienna / Austria, http://www.cescg.org/CESCG-2002/MSabadello/index.html , though it is an independent development as published in
@inproceedings{CGVR09,
title={Doppler Speckles - A Multi-Purpose Vectorfield Visualization Technique for Arbitrary Meshes},
author={Werner Benger and Georg Ritter and Simon Su and Dimitris E. Nikitopoulos and
Eamonn Walker and Sumanta Acharya and Somnath Roy and Farid Harhad and Wolfgang Kapferer},
booktitle={CGVR'09 - The 2009 International Conference on Computer Graphics and Virtual Reality},
location={Las Vegas, Nevada, USA (July 13-16)},
year=2009,
url={http://sciviz.cct.lsu.edu/papers/2009/CGVR09.pdf}
}
 

Member Function Documentation

string VectorViz::VectorSpeckle::GLCacheField ( const RefPtr< ValuePool > &  Context  )  const [virtual]

The name of the field that will be used for caching opengl VBO's at each of this fragments.

This is a temporary workaround. It will NOT work correctly if a VBO depends on multiple fields. The VBO will only change if the GLCacheField changes (ie., its fragments).

The will be ONE VBO per fragment of this GLCacheField.

Per default, this will be the FragmentSelectionField().

If a rendering method implements a vector field visualization of Grid that does not change, then this function would refer to the name of that vector field. However, if the coordinates changes but not the vector field, it will still display the same. This needs to be reworked.

Reimplemented from Wizt::FragmentPainter.

void VectorViz::VectorSpeckle::setShaderVariables ( VGLRenderContext Context,
const RefPtr< GLProgram > &  ShaderProgram 
) const [virtual]

Virtual function to set variables in the shader program, such as parameters from the Vish inputs.

Typical code might just assign slots to uniform variables:

           struct       MySplatter : SplatRenderObject
           {
                TypedSlot<double>   Value;

                MySplatter(...)
                : SplatRenderObject(...)
                , Value(this, "value", 0.23)
                {}

                override string vertex_shader(VRenderContext&Context) const
                {
                        return "uniform float value; ....";
                }

                override void setShaderVariables(VRenderContext&Context, const RefPtr<Program>&ShaderProgram) const
                {
                        Value << Context > ShaderProgram;
                }
           };

Note that the name of the slot must be equal to the name of the uniform variable in the shader program for this to work. If the names don't match, then an OpenGL error exception will be thrown.

Reimplemented from Wizt::SplatRenderObject.

References Wizt::VStateCreatorBase::myState(), and Wizt::Colorizer::setColormapTexture().