OpenCOVER
Public Member Functions | Static Public Member Functions | Friends | List of all members
opencover::coVRPluginSupport Class Reference

#include <cover/coVRPluginSupport.h>

Inheritance diagram for opencover::coVRPluginSupport:
Inheritance graph
[legend]
Collaboration diagram for opencover::coVRPluginSupport:
Collaboration graph
[legend]

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::coUpdateManagergetUpdateManager () 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...
 
coPointerButtongetPointerButton () const
 returns a pointer to a coPointerButton object for the main button device More...
 
coPointerButtongetMouseButton () const
 returns a pointer to a coPointerButton object representing the mouse buttons state More...
 
coPointerButtongetRelativeButton () const
 returns a pointer to a coPointerButton object representing the buttons state on the relative input device More...
 
vrui::coMenugetMenu ()
 returns the COVER Menu (Pinboard) More...
 
osg::Group * getMenuGroup () const
 return group node of menus More...
 
coVRPluginaddPlugin (const char *name)
 load a new plugin More...
 
coVRPlugingetPlugin (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::coToolboxMenugetToolBar (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::coVRMessageSendergetSender ()
 
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
 

Detailed Description

Provide a stable interface and a single entry point to the most import OpenCOVER functions

Member Function Documentation

◆ addedNode()

void opencover::coVRPluginSupport::addedNode ( osg::Node *  node,
coVRPlugin myPlugin 
)

informs other plugins that this plugin extended the scene graph

◆ addPlugin()

coVRPlugin * opencover::coVRPluginSupport::addPlugin ( const char *  name)

load a new plugin

◆ currentTime()

static double opencover::coVRPluginSupport::currentTime ( )
static

returns the current time in seconds since Jan. 1, 1970, if possible, use frameTime() as it does not require a system call

Returns
number of seconds since Jan. 1, 1970

◆ debugLevel()

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

◆ frameDuration()

double opencover::coVRPluginSupport::frameDuration ( ) const

returns the duration of the last frame in seconds

Returns
render time of the last frame in seconds

◆ frameRealTime()

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(),

◆ frameTime()

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

Returns
number of seconds since Jan. 1, 1970 at the beginning of this frame

◆ getActiveClippingPlane()

int opencover::coVRPluginSupport::getActiveClippingPlane ( ) const

return number of clipping plane user is possibly interacting with

◆ getBaseMat()

const osg::Matrix & opencover::coVRPluginSupport::getBaseMat ( ) const
inline

transformation matrix from object coordinates to world coordinates

multiplied matrices from scene node to objects root node

◆ getClipPlane()

osg::ClipPlane * opencover::coVRPluginSupport::getClipPlane ( int  num)
inline

return pointer to a clipping plane

◆ getCurrentCursor()

osgViewer::GraphicsWindow::MouseCursor opencover::coVRPluginSupport::getCurrentCursor ( ) const

get the number of the active cursor shape

◆ getIntersectedNode()

osg::Node * opencover::coVRPluginSupport::getIntersectedNode ( ) const

get node currently intersected by pointer

◆ getIntersectedNodePath()

const osg::NodePath & opencover::coVRPluginSupport::getIntersectedNodePath ( ) const

get path to node currently intersected by pointer

◆ getIntersectionHitPointWorld()

const osg::Vec3 & opencover::coVRPluginSupport::getIntersectionHitPointWorld ( ) const

get world coordinates of intersection hit point

◆ getIntersectionHitPointWorldNormal()

const osg::Vec3 & opencover::coVRPluginSupport::getIntersectionHitPointWorldNormal ( ) const

get normal of intersection hit

◆ getInvBaseMat()

const osg::Matrix & opencover::coVRPluginSupport::getInvBaseMat ( ) const

transformation from world coordinates to object coordinates

use this cached value instead of inverting getBaseMat() yourself

◆ getMenu()

vrui::coMenu * opencover::coVRPluginSupport::getMenu ( )

returns the COVER Menu (Pinboard)

◆ getMenuGroup()

osg::Group * opencover::coVRPluginSupport::getMenuGroup ( ) const

return group node of menus

◆ getMouseButton()

coPointerButton * opencover::coVRPluginSupport::getMouseButton ( ) const

returns a pointer to a coPointerButton object representing the mouse buttons state

◆ getMouseMat()

const osg::Matrix & opencover::coVRPluginSupport::getMouseMat ( ) const

get matrix of current 2D mouse matrix (the same as getPointerMat for MOUSE tracking)

◆ getNumClipPlanes()

INTERNAL int opencover::coVRPluginSupport::getNumClipPlanes ( )

return the number of clipPlanes reserved for the kernel, others are available to VRML ClippingPlane Node

◆ getObjectsRoot()

osg::ClipNode * opencover::coVRPluginSupport::getObjectsRoot ( ) const

get the group node for all COVISE and model geometry

◆ getObjectsScale()

osg::MatrixTransform * opencover::coVRPluginSupport::getObjectsScale ( ) const

get the MatrixTransform for objects scaling

◆ getObjectsXform()

osg::MatrixTransform * opencover::coVRPluginSupport::getObjectsXform ( ) const

get the MatrixTransform for objects translation and rotation

◆ getPlugin()

coVRPlugin * opencover::coVRPluginSupport::getPlugin ( const char *  name)

get plugin called name

◆ getPointer()

osg::MatrixTransform * opencover::coVRPluginSupport::getPointer ( ) const

get the MatrixTransform node of the hand

◆ getPointerButton()

coPointerButton * opencover::coVRPluginSupport::getPointerButton ( ) const

returns a pointer to a coPointerButton object for the main button device

◆ getPointerMat()

const osg::Matrix & opencover::coVRPluginSupport::getPointerMat ( ) const

get matrix of hand transform (same as getPointer()->getMatrix())

◆ getRelativeButton()

coPointerButton * opencover::coVRPluginSupport::getRelativeButton ( ) const

returns a pointer to a coPointerButton object representing the buttons state on the relative input device

◆ getRelativeMat()

const osg::Matrix & opencover::coVRPluginSupport::getRelativeMat ( ) const

get matrix for relative input (identity if no input)

◆ getScale()

float opencover::coVRPluginSupport::getScale ( ) const

get the scale factor of the scale node

◆ getScene()

osg::Group * opencover::coVRPluginSupport::getScene ( ) const

get scene group node

◆ getSceneSize()

float opencover::coVRPluginSupport::getSceneSize ( ) const

get the scene size defined in covise.config

◆ getSender()

opencover::coVRMessageSender * opencover::coVRPluginSupport::getSender ( )

◆ getToolBar()

INTERNAL INTERNAL vrui::coToolboxMenu * opencover::coVRPluginSupport::getToolBar ( bool  create = false)

◆ getUpdateManager()

vrui::coUpdateManager * opencover::coVRPluginSupport::getUpdateManager ( ) const

◆ getViewerMat()

const osg::Matrix & opencover::coVRPluginSupport::getViewerMat ( ) const

get the position and orientation of the user in world coordinates

◆ getXformMat()

const osg::Matrix & opencover::coVRPluginSupport::getXformMat ( ) const

same as getObjectsXform()->getMatrix()

◆ grabKeyboard()

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

◆ grabViewer()

bool opencover::coVRPluginSupport::grabViewer ( coVRPlugin )

let plugin request control over viewer position

◆ initUI()

void opencover::coVRPluginSupport::initUI ( )

◆ isClippingOn()

bool opencover::coVRPluginSupport::isClippingOn ( ) const

returns true if clipping is on

◆ isHighQuality()

bool opencover::coVRPluginSupport::isHighQuality ( ) const

favor high-quality rendering instead of interactivity

◆ isKeyboardGrabbed()

bool opencover::coVRPluginSupport::isKeyboardGrabbed ( )

check if keyboard is grabbed

◆ isViewerGrabbed()

bool opencover::coVRPluginSupport::isViewerGrabbed ( ) const

whether a plugins controls viewer position

◆ isVRBconnected()

bool opencover::coVRPluginSupport::isVRBconnected ( )

◆ notify() [1/2]

std::ostream & opencover::coVRPluginSupport::notify ( Notify::NotificationLevel  level,
const char *  format,
  ... 
) const

◆ notify() [2/2]

std::ostream & opencover::coVRPluginSupport::notify ( Notify::NotificationLevel  level = Notify::Info) const

◆ preparePluginUnload()

void opencover::coVRPluginSupport::preparePluginUnload ( )

◆ protectScenegraph()

void opencover::coVRPluginSupport::protectScenegraph ( )

forbid saving of scenegraph

◆ releaseKeyboard()

void opencover::coVRPluginSupport::releaseKeyboard ( coVRPlugin )

release keyboard input, all plugins will get key events

◆ releaseViewer()

void opencover::coVRPluginSupport::releaseViewer ( coVRPlugin )

release control over viewer position

◆ removeNode()

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

Returns
if a node was removed

◆ removePlugin() [1/2]

int opencover::coVRPluginSupport::removePlugin ( const char *  name)

remove a plugin by name

◆ removePlugin() [2/2]

void opencover::coVRPluginSupport::removePlugin ( coVRPlugin )

remove the plugin by pointer

◆ sendGrMessage()

bool opencover::coVRPluginSupport::sendGrMessage ( const grmsg::coGRMsg &  grmsg,
int  msgType = covise::COVISE_MESSAGE_UI 
) const

◆ sendMessage() [1/2]

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

◆ sendMessage() [2/2]

void opencover::coVRPluginSupport::sendMessage ( coVRPlugin sender,
int  toWhom,
int  type,
int  len,
const void *  buf 
)

send a message to other plugins

◆ sendVrbMessage()

bool opencover::coVRPluginSupport::sendVrbMessage ( const covise::MessageBase *  msg) const

send a message either via COVISE connection or via tcp to VRB

◆ setActiveClippingPlane()

void opencover::coVRPluginSupport::setActiveClippingPlane ( int  plane)

set number of clipping plane user is possibly interacting with

◆ setCurrentCursor()

void opencover::coVRPluginSupport::setCurrentCursor ( osgViewer::GraphicsWindow::MouseCursor  type)

set cursor shape

Parameters
typenumber of cursor shape

◆ setCursorVisible()

void opencover::coVRPluginSupport::setCursorVisible ( bool  visible)

make the cursor visible or invisible

◆ setFrameTime()

void opencover::coVRPluginSupport::setFrameTime ( double  ft)

use only during coVRPlugin::update()

◆ setNodesIsectable()

void opencover::coVRPluginSupport::setNodesIsectable ( osg::Node *  n,
bool  isect 
)

search geodes under node and set Visible bit in node mask

◆ setRenderStrategy()

void opencover::coVRPluginSupport::setRenderStrategy ( osg::Drawable *  draw,
bool  dynamic = false 
)

◆ setScale()

void opencover::coVRPluginSupport::setScale ( float  s)

set the scale matrix of the scale node

◆ setToolBar()

void opencover::coVRPluginSupport::setToolBar ( vrui::coToolboxMenu tb)

◆ setXformMat()

void opencover::coVRPluginSupport::setXformMat ( const osg::Matrix &  mat)

same as getObjectsXform()->setMatrix()

◆ unwatchFileDescriptor()

void opencover::coVRPluginSupport::unwatchFileDescriptor ( int  fd)

remove fd from filedescriptors to watch

◆ updateInteractorTransform()

osg::Matrix opencover::coVRPluginSupport::updateInteractorTransform ( osg::Matrix  mat,
bool  usePointer 
) const

update matrix of an interactor, honouring snapping, ...

◆ watchFileDescriptor()

void opencover::coVRPluginSupport::watchFileDescriptor ( int  fd)

register filedescriptor fd for watching so that scene will be re-rendererd when it is ready

Friends And Related Function Documentation

◆ coIntersection

friend class coIntersection
friend

◆ coVRMSController

friend class coVRMSController
friend

◆ fasi

friend class fasi
friend

◆ fasi2

friend class fasi2
friend

◆ mopla

friend class mopla
friend

◆ OpenCOVER

friend class OpenCOVER
friend

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