VISH  0.2
Classes | Typedefs | Enumerations | Functions | Variables
Wizt Namespace Reference

The Vish namespace. More...

Classes

Typedefs

Enumerations

Functions

Variables


Detailed Description

The Vish namespace.

It is historically not "Vish" but something else, but since it is weird enough to be unique, we'll just keep it that way. It is unlikely that someone else will chose this namespace as well.

The Vish namespace embraces classes that constitute the Vish visualization environment. All classes that depend on Vish base classes should be put into this namespaces, classes that don't depend on it should be in another namespace. For instance, there is the Fiber namespace for the optional datamodel as implemented by the FiberLib2. These base classes are independent of the Vish kernel. The interface classes between Vish and the FiberLib2 are however placed into the Vish namespace.

Note that the spelling "Wizt" is not to imply the German meaning of "Witz" (joke). It has multiple interpretations, among them something like "wishful visualization toolkit", "Wizard's Toolkit" and more. This was some historically initial choice for what has become Vish later. It is still a good synonym, but harder to pronounce and remember than Vish. Plus, there is this possibly misleading connection to the aforementioned German word. The term "Vish" comes with the promotional advantage that people using Vish for Scientific Visualization tend to speak about Vishualization after a while. ;)


Typedef Documentation

The Anemone Cache, called the Seagrass, is based on Anemone objects.

The Seagrass class manages Anemone objects, which are referred to from creator objects that are stored in application code. All these creator objects are child classes of the AnemoneCreatorBase;

typedef const std::pair<const RefPtr<ValueSet>, const RefPtr<ValuePool> > Wizt::ValueSetPair

Pairing of a ValueSet and a ValuePool.

This provides context information for evaluation of VSlots


Enumeration Type Documentation

anonymous enum
Enumerator:
MIN_EXPERT_LEVEL 

Minimal expertlevel.

MAX_EXPERT_LEVEL 

Maximal expert level.

INVALID_EXPERT_LEVEL 

invalid expert level

The render category.

Enumerator:
RENDER_FIRST 

The minimum level.

Denotes objects that are rendered first.

BACKGROUND_OBJECT 

Background objects are fixed with respect to the viewer.

Background objects are rendered with projection and model view matrix set to identity matrix.

CAMERA_OBJECT 

Implementation of Camera objects, i.e.

objects that set the CameraSettings property in a VRenderContext. Such objects are not supposed to do any OpenGL rendering per se. Other objects may be introduced at CAMERA_OBJECT+N, where N is a number larger than zero such that the result is still smaller than CAMERA_LENS_OBJECT. Such objects may modify the VRenderContext::CameraSettings properties, depending on other parameters, such as required for cube mapping, panorama rendering, Cave support and similar.

A full implementation of camera interaction and setup in Vish also requires a CAMERA_LENS_OBJECT, which sets up the projection matrix based on the VRenderContext and a NAVIGATION_OBJECT that finally sets the model view matrix.

CAMERA_LENS_OBJECT 

Implementations of Camera lenses, i.e.

objects which modify the projection matrix. Camera objects are called with active projection matrix. A user-defined camera object is implemented like a usual render object, but with its priority set to CAMERA_OBJECT. Its purpose is to modify the current OpenGL matrix (which is the projection matrix). For this, it must overload the environment_render() routine.

NAVIGATION_OBJECT 

Implementation for Camera navigation, i.e.

objects which modify the modelview matrix for navigation purposes. Derived objects overload the environment_render() routine. All objects with a higher priority will be subject to navigation, objects with lower priority will reside fixed relative to the camera (e.g., could be a window or airplane console).

CELESTIAL_OBJECT 

Celestial objects reside in the background, but are fully transformed due to camera motion.

Celestial objects are called after the camera has been set, but the current matrix is the model view matrix.

DEFAULT_OBJECT 

Usual objects shall be assigned a priority number around zero.

Slight deviations (+/-10000) are permittable in case the order in which these objects shall be rendered is of relevance.

TRANSPARENT_OBJECT 

Transparent objects should be rendered after opaque objects have been rendered.

VOLUMETRIC_OBJECT 

Objects that implement methods like volume rendering, which should come a little later than generic transparent objects.

SLICEABLE_OBJECT 

Special class of transparent objects that support slicing, i.e.

partial drawing in the z-direction (depth, or distance from eye).

OVERLAY_OBJECT 

Overlay objects are rendered after all other objects have been rendered.

The projection matrix is set to identity.

RENDER_LAST 

The maximum level.

Denotes objects that are rendered last.


Function Documentation

VBASE_API RefPtr< VSlot > Wizt::addParameter ( VObject *  theObject,
const ParameterID &  name,
int  EL,
const RefPtr< VParameter > &  param,
bool  overwriteExistingSlot 
)

Internal helper function.

Calls VObject::addParameter();

VBASE_API RefPtr< VSlot > Wizt::addSlot ( VObject *  theObject,
const RefPtr< VSlot > &  S,
int  expertLevel,
bool  overwriteExistingSlot 
)

Internal helper function.

Calls VObject::addSlot();

string VBASE_API Wizt::basename ( const string &  url)

Return the basic name of the URL, which is without extension and path information.

This is the text between the last '/' and the last '.'

Todo:
move into memcore/stringutil.hpp
string VBASE_API Wizt::extname ( const string &  url)

Return the filename extension, which is the string after the last '.

'

Todo:
move into memcore/stringutil.hpp
bool Wizt::glCall ( const RefPtr< DisplayList > &  DL) throw () [inline]

Call a display list if it is a valid.

Parameters:
DLReference to a display list object.
bool Wizt::glDraw ( const VBoundingBox &  BB) [inline]

Draw a bounding box via OpenGL, including some rounding of edges, as inspired by http://www.bluevoid.com/opengl/sig00/advanced00/notes/node290.html.

Returns:
If there is no bounding box here, nothing will be drawn, and the function returns false.
GLVISH_API MemCore::RefPtr< IndexBufferObject > Wizt::newIndexBuffer ( const MemCore::RefPtr< MemCore::ChunkBase > &  data,
BufferArray::usage  usage_hint = BufferArray::STATIC_DRAW 
)

Create an OpenGL Index Buffer from some abstract chunk of data.

Note that these data must be either unsigned short or unsigned int, other types are not supported by OpenGL. unsigned char is possible as well, in case your viz needs are less than 256 elements and memory is really tight.

template<class Type >
MemCore::RefPtr<IndexBuffer<Type> > Wizt::newIndexBuffer ( const std::vector< Type > &  data,
BufferArray::usage  usage_hint = BufferArray::STATIC_DRAW 
) [inline]

Create an OpenGL Index Buffer from a std::vector<> of indices.

Note that only unsigned integer types are supported by OpenGL.

template<class Type >
MemCore::RefPtr<IndexBuffer<Type> > Wizt::newIndexBuffer ( const MemCore::RefPtr< MemCore::TypedChunk< Type > > &  data,
BufferArray::usage  usage_hint = BufferArray::STATIC_DRAW 
)

Create an OpenGL Index Buffer from a Chunk of memory of known type.

Note that only unsigned integer types are supported by OpenGL.

VBASE_API int Wizt::openModules ( const char *  dirpath,
bool   callbackconst char *n, bool,
bool  CountOnly = false,
const MemCore::RefPtr< MemCore::StringList > &  Oceans = NullPtr() 
)

Load all VISH modules under the given path.

VISH modules are shared librarys (aka dll's) that are loaded at runtime. We call them the "vishes".

Parameters:
dirpathSome path were vishes may reside, ready so swim (to be loaded). The dirpath may contain a filename, which is cropped off then.
callbackAn optional callback function that is called for each found vish .
CountOnlyIf set, it doesn't try to load the modules, but just gives a count of the files in the specified directory.
OceansThe oceans where to look at, which are subdirectories of Vish modules. They reside in the bin directory of Vish.
VBASE_API VAcceptInfoList_t Wizt::operator& ( const VAcceptInfoList_t &  AI,
const std::string reason 
)

Convenience operator to set the reason information by just adding a string to the pointer.

Note: All entries will be modified!

VBASE_API VAcceptInfoList_t Wizt::operator* ( const VAcceptInfoList_t &  AI,
double  value 
)

Convenience operator to set the suitability flag by just multiplying the pointer with a double value.

Note: All entries will be modified!

template<class Type >
bool Wizt::operator<< ( const VOutputAssignmentContext< Type > &  p,
const Type &  T 
) [inline]

Allows to set an output parameter in a context-sensitive way:

   VOutput<int> R;
   int          r;
        R << Context << r;

Sets the value of the output parameter R to be that of the local variable r, relative to the given context.

Note:
This function touches the respective output slot, even if the value is the same as it was.
template<class Type >
bool Wizt::operator<<= ( const VOutputAssignmentContext< Type > &  p,
const Type &  T 
) [inline]

Allows to set an output parameter in a context-sensitive way, only updating it if it has changed.

This function requires a copy constructor for the respective type and assumes the existence of an inequality operator "!=". Application code is like this:

   VOutput<int> R;
   int          r;
        R << Context <<= r;

Sets the value of the output parameter R to be that of the local variable r, relative to the given context.

Note:
This function touches the respective output slot only if the new value is different than what it was.
GLVISH_API bool Wizt::operator> ( const SlotContext SC,
const std::pair< WeakPtr< GLProgram >, string > &   
)

Operator abuse: Allow direct assignment of a shader variable from a slot context.

        HOffset << Context > MyProgram->uniform("hoffset");

With HOffset being a Slot.

GLVISH_API bool Wizt::operator> ( const SlotContext SC,
const WeakPtr< GLProgram > &  P 
)

Operator abuse: Allow direct assignment of a shader variable from a slot context using the slot's name as variable name.

        MySlot << Context > MyProgram;

With MySlot being a TypedSlot.

template<class Type >
bool Wizt::operator>> ( const SlotContext SC,
Type &  Variable 
) [inline]

Assign a variable from a slot context, returns true or false, if this was possible or not.

Note that the type of the slot and variable type do not need to match necessarily.

template<class Type >
bool Wizt::operator>> ( const VOutputAssignmentContext< Type > &  p,
Type &  T 
) [inline]

Allows to retrieve an input parameter in a context-sensitive way:

   VOutput<int> R;
   int          r;
        R << Context >> r;

Reads the value of the output parameter R into the local variable r, relative to the given context.

GLVISH_API void Wizt::RequireGLContext ( )

An internal safety function that checks whether an OpenGL context is currently enabled for the active thread.

If not, an exception will be thrown.


Variable Documentation

VBASE_API int Wizt::verbosity_level = -1

The verbosity level of printed debug information, higher values increase output.

By default, it uses the value of the environment variable VVERBOSITY, but may be set to any value by an application. If it set to a negative value, it will use the environment variable upon next call of Vprintf().