VISH  0.2
Classes | Public Member Functions
CameraNavigator Class Reference

Implementation of a camera which interacts with the mouse. More...

#include </home/werner/origo/vish/ocean/vcamera/VCameraNavigator.hpp>

List of all members.

Classes

Public Member Functions


Detailed Description

Implementation of a camera which interacts with the mouse.

It is a VEnvironmentRenderObject, i.e. its settings of the OpenGL state influences all consecutive layers.

Three functions need to be overloaded:

A fourth function is optional:

Note that environment_render() may be called any time and more often than update(), in any case independently. It may even be called in a thread simulateneously, so it must be thread safe. In no case the render() function may change the object or static variables. All state variables that need to be transported from one render to the next call need to be placed in the local context state.


Member Function Documentation

bool CameraNavigator::request ( VRequest request,
double  precision,
const WeakVObjectPtr ImmediateRequestor,
const WeakVObjectPtr RootRequestor 
) [virtual]

Request an action, to be performed with a certain precision.

Its main purpose is to iterate all parameters and forward the request to them. If this all parameters have fullfilled their request(), then the virtual update() function is called.

In rare case, an object might want to overload this function, for instance when request shall be forwarded to input objects only under certain circumstances (e.g. an Viewer object that is not visible at the moment).

Returns:
true if the object was changed
Exceptions:
VRequest::Incompletemight occur if a synchroneous request is issued but some operations are still in asynchroneous construction. This is the case when a synchroneous request is issued after an asynchroneous one that has not yet been completed. In such a case, the caller may just repeat the same request. The caller may and should do something else in the meantime, as the async request may still take a while to finish.
Note:
Requests are only processed if enableRequestProcessing() has been called for this object. By default, processing of requests is disabled to avoid requests() to be processed when an object is yet incomplete during construction which may happen in a multithreading environment. This flag must be set after an object is completely constructed.

Check the age of the local state

Some parameter has changed, so call object's update().

Reimplemented from Wizt::VObject.

bool CameraNavigator::update ( VRequest ,
double  precision 
) [virtual]

Virtual update function that implements some heavy action on the object.

Update function.

It is called only if any input object is newer than the current object. It must return true on successful completion. However, the object may touch() itself in the update() routine. Then, it will get a newer time than all input objects, which will trigger all dependent objects as well.

Returns:
Must return true to indicate that the object was successfully updated and may now get the age of the most recent parameter.

Reimplemented from Wizt::VObject.


The documentation for this class was generated from the following files: