|
The Vish Visualization Shell 0.3
Vish
|
Implements an operation that affects a 3D rendering, in whatever way. More...
#include <ocean/Anemonia/TransformOperator.hpp>
Classes | |
| struct | Functor |
| struct | Transform |
| An exception-safe helper class to invoke the transformation functor. More... | |
Public Member Functions | |
| bool | initializeAnemone (Anemone &RenderAnemone, VRenderContext &Context) const |
| Forwarding the initializeAnemone() call to the Functor contained here. | |
| TransformOperator (const RefPtr< Functor > &R=NullPtr()) | |
| Construct with optional transformation functor. | |
| ~TransformOperator () | |
| Destructor. | |
Static Public Member Functions | |
| static glsl | getDefaultShaderFunctions (const RefPtr< ValuePool > &Context) |
Static Public Attributes | |
| static const char | GlobalFunctions [] |
| Transform directly from world to screen coordinate (implicitly computing eye coordinates);. | |
Implements an operation that affects a 3D rendering, in whatever way.
It might well be a geometrical transformation, or some clipping, some combination of both, or anything else.
Transformation operators may be provides as output by Vish objects and used as input for a VRenderObject.
Application shader code must use the vish_transform GLSL functions that are provided via the getShaderFunctions(VRenderContext&Context) call. Typical shader code, replacing the usual matrix operations from standard OpenGL, will then look like:
|
static |
Default shader functions to
compute the transformation from world coordinates to eye coordinates
based on OpenGL 1 matrices.
Assumes a global variable gl_ModelViewMatrix conforming to OpenGL compatibility profile, but without a translation component. The translation component has to be provided by the TranslationVector argument.
Transforms from eye space to screen space:
Computes the transformation of a normal vector given in world coordinates to eye space.
|
static |
Transform directly from world to screen coordinate (implicitly computing eye coordinates);.