OpenCOVER
|
#include <cover/coVRPluginSupport.h>
Public Member Functions | |
bool | debugLevel (int level) const |
returns true if level <= debugLevel More... | |
void | initUI () |
std::ostream & | notify (Notify::NotificationLevel level=Notify::Info) const |
std::ostream & | notify (Notify::NotificationLevel level, const char *format,...) const |
INTERNAL int | getNumClipPlanes () |
return the number of clipPlanes reserved for the kernel, others are available to VRML ClippingPlane Node More... | |
osg::ClipPlane * | getClipPlane (int num) |
return pointer to a clipping plane More... | |
void | preparePluginUnload () |
bool | isClippingOn () const |
returns true if clipping is on More... | |
int | getActiveClippingPlane () const |
return number of clipping plane user is possibly interacting with More... | |
void | setActiveClippingPlane (int plane) |
set number of clipping plane user is possibly interacting with More... | |
osg::Group * | getScene () const |
get scene group node More... | |
osg::ClipNode * | getObjectsRoot () const |
get the group node for all COVISE and model geometry More... | |
osg::MatrixTransform * | getPointer () const |
get the MatrixTransform node of the hand More... | |
const osg::Matrix & | getPointerMat () const |
get matrix of hand transform (same as getPointer()->getMatrix()) More... | |
const osg::Matrix & | getMouseMat () const |
const osg::Matrix & | getRelativeMat () const |
get matrix for relative input (identity if no input) More... | |
osg::MatrixTransform * | getObjectsXform () const |
get the MatrixTransform for objects translation and rotation More... | |
const osg::Matrix & | getXformMat () const |
same as getObjectsXform()->getMatrix() More... | |
void | setXformMat (const osg::Matrix &mat) |
same as getObjectsXform()->setMatrix() More... | |
osg::MatrixTransform * | getObjectsScale () const |
get the MatrixTransform for objects scaling More... | |
void | setScale (float s) |
set the scale matrix of the scale node More... | |
float | getScale () const |
get the scale factor of the scale node More... | |
const osg::Matrix & | getBaseMat () const |
transformation matrix from object coordinates to world coordinates More... | |
const osg::Matrix & | getInvBaseMat () const |
transformation from world coordinates to object coordinates More... | |
void | watchFileDescriptor (int fd) |
register filedescriptor fd for watching so that scene will be re-rendererd when it is ready More... | |
void | unwatchFileDescriptor (int fd) |
remove fd from filedescriptors to watch More... | |
vrui::coUpdateManager * | getUpdateManager () const |
float | getSceneSize () const |
get the scene size defined in covise.config More... | |
bool | isHighQuality () const |
favor high-quality rendering instead of interactivity More... | |
bool | isVRBconnected () |
bool | sendVrbMessage (const covise::MessageBase *msg) const |
send a message either via COVISE connection or via tcp to VRB More... | |
const osg::Matrix & | getViewerMat () const |
get the position and orientation of the user in world coordinates More... | |
void | setNodesIsectable (osg::Node *n, bool isect) |
search geodes under node and set Visible bit in node mask More... | |
coPointerButton * | getPointerButton () const |
returns a pointer to a coPointerButton object for the main button device More... | |
coPointerButton * | getMouseButton () const |
returns a pointer to a coPointerButton object representing the mouse buttons state More... | |
coPointerButton * | getRelativeButton () const |
returns a pointer to a coPointerButton object representing the buttons state on the relative input device More... | |
vrui::coMenu * | getMenu () |
returns the COVER Menu (Pinboard) More... | |
osg::Group * | getMenuGroup () const |
return group node of menus More... | |
coVRPlugin * | addPlugin (const char *name) |
load a new plugin More... | |
coVRPlugin * | getPlugin (const char *name) |
get plugin called name More... | |
void | removePlugin (coVRPlugin *) |
remove the plugin by pointer More... | |
int | removePlugin (const char *name) |
remove a plugin by name More... | |
void | addedNode (osg::Node *node, coVRPlugin *myPlugin) |
informs other plugins that this plugin extended the scene graph More... | |
bool | removeNode (osg::Node *node, bool isGroup=false) |
remove node from the scene graph, More... | |
void | sendMessage (coVRPlugin *sender, int toWhom, int type, int len, const void *buf) |
send a message to other plugins More... | |
void | sendMessage (coVRPlugin *sender, const char *destination, int type, int len, const void *buf, bool localonly=false) |
send a message to a named plugins More... | |
bool | grabKeyboard (coVRPlugin *) |
grab keyboard input More... | |
void | releaseKeyboard (coVRPlugin *) |
release keyboard input, all plugins will get key events More... | |
bool | isKeyboardGrabbed () |
check if keyboard is grabbed More... | |
bool | grabViewer (coVRPlugin *) |
let plugin request control over viewer position More... | |
void | releaseViewer (coVRPlugin *) |
release control over viewer position More... | |
bool | isViewerGrabbed () const |
whether a plugins controls viewer position More... | |
void | protectScenegraph () |
forbid saving of scenegraph More... | |
double | frameTime () const |
double | frameDuration () const |
double | frameRealTime () const |
osgViewer::GraphicsWindow::MouseCursor | getCurrentCursor () const |
get the number of the active cursor shape More... | |
void | setCurrentCursor (osgViewer::GraphicsWindow::MouseCursor type) |
void | setCursorVisible (bool visible) |
make the cursor visible or invisible More... | |
osg::Node * | getIntersectedNode () const |
get node currently intersected by pointer More... | |
const osg::NodePath & | getIntersectedNodePath () const |
get path to node currently intersected by pointer More... | |
const osg::Vec3 & | getIntersectionHitPointWorld () const |
get world coordinates of intersection hit point More... | |
const osg::Vec3 & | getIntersectionHitPointWorldNormal () const |
get normal of intersection hit More... | |
osg::Matrix | updateInteractorTransform (osg::Matrix mat, bool usePointer) const |
update matrix of an interactor, honouring snapping, ... More... | |
INTERNAL INTERNAL vrui::coToolboxMenu * | getToolBar (bool create=false) |
void | setToolBar (vrui::coToolboxMenu *tb) |
void | setFrameTime (double ft) |
use only during coVRPlugin::update() More... | |
void | setRenderStrategy (osg::Drawable *draw, bool dynamic=false) |
opencover::coVRMessageSender * | getSender () |
bool | sendGrMessage (const grmsg::coGRMsg &grmsg, int msgType=covise::COVISE_MESSAGE_UI) const |
Static Public Member Functions | |
static double | currentTime () |
Friends | |
class | OpenCOVER |
class | fasi |
class | fasi2 |
class | mopla |
class | coVRMSController |
class | coIntersection |
Provide a stable interface and a single entry point to the most import OpenCOVER functions
void opencover::coVRPluginSupport::addedNode | ( | osg::Node * | node, |
coVRPlugin * | myPlugin | ||
) |
informs other plugins that this plugin extended the scene graph
coVRPlugin * opencover::coVRPluginSupport::addPlugin | ( | const char * | name | ) |
load a new plugin
|
static |
returns the current time in seconds since Jan. 1, 1970, if possible, use frameTime() as it does not require a system call
bool opencover::coVRPluginSupport::debugLevel | ( | int | level | ) | const |
returns true if level <= debugLevel
debug levels should be used like this: 0 no output, 1 covise.config entries, coVRInit, 2 constructors, destructors, 3 all functions which are not called continously, 4, 5 all functions which are called continously
double opencover::coVRPluginSupport::frameDuration | ( | ) | const |
returns the duration of the last frame in seconds
double opencover::coVRPluginSupport::frameRealTime | ( | ) | const |
returns the time in seconds since Jan. 1, 1970 at the beginning of this frame, use this function if you can since it is faster than currentTime(),
double opencover::coVRPluginSupport::frameTime | ( | ) | const |
returns the time in seconds since Jan. 1, 1970 at the beginning of this frame, use this function if you can since it is faster than currentTime(), this is the time for which the rendering should be correct, might differ from system time
int opencover::coVRPluginSupport::getActiveClippingPlane | ( | ) | const |
return number of clipping plane user is possibly interacting with
|
inline |
transformation matrix from object coordinates to world coordinates
multiplied matrices from scene node to objects root node
|
inline |
return pointer to a clipping plane
osgViewer::GraphicsWindow::MouseCursor opencover::coVRPluginSupport::getCurrentCursor | ( | ) | const |
get the number of the active cursor shape
osg::Node * opencover::coVRPluginSupport::getIntersectedNode | ( | ) | const |
get node currently intersected by pointer
const osg::NodePath & opencover::coVRPluginSupport::getIntersectedNodePath | ( | ) | const |
get path to node currently intersected by pointer
const osg::Vec3 & opencover::coVRPluginSupport::getIntersectionHitPointWorld | ( | ) | const |
get world coordinates of intersection hit point
const osg::Vec3 & opencover::coVRPluginSupport::getIntersectionHitPointWorldNormal | ( | ) | const |
get normal of intersection hit
const osg::Matrix & opencover::coVRPluginSupport::getInvBaseMat | ( | ) | const |
transformation from world coordinates to object coordinates
use this cached value instead of inverting getBaseMat() yourself
vrui::coMenu * opencover::coVRPluginSupport::getMenu | ( | ) |
returns the COVER Menu (Pinboard)
osg::Group * opencover::coVRPluginSupport::getMenuGroup | ( | ) | const |
return group node of menus
coPointerButton * opencover::coVRPluginSupport::getMouseButton | ( | ) | const |
returns a pointer to a coPointerButton object representing the mouse buttons state
const osg::Matrix & opencover::coVRPluginSupport::getMouseMat | ( | ) | const |
get matrix of current 2D mouse matrix (the same as getPointerMat for MOUSE tracking)
INTERNAL int opencover::coVRPluginSupport::getNumClipPlanes | ( | ) |
return the number of clipPlanes reserved for the kernel, others are available to VRML ClippingPlane Node
osg::ClipNode * opencover::coVRPluginSupport::getObjectsRoot | ( | ) | const |
get the group node for all COVISE and model geometry
osg::MatrixTransform * opencover::coVRPluginSupport::getObjectsScale | ( | ) | const |
get the MatrixTransform for objects scaling
osg::MatrixTransform * opencover::coVRPluginSupport::getObjectsXform | ( | ) | const |
get the MatrixTransform for objects translation and rotation
coVRPlugin * opencover::coVRPluginSupport::getPlugin | ( | const char * | name | ) |
get plugin called name
osg::MatrixTransform * opencover::coVRPluginSupport::getPointer | ( | ) | const |
get the MatrixTransform node of the hand
coPointerButton * opencover::coVRPluginSupport::getPointerButton | ( | ) | const |
returns a pointer to a coPointerButton object for the main button device
const osg::Matrix & opencover::coVRPluginSupport::getPointerMat | ( | ) | const |
get matrix of hand transform (same as getPointer()->getMatrix())
coPointerButton * opencover::coVRPluginSupport::getRelativeButton | ( | ) | const |
returns a pointer to a coPointerButton object representing the buttons state on the relative input device
const osg::Matrix & opencover::coVRPluginSupport::getRelativeMat | ( | ) | const |
get matrix for relative input (identity if no input)
float opencover::coVRPluginSupport::getScale | ( | ) | const |
get the scale factor of the scale node
osg::Group * opencover::coVRPluginSupport::getScene | ( | ) | const |
get scene group node
float opencover::coVRPluginSupport::getSceneSize | ( | ) | const |
get the scene size defined in covise.config
opencover::coVRMessageSender * opencover::coVRPluginSupport::getSender | ( | ) |
INTERNAL INTERNAL vrui::coToolboxMenu * opencover::coVRPluginSupport::getToolBar | ( | bool | create = false | ) |
vrui::coUpdateManager * opencover::coVRPluginSupport::getUpdateManager | ( | ) | const |
const osg::Matrix & opencover::coVRPluginSupport::getViewerMat | ( | ) | const |
get the position and orientation of the user in world coordinates
const osg::Matrix & opencover::coVRPluginSupport::getXformMat | ( | ) | const |
same as getObjectsXform()->getMatrix()
bool opencover::coVRPluginSupport::grabKeyboard | ( | coVRPlugin * | ) |
grab keyboard input
other plugins will not get key event notifications, returns true if keyboard could be grabbed, returns false if keyboard is already grabbed by another plugin
bool opencover::coVRPluginSupport::grabViewer | ( | coVRPlugin * | ) |
let plugin request control over viewer position
void opencover::coVRPluginSupport::initUI | ( | ) |
bool opencover::coVRPluginSupport::isClippingOn | ( | ) | const |
returns true if clipping is on
bool opencover::coVRPluginSupport::isHighQuality | ( | ) | const |
favor high-quality rendering instead of interactivity
bool opencover::coVRPluginSupport::isKeyboardGrabbed | ( | ) |
check if keyboard is grabbed
bool opencover::coVRPluginSupport::isViewerGrabbed | ( | ) | const |
whether a plugins controls viewer position
bool opencover::coVRPluginSupport::isVRBconnected | ( | ) |
std::ostream & opencover::coVRPluginSupport::notify | ( | Notify::NotificationLevel | level, |
const char * | format, | ||
... | |||
) | const |
std::ostream & opencover::coVRPluginSupport::notify | ( | Notify::NotificationLevel | level = Notify::Info | ) | const |
void opencover::coVRPluginSupport::preparePluginUnload | ( | ) |
void opencover::coVRPluginSupport::protectScenegraph | ( | ) |
forbid saving of scenegraph
void opencover::coVRPluginSupport::releaseKeyboard | ( | coVRPlugin * | ) |
release keyboard input, all plugins will get key events
void opencover::coVRPluginSupport::releaseViewer | ( | coVRPlugin * | ) |
release control over viewer position
bool opencover::coVRPluginSupport::removeNode | ( | osg::Node * | node, |
bool | isGroup = false |
||
) |
remove node from the scene graph,
use this method when removing nodes from the scene graph in order to update OpenCOVER's internal state
int opencover::coVRPluginSupport::removePlugin | ( | const char * | name | ) |
remove a plugin by name
void opencover::coVRPluginSupport::removePlugin | ( | coVRPlugin * | ) |
remove the plugin by pointer
bool opencover::coVRPluginSupport::sendGrMessage | ( | const grmsg::coGRMsg & | grmsg, |
int | msgType = covise::COVISE_MESSAGE_UI |
||
) | const |
void opencover::coVRPluginSupport::sendMessage | ( | coVRPlugin * | sender, |
const char * | destination, | ||
int | type, | ||
int | len, | ||
const void * | buf, | ||
bool | localonly = false |
||
) |
send a message to a named plugins
void opencover::coVRPluginSupport::sendMessage | ( | coVRPlugin * | sender, |
int | toWhom, | ||
int | type, | ||
int | len, | ||
const void * | buf | ||
) |
send a message to other plugins
bool opencover::coVRPluginSupport::sendVrbMessage | ( | const covise::MessageBase * | msg | ) | const |
send a message either via COVISE connection or via tcp to VRB
void opencover::coVRPluginSupport::setActiveClippingPlane | ( | int | plane | ) |
set number of clipping plane user is possibly interacting with
void opencover::coVRPluginSupport::setCurrentCursor | ( | osgViewer::GraphicsWindow::MouseCursor | type | ) |
set cursor shape
type | number of cursor shape |
void opencover::coVRPluginSupport::setCursorVisible | ( | bool | visible | ) |
make the cursor visible or invisible
void opencover::coVRPluginSupport::setFrameTime | ( | double | ft | ) |
use only during coVRPlugin::update()
void opencover::coVRPluginSupport::setNodesIsectable | ( | osg::Node * | n, |
bool | isect | ||
) |
search geodes under node and set Visible bit in node mask
void opencover::coVRPluginSupport::setRenderStrategy | ( | osg::Drawable * | draw, |
bool | dynamic = false |
||
) |
void opencover::coVRPluginSupport::setScale | ( | float | s | ) |
set the scale matrix of the scale node
void opencover::coVRPluginSupport::setToolBar | ( | vrui::coToolboxMenu * | tb | ) |
void opencover::coVRPluginSupport::setXformMat | ( | const osg::Matrix & | mat | ) |
same as getObjectsXform()->setMatrix()
void opencover::coVRPluginSupport::unwatchFileDescriptor | ( | int | fd | ) |
remove fd from filedescriptors to watch
osg::Matrix opencover::coVRPluginSupport::updateInteractorTransform | ( | osg::Matrix | mat, |
bool | usePointer | ||
) | const |
update matrix of an interactor, honouring snapping, ...
void opencover::coVRPluginSupport::watchFileDescriptor | ( | int | fd | ) |
register filedescriptor fd for watching so that scene will be re-rendererd when it is ready
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |