Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

amire::component::Visible3DComponent Class Reference

Inheritance diagram for amire::component::Visible3DComponent:

amire::component::Component amire::component::Position3DPickingHandler amire::component::DirectionPointerPickingHandler amire::component::Handler amire::component::ActionHandler amire::component::ActionHandler amire::component::Handler amire::component::Handler List of all members.

Public Member Functions

virtual ~Visible3DComponent ()
virtual void configurationPropertyModified ()
virtual void reinitializeEngine (MREngine *engine)
virtual void functionalCallback (MREngine *engine)
virtual osg::ref_ptr< const
amire::property::Property
emitOutSlotProperty (int outSlotId)
virtual void receiveInSlotProperty (int inSlotId, const osg::ref_ptr< const amire::property::Property > &property)
virtual bool pickingCallback (MREngine *engine, const amire::common::Vector &point, long pickingMode, double &distance) const
virtual bool pickingCallback (MREngine *engine, const amire::common::Vector &point, const amire::common::Vector &direction, long pickingMode, double &distance) const
virtual void actionPerformed (const osg::ref_ptr< Action > &action)
virtual osg::ref_ptr< const
amire::common::BoundingVolume
getBoundingVolume () const
const amire::common::MatrixgetOutTransformation ()

Protected Member Functions

 Visible3DComponent (ComponentManager *componentManager)
void initConfigurationProperty ()
void updateOutTransformation ()

Protected Attributes

bool visible
amire::common::Matrix offset
amire::common::Matrix inTransformation
amire::common::Matrix outTransformation
int visibleInSlotId
int transformationInSlotId
int visibleOutSlotId
int transformationOutSlotId

Detailed Description

The Visible3DComponent class have to be the base class for a 3D component, if the authoring tools should be able to handle it. It provides several base conventions and functionalities for 3D components. Several in- and out-slots are supported by this base class. 1) The visible in-slot sets the visible attribute and is relayed to the visible out-slot 2) The transformation in-slot provides the tranformation between the camera coordinate system and the 3D component coordinate system. The inTransformation attribute represents this information. The outTransformation attribute is emitted on the transformation out-slot. It consists of the in transformation and an offset that can be configured for each 3D component. To ensure that all required configuration settings are available for this 3D component, the configuration property type have to be derived from "common.Visible3DConfig", which contains the offset setting. Changes on the outTransformation will be overwritten by the updateOutTransformation method. To change the relative opffset, the offset attribute itself has to be used. Afterward, the method updateOutTransformation has to be called.


Constructor & Destructor Documentation

virtual amire::component::Visible3DComponent::~Visible3DComponent  )  [virtual]
 

amire::component::Visible3DComponent::Visible3DComponent ComponentManager componentManager  )  [protected]
 


Member Function Documentation

virtual void amire::component::Visible3DComponent::actionPerformed const osg::ref_ptr< Action > &  action  )  [virtual]
 

Is called by the MREngine to forward an action to handler, which has been accepted as the receiver of this action. Nevertheless, it is not guaranted that this handler is the only receiver (more than one receiver may be possible).

Implements amire::component::ActionHandler.

virtual void amire::component::Visible3DComponent::configurationPropertyModified  )  [virtual]
 

The configurationPropertyModified method is an abstract method that must be implemented by the component implementation class. It is called each time when the configuration property is released, which implies the possibility of a modified configuration property.

Implements amire::component::Component.

virtual osg::ref_ptr<const amire::property::Property> amire::component::Visible3DComponent::emitOutSlotProperty int  outSlotId  )  [virtual]
 

The emitOutSlotProperty method must be implemented to integrate out-slots into the component implementation. It is called, when the out-slot specified by the out-slot id is emitted by the component itself or from outside the component. It must provide the property that should be produced for this emit. An assert exception should be thrown for any failure case.

Reimplemented from amire::component::Component.

virtual void amire::component::Visible3DComponent::functionalCallback MREngine engine  )  [virtual]
 

The functionalCallback method must be overwritten by the derived class and provide the functional or logical behaviour of the callback handler. A logical and functionality for example or the setting of a transformation matrix or scene graph at the MR engine for a specific component would be such a functionality. This callback should be used to integrate the functional behaviour into a component. An assert exception should be thrown in any failure case.

Reimplemented from amire::component::Component.

virtual osg::ref_ptr<const amire::common::BoundingVolume> amire::component::Visible3DComponent::getBoundingVolume  )  const [virtual]
 

This method has to return the bounding volume of this 3D component or NULL. The default implementation returns NULL. The bounding volume must represent an approximation of the volume used by the content of this 3D component. It has to be located in the 3D component coordinate system and NOT in the camera coordinate system.

const amire::common::Matrix& amire::component::Visible3DComponent::getOutTransformation  ) 
 

Returns the modelview transformation matrix of this 3D component. It represents the transformation between camera coordinate system and the 3D component coordinate system.

void amire::component::Visible3DComponent::initConfigurationProperty  )  [protected]
 

This method has to be called by the implementation class to setup the configuration property with the predefined value. the configuration property instance itself must be set before this method is called. Otherwise, an exception will be thrown.

virtual bool amire::component::Visible3DComponent::pickingCallback MREngine engine,
const amire::common::Vector point,
const amire::common::Vector direction,
long  pickingMode,
double &  distance
const [virtual]
 

This call-back method has to used accept an action for a 3D direction picking event. True has to be returned and the distance output argument has to be set to a estimation of the distance between the component and the picking device, if the event has been accepted, false otherwise.

Implements amire::component::DirectionPointerPickingHandler.

virtual bool amire::component::Visible3DComponent::pickingCallback MREngine engine,
const amire::common::Vector point,
long  pickingMode,
double &  distance
const [virtual]
 

This call-back method has to used accept an action for a 3D picking event. True has to be returned and the distance output argument has to be set to a estimation of the distance between the component and the picking device, if the event has been accepted, false otherwise.

Implements amire::component::Position3DPickingHandler.

virtual void amire::component::Visible3DComponent::receiveInSlotProperty int  inSlotId,
const osg::ref_ptr< const amire::property::Property > &  property
[virtual]
 

The receiveInSlotProperty method must be implemented to integrate in-slots into the component implementation. It is called when the component receives a property at the in-slot specified by its in-slot id. An assert exception should be thrown for any failure case.

Reimplemented from amire::component::Component.

virtual void amire::component::Visible3DComponent::reinitializeEngine MREngine engine  )  [virtual]
 

DEPRECATED: Will be renamed to to reintitialize as soon as possible!!!
The reinitializeEngine method is called by the MR engine to initialize the scene graph of the MR engine. It is called when the component manager of the MR engine has changed. The default implementation does nothing. An assert exception should be thrown in any failure case.

Reimplemented from amire::component::Component.

void amire::component::Visible3DComponent::updateOutTransformation  )  [protected]
 

This method have to be called whenever the offset attribute is changed by the implementation class itself. Because the changed offset effects the tranformation out-slot.


Member Data Documentation

amire::common::Matrix amire::component::Visible3DComponent::inTransformation [protected]
 

amire::common::Matrix amire::component::Visible3DComponent::offset [protected]
 

amire::common::Matrix amire::component::Visible3DComponent::outTransformation [protected]
 

int amire::component::Visible3DComponent::transformationInSlotId [protected]
 

int amire::component::Visible3DComponent::transformationOutSlotId [protected]
 

bool amire::component::Visible3DComponent::visible [protected]
 

int amire::component::Visible3DComponent::visibleInSlotId [protected]
 

int amire::component::Visible3DComponent::visibleOutSlotId [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue May 20 17:23:57 2003 for AMIRE-Framework by doxygen1.3