OMK::Inp::BoundingBoxExtension Class Reference
[User inputs]

Input listener to control the bounding boxes around objects. More...

#include <OMKBoundingBoxExtension.h>

Inheritance diagram for OMK::Inp::BoundingBoxExtension:

Inheritance graph
[legend]
Collaboration diagram for OMK::Inp::BoundingBoxExtension:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

void action ()
 The overwritten method.

Private Member Functions

 DECLARE_EXTENSION_FACTORY (BoundingBoxExtension)
 Factory and constructor/destructor.

Detailed Description

Input listener to control the bounding boxes around objects.

Date:
2007-03-14
Author:
Benoît Chanclou
Defines a extension which toggles the display of the bounding boxes around objects of a visualisation object.

This extension must be used as an extension of the OgreVis object. The creation is done dynamically through the following configuration:

visualisation
{
  Class OgreVis
  ...
  Extensions
  {
    boundingBox
    {
      Class BoundingBox
      Key f3 // the default is "B"
      VisuName visualisation // the default is "visualisation" needed to create the key listener
    }
    ...
  }
}
 *

There is two ways to toggle the display of the bounding boxes.

Definition at line 51 of file OMKBoundingBoxExtension.h.


Member Function Documentation

OMK::Inp::BoundingBoxExtension::DECLARE_EXTENSION_FACTORY ( BoundingBoxExtension   )  [private]

Factory and constructor/destructor.

See Extension feature

void BoundingBoxExtension::action (  )  [protected, virtual]

The overwritten method.

This method toggles the display of the bouding boxes.

Reimplemented from OMK::Inp::GenericKeyExtension< OMK::Vis::OgreVis >.

Definition at line 23 of file OMKBoundingBoxExtension.cpp.

References OMK::ExtensionT< OMK::Vis::OgreVis >::_owner, and OMK::Vis::OgreVis::getRoot().

00024 {
00025   Ogre::SceneManager *sceneManager = _owner->getRoot().getSceneManager( "sceneManager" );
00026   sceneManager->showBoundingBoxes( !sceneManager->getShowBoundingBoxes() );
00027 }


logo OpenMask

Documentation generated on Mon Jun 9 11:46:04 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007