vrecko
virtual reality framework
|
#include <BaseClass.h>
Classes | |
struct | NOTIFICATION_DESCRIPTION |
Public Types | |
enum | NotificationTypes { NOTIFICATION_DELETE_CLASS = 1, NOTIFICATION_EO_REGISTERING = 2, NOTIFICATION_EO_UNREGISTERING = 4, NOTIFICATION_PROGRAM_TERMINATION = 8, NOTIFICATION_ALL = 0xFFFFFFFF } |
Public Member Functions | |
BaseClass (const char *startingSenderString) | |
The main constructor. More... | |
BaseClass (BaseClass &bc) | |
Copy constructor. Probably not really used. More... | |
virtual | ~BaseClass () |
Destructor. More... | |
virtual bool | initialize (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *parameters=NULL) |
Core initialization. More... | |
virtual bool | initializeFromString (const char *xmlString) |
Helper method that allows to initialize ability from a XML-formatted string. More... | |
virtual void | update (void) |
This method is called periodically in case this instance is registered in Scheduler. More... | |
virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * | saveXMLParameters (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *) |
Save current setting into a XML node. More... | |
bool | inputPresent (const std::string &name) |
Returns true if input pin (not request inputpin ) with given name is present. More... | |
bool | outputPresent (const std::string &name) |
Returns true if output pin (not request output pin) with given name is present. More... | |
void | addInputPin (InputPinBase *pin) |
Adds an input pin. More... | |
void | removeInputPin (InputPinBase *pin) |
Removes an input pin. More... | |
void | addOutputPin (OutputPinBase *pin) |
Adds an output pin. More... | |
void | removeOutputPin (OutputPinBase *pin) |
Removes and output pin. More... | |
void | addRequestInputPin (RequestInputPinBase *pin) |
Adds a request input pin. More... | |
void | removeRequestInputPin (RequestInputPinBase *pin) |
Removes a request input pin. More... | |
void | addRequestOutputPin (RequestOutputPinBase *pin) |
Adds a request output pin. More... | |
void | removeRequestOutputPin (RequestOutputPinBase *pin) |
Removes a request output pin. More... | |
bool | addNotification (BaseClass *receiver, unsigned long notificationTypes) |
Registers an observer that will be notified if a specific change occurs. More... | |
bool | removeNotification (BaseClass *receiver, unsigned long notificationTypes=NOTIFICATION_ALL) |
Unregisters a previously registered observer. More... | |
virtual void | processEvent (const std::string &input_name, VreckoMessage *pMessage) |
Internal method for processing the events. More... | |
virtual VreckoMessage * | processRequest (const std::string &request_input_name, VreckoMessage *pMessage) |
Internal method for processing the requests. More... | |
virtual const std::string & | getSenderString (void) |
Returns the sender (or receiver) identification string. More... | |
void | reportError (const std::string &error) |
Print error message. More... | |
void | setPriority (long int pr) |
Sets the priority. (Possible problems - read the full description for more info) More... | |
long int | getPriority (void) const |
Returns current object priority. More... | |
void | setAttribute (const std::string &attr_name, int attr_value) |
Sets an attribute value. More... | |
int | getAttribute (const std::string &attr_name) |
Returns attribute value. More... | |
int | getAttribute (const char *attr_name) |
Returns attribute value. More... | |
void | deleteAttribute (const std::string &attr_name) |
Delete an attribute. More... | |
void | setSceneFile (const std::string &sceneFileName) |
Set the name of the file this component was in (and possibly will be saved to). More... | |
const std::string & | getSceneFile () const |
Get the name of the file this component was in. More... | |
virtual void | preInitialize (void) |
OBSOLETE METHOD, kept for backwards compatibility. More... | |
virtual void | postInitialize (void) |
OBSOLETE METHOD, kept for backwards compatibility. More... | |
virtual bool | loadXMLParameters (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *) |
OBSOLETE METHOD, kept for backwards compatibility. More... | |
virtual bool | loadXMLParameters (const char *xmlString) |
OBSOLETE METHOD, kept for backwards compatibility. More... | |
InputPinBase * | getInputPin (const char *strName) |
Returns pointer to an input pin with specified name. More... | |
OutputPinBase * | getOutputPin (const char *strName) |
Returns pointer to an output pin with specified name. More... | |
RequestInputPinBase * | getRequestInputPin (const char *strName) |
Returns pointer to an request input pin with specified name. More... | |
RequestOutputPinBase * | getRequestOutputPin (const char *strName) |
Returns pointer to an input pin with specified name. More... | |
Protected Types | |
typedef std::map< std::string, int > | AttributeMap |
Attributes. More... | |
typedef std::vector < osg::ref_ptr< IOPinBase > > | PinList |
Protected Member Functions | |
bool | sendNotifications (unsigned long notificationType, void *notificationData) |
virtual int | processNotification (BaseClass *sender, unsigned long notificationType, void *notificationData) |
Process an incoming notification. More... | |
IOPinBase * | findPinInList (const char *strName, PinList *pinList) |
Internal method to find a given pin in a given list. More... | |
Protected Attributes | |
AttributeMap | attribute |
MTReadWriteLock | attributeLock |
std::string | senderString |
MTLock | notificationsLock |
std::vector < NOTIFICATION_DESCRIPTION > | notifications |
long int | priority |
const std::string * | sceneFile |
PinList | inputPinsList |
PinList | outputPinsList |
PinList | requestInputPinsList |
PinList | requestOutputPinsList |
Class BaseClass is the base class of the VRECKO. It includes functions for inputs/outputs operations and event processing. And it also includes termination flag and pointers to the World.
|
protected |
Attributes.
|
protected |
Enumerator | |
---|---|
NOTIFICATION_DELETE_CLASS |
notification will be sent on class deletion |
NOTIFICATION_EO_REGISTERING |
sent when an EO object is being registered to the Scene. !!! WARNING !!! This notification is sent when the internal EOMap is locked from updates -
|
NOTIFICATION_EO_UNREGISTERING |
sent when an EO object is unregistered from Scene !!! WARNING !!! This notification is sent when the internal EOMap is locked from updates -
|
NOTIFICATION_PROGRAM_TERMINATION |
Sent when the program will be terminated, BEFORE the actual destruction of the world/devices/object/abilities/... Sent ONLY to objects, which were registered to World. |
NOTIFICATION_ALL |
every type of notification |
BaseClass::BaseClass | ( | const char * | startingSenderString | ) |
The main constructor.
Especially in the case of abilities: The constructor should contain only the very basic initialization (setting variables to zero etc.) AND IF REALLY NECESSARY then also setting the priority AND adding the ability to the scheduler and setting the update frequency. (The reason for setting these two things is the user can also specify them in the XML file to overwrite default setting. This will be processed after the constructor, but before the initialize().)
The main initialization should be made in the initialize() method. The reason is that in the constructor, the Ability doesn't know who will be its owner and what will be its ID.
startingSenderString | (const char *) |
BaseClass::BaseClass | ( | BaseClass & | bc | ) |
|
virtual |
Destructor.
This has to be virtual - see for example http://blogs.msdn.com/b/oldnewthing/archive/2004/05/07/127826.aspx .
void BaseClass::addInputPin | ( | InputPinBase * | pin | ) |
Adds an input pin.
Usually not used directly, but using the INIT_INPUT macro in IOPins.h .
It still may be useful to use it directly at times, but usually for highly dynamic abilities, which need to register and unregister plenty of different pins at runtime.
The usual declaration/definition/initialization on an input pit comprises of using macros DECLARE_INPUT, INIT_INPUT and METHOD_INPUT. The usage is described in manual in more detail. See this page: http://decibel.fi.muni.cz/wiki/index.php/VRECKO_Zpravy
pin | (InputPinBase *) |
bool BaseClass::addNotification | ( | BaseClass * | receiver, |
unsigned long | notificationTypes | ||
) |
Registers an observer that will be notified if a specific change occurs.
Note: Due to the locking mechanism used, this is ok to use in multi-threading environment.
receiver | (BaseClass *) Pointer to the object that will be notified - its processNotification() method will be called. |
notificationTypes | (unsigned long) Any combination of bitvalues defined in the NotificationTypes enum (combine them using bitwise OR, i.e. operator | ). |
void BaseClass::addOutputPin | ( | OutputPinBase * | pin | ) |
Adds an output pin.
Usually not used directly, but using the INIT_OUTPUT macro in IOPins.h .
For more information see addInputPin().
pin | (OutputPinBase *) |
void BaseClass::addRequestInputPin | ( | RequestInputPinBase * | pin | ) |
Adds a request input pin.
Usually not used directly, but using the INIT_REQUEST_INPUT macro in IOPins.h .
For more information see addInputPin().
pin | (RequestInputPinBase *) |
void BaseClass::addRequestOutputPin | ( | RequestOutputPinBase * | pin | ) |
Adds a request output pin.
Usually not used directly, but using the INIT_REQUEST_OUTPUT macro in IOPins.h .
For more information see addInputPin().
pin | (RequestOutputPinBase *) |
void BaseClass::deleteAttribute | ( | const std::string & | attr_name | ) |
Delete an attribute.
Any other subsequent calls to getAttribute() will return 0.
attr_name | (const std::string &) |
|
inlineprotected |
Internal method to find a given pin in a given list.
strName | (const char *) Pin name. |
pinList | (PinList *) List to be searched. |
|
inline |
Returns attribute value.
If you specify a non-existing attribute, 0 will be returned.
attr_name | (const std::string &) |
|
inline |
Returns attribute value.
If you specify a non-existing attribute, 0 will be returned.
attr_name | (const char *) |
InputPinBase * BaseClass::getInputPin | ( | const char * | strName | ) |
Returns pointer to an input pin with specified name.
strName | (const char *) Pin name. |
OutputPinBase * BaseClass::getOutputPin | ( | const char * | strName | ) |
Returns pointer to an output pin with specified name.
strName | (const char *) Pin name. |
|
inline |
Returns current object priority.
For more information about priority and its usage see setPriority().
RequestInputPinBase * BaseClass::getRequestInputPin | ( | const char * | strName | ) |
Returns pointer to an request input pin with specified name.
strName | (const char *) Pin name. |
RequestOutputPinBase * BaseClass::getRequestOutputPin | ( | const char * | strName | ) |
Returns pointer to an input pin with specified name.
strName | (const char *) Pin name. |
|
inline |
Get the name of the file this component was in.
The method may return NULL.
|
inlinevirtual |
Returns the sender (or receiver) identification string.
Reimplemented in vrecko::Ability.
|
virtual |
Core initialization.
It is important to place the initializing code here, because especially in the case of Abilities, this is the point when the ID and owner is known and we can react accordingly. (This information is unknown in the constructor.)
You will probably want to override this method. This method supersedes the original preInitialize() / loadXMLParameters() / postInitialize() methods, which are now obsolete, but for the sake of compatibility they are called from the initialize() if the method is not overridden. You can override it and forget about pre/postInitialize() or loadParameters() - it's now an old solution.
parameters | (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *) Pointer to a XML DOM node, might be NULL if no parameters were specified. The ability should initialize to default values in that case. |
Reimplemented in vrecko::ControllableAbility, AP_CableEditor::CableEditor, APLightsEditor::Editor, APNature::TerrainAbility, ht::ScreenSetup, APGUI::GUI_Controller, APShootingSimulation::ShootingSimulation, ht::ScreenSetupSimple, APGUI::Icon, APCameraPath::Camera, APGUI::Slider, vrecko::EnvironmentObject, ode::DynamicScene, APInputConnector::InputConnector, APRoomEdit::RoomEditor, APGUI::IconColour, APGUI::Menu, vreckoDP_base::Wiimote, APDYNAMICART::ToolEraser, APDYNAMICART::ToolTongs, APGUI::ColorPicker, APDYNAMICART::ToolSelector, APDYNAMICART::ToolMagicWand, APDYNAMICART::ToolHook, APDYNAMICART::ToolRotation, APDYNAMICART::ToolSlice, APEditorController::EditorController, APEditorQAbilities::ObjectMovement, ht::HeadTracking, APEditorQAbilities::AbilityEditor, APHelloWorld::MyAbility, and APWeather::Weather.
|
virtual |
Helper method that allows to initialize ability from a XML-formatted string.
This method takes string, converts it to XML nodes and passes the result to the "real" initialize() method.
xmlString | (const char *) The string formatted like this: "<Parameters>...</Parameters>" |
bool BaseClass::inputPresent | ( | const std::string & | name | ) |
Returns true if input pin (not request inputpin ) with given name is present.
Return vector with description of all inputs for the object. Return type of the input. Return vector with description of all outputs for the object. Return type of the output.
name | (const std::string &) Pin name |
|
inlinevirtual |
OBSOLETE METHOD, kept for backwards compatibility.
The preInitialize(), loadXMLParameters() and postInitialize() methods were replaced in 2011 by a single method initialize().
* | (XERCES_CPP_NAMESPACE_QUALIFIER DOMNode) |
Reimplemented in APMenu::DynamicMenu, APSpacePartitioning::PointShell_Object_Data, vrecko::World, APDYNAMICART::Ctrl_FreeHandPainting, APDYNAMICART::DAEnvironment, APLightsEditor::Lights, APDYNAMICART::Ctrl_MotionVisualization, ArtificialWorld::BlockUpdater, APCameraPath::Camera, vreckoDP_base::LHeadTracker, APRoomEdit::WallGeometry, APCameraMovement::CameraPath, APObjectUtils::ObjectEffect, APObjectUtils::KeepOnScreen, vreckoDP_base::NestOfBirds, APHUD::HUDDisplay, Cache, APObjectUtils::Animator, PhysXPlugin::PhysXScene, APDYNAMICART::Ctrl_PerlinLines, APClouds::Clouds, CarSim::CarExecutionUnit, vreckoDP_base::VRPN3DMouse, APTextOutput::Console, grass::Grass, APConstrainedMovement::ConstraintDescription, AP_LSystem::LSObject, APConnectEditor::ConnectEditor, base::SystemInfo, vreckoDP_base::OptiTrack, CarSim::RoadsState, vreckoDP_base::L3DMouse, boids::Boid, boids::BoidsLogic, vreckoDP_Kinect::Kinect, PhysXPlugin::BasePhysXObject, PhysXPlugin::Cloth, boids::BoidsPlanner, VirtualFixture::Trace, navigation::AvatarInHand, PhysXPlugin::BaseActor, VirtualFixture::ProxiBorder, BehindObstacleExp_wT, BehindObstacleExperiment, base::Avatar, APConnectEditor::Cut, base::ShowFDH, CarSim::CarControlUnit, APObjectUtils::CopyProperties, VirtualFixture::ProxiBox, VirtualFixture::ProxiCone, VirtualFixture::ProxiCylinder, VirtualFixture::ProxiSphere, behindO::WIM, APObjectUtils::ConnectionViz, APObjectUtils::ObjectModif, APObjectUtils::ObjectSelector, APSpacePartitioning::VoxelGrid_Object_Data, PhysXPlugin::BaseJoint, VirtualFixture::Avatar, behindO::HeadManipulator, APObjectUtils::ObjectEffectMan, PhysXPlugin::RemoteDebugger, behindO::HMDHeadManipulator, APFFDEditor::EditorLogic, VirtualFixture::Log, base::Rotate, ChessBoard, PhysXPlugin::Box, PhysXPlugin::Capsule, PhysXPlugin::CylindricalJoint, PhysXPlugin::Fluid, PhysXPlugin::Plane, PhysXPlugin::PointInPlaneJoint, PhysXPlugin::PointOnLineJoint, PhysXPlugin::PrismaticJoint, PhysXPlugin::Sphere, PhysXPlugin::SphericalJoint, PHEffect, PhysXPlugin::DistanceJoint, PhysXPlugin::FixedJoint, PhysXPlugin::PulleyJoint, PhysXPlugin::RevoluteJoint, PHANToMAvatar, base::Light, ArtificialWorld::WorldBuilder, APConnectEditor::Rotation, navigation::KMTracker, ode::Cube, Filter::Linear, ChessPiece, ode::CompositeObject, ode::Sphere, PhysXPlugin::ForceField, ode::CappedCylinder, and Filter::PosNoiseRemover.
|
virtual |
OBSOLETE METHOD, kept for backwards compatibility.
The preInitialize(), loadXMLParameters() and postInitialize() methods were replaced in 2011 by a single method initialize().
xmlString | (const char *) |
bool BaseClass::outputPresent | ( | const std::string & | name | ) |
Returns true if output pin (not request output pin) with given name is present.
name | (const std::string &) Pin name |
|
inlinevirtual |
OBSOLETE METHOD, kept for backwards compatibility.
The preInitialize(), loadXMLParameters() and postInitialize() methods were replaced in 2011 by a single method initialize().
Reimplemented in APMenu::DynamicMenu, APLightsEditor::Lights, APDYNAMICART::Ctrl_FreeHandPainting, APDYNAMICART::Controller, AP_CableEditor::Cable, APDYNAMICART::Ctrl_MotionVisualization, APDYNAMICART::DAEnvironment, ArtificialWorld::BlockUpdater, APRoomEdit::WallGeometry, APDYNAMICART::Ctrl_PerlinLines, APObjectUtils::ObjectEffect, APCameraMovement::CameraPath, APDYNAMICART::PLControllerTool, APHUD::HUDDisplay, PhysXPlugin::PhysXScene, APDYNAMICART::PLMagnetTool, APTextOutput::Console, APClouds::Clouds, AP_LSystem::LSObject, grass::Grass, base::SystemInfo, vrecko::PyAbility, PhysXPlugin::PhysXObject, vreckoDP_base::OptiTrack, PhysXPlugin::BaseActor, boids::BoidsLogic, boids::Boid, PhysXPlugin::BasePhysXObject, boids::BoidsPlanner, VirtualFixture::ProxiBorder, base::Avatar, APDYNAMICART::JuliaAttractor, APObjectUtils::ConnectionViz, BehindObstacleExp_wT, BehindObstacleExperiment, APDYNAMICART::PLNestTool, behindO::WIM, APObjectUtils::ObjectModif, APObjectUtils::ObjectSelector, VirtualFixture::ProxiBox, VirtualFixture::ProxiCone, VirtualFixture::ProxiCylinder, VirtualFixture::ProxiSphere, VirtualFixture::Trace, ArtificialWorld::WorldBuilder, APObjectUtils::ObjectEffectMan, APSpacePartitioning::VoxelGrid_Object_Data, PhysXPlugin::RemoteDebugger, VirtualFixture::Avatar, APFFDEditor::EditorLogic, navigation::AvatarInHand, PhysXPlugin::UpdatablePhysXObject, VirtualFixture::Log, PHEffect, PHANToMAvatar, behindO::CentreObjectManipulator, behindO::MappingFunctions, navigation::KMTracker, ode::Cube, base::Light, ode::CompositeObject, ode::Sphere, and ode::CappedCylinder.
|
inlinevirtual |
OBSOLETE METHOD, kept for backwards compatibility.
The preInitialize(), loadXMLParameters() and postInitialize() methods were replaced in 2011 by a single method initialize().
Reimplemented in APMenu::DynamicMenu, APLightsEditor::Lights, APDYNAMICART::Ctrl_FreeHandPainting, APDYNAMICART::Controller, AP_CableEditor::Cable, APDYNAMICART::Ctrl_MotionVisualization, APDYNAMICART::DAEnvironment, ArtificialWorld::BlockUpdater, behindO::Mirror, APRoomEdit::WallGeometry, APObjectUtils::KeepOnScreen, APObjectUtils::ObjectEffect, APCameraMovement::CameraPath, APHUD::HUDDisplay, APObjectUtils::Animator, PhysXPlugin::PhysXScene, APSpacePartitioning::SNCH_Object, CarSim::CarExecutionUnit, APTextOutput::Console, CarSim::TLsOnJuncManager, APClouds::Clouds, base::MTMatrixTransform, base::SystemInfo, vrecko::PyAbility, AP_LSystem::LSObject, vreckoDP_base::OptiTrack, CarSim::RoadsState, boids::BoidsLogic, APSpacePartitioning::NoPartitioning_Scene, base::MouseHand, boids::Boid, PhysXPlugin::BasePhysXObject, boids::BoidsPlanner, PhysXPlugin::PhysXObject, APSpacePartitioning::SphereBVH_Scene, VirtualFixture::ProxiBorder, base::Avatar, CarSim::CarControlUnit, APObjectUtils::ConnectionViz, APSpacePartitioning::SphereBVH_Object, behindO::AvatarManipulator, BehindObstacleExp_wT, BehindObstacleExperiment, behindO::EyeManipulator, behindO::Manipulator, APSpacePartitioning::PointShellVSVoxel_Object, base::hand, VirtualFixture::ProxiBox, VirtualFixture::ProxiCone, VirtualFixture::ProxiCylinder, VirtualFixture::ProxiSphere, VirtualFixture::Trace, behindO::HeadManipulator, APObjectUtils::ObjectModif, APObjectUtils::ObjectSelector, APSpacePartitioning::VoxelGrid_Object_Data, VirtualFixture::Avatar, behindO::HMDHeadManipulator, APObjectUtils::ObjectEffectMan, APObjectUtils::ObjectInfo, base::Light, base::Rotate, VirtualFixture::Log, PHEffect, CarSim::Remover, ChessPiece, APSpacePartitioning::SP_Object_Data_Base, PHANToMAvatar, Filter::Linear, navigation::KMTracker, and Filter::PosNoiseRemover.
|
virtual |
Internal method for processing the events.
After the message reimplementation, this is a method, which redistributes the events into your methods attached to the respective inputs. There is usually now no need to override this method or interact with it in any way. You can usually easily define your inputs via the DECLARE_INPUT and INIT_INPUT macros and declare handling method using the METHOD_INPUT macro.
Internally, this method is used to process all the messages and find the appropriate handling method defined by the METHOD_INPUT.
input_name | (const std::string &) Name of the input pin |
pMessage | (VreckoMessage *) Pointer to the message. This will be automatically cast to the correct message type, if you are using the DECLARE_INPUT (etc.) macros. |
Reimplemented in APInputConnector::InputConnector, navigation::AvatarInHand, and navigation::KMTracker.
|
inlineprotectedvirtual |
Process an incoming notification.
Override this method to react to a registered notification (see addNotification() method).
sender | (BaseClass *) The sender of the notification |
notificationType | (unsigned long) Type of the notification, only ONE bit will be set |
notificationData | (void *) Appropriate notification data, dependent on the notificationType. |
Reimplemented in vrecko::ControllableAbility, APMenu::MenuItem, vrecko::Scene::EOIteratorHelper, AP_CableEditor::CableEditor, APEditorController::EditorController, AP_CableEditor::Cable, APSpacePartitioning::SphereBVH_Object_Data, and APObjectUtils::ObjectEffectMan.
|
virtual |
Internal method for processing the requests.
After the message reimplementation, this is a method, which redistributes the requests into your methods attached to the respective request inputs. There is now no need to override this method or interact with it in any way. You can usually easily define your inputs via the DECLARE_REQUEST_INPUT and INIT_REQUEST_INPUT macros and declare handling method using the METHOD_REQUEST_INPUT macro.
Internally, this method is used to process all the requests and find the appropriate handling method defined by the METHOD_REQUEST_INPUT.
request_input_name | (const std::string &) Request input name |
pMessage | (VreckoMessage *) Message sent to the input |
void BaseClass::removeInputPin | ( | InputPinBase * | pin | ) |
Removes an input pin.
Usually not used directly, but using the UNINIT_INPUT macro in IOPins.h .
For more information see addInputPin().
pin | (InputPinBase *) |
bool BaseClass::removeNotification | ( | BaseClass * | receiver, |
unsigned long | notificationTypes = NOTIFICATION_ALL |
||
) |
Unregisters a previously registered observer.
Note: Due to the locking mechanism used, this is ok to use in multi-threading environment.
Only specified notifications will be unregistered. You can specify the ALL_NOTIFICATIONS constant to unregister everything.
MUTLITHREADING note: Since we are using locks, it is guaranteed that after this method returns there is no "pending" notification and no other notifications will arise.
receiver | (BaseClass *) Registered object that is receiving notifications. |
notificationTypes | (unsigned long) Any combination of bitvalues defined in the NotificationTypes enum (combine them using bitwise OR, i.e. operator | ). |
void BaseClass::removeOutputPin | ( | OutputPinBase * | pin | ) |
Removes and output pin.
Usually not used directly, but using the UNINIT_OUTPUT macro in IOPins.h .
For more information see addInputPin().
pin | (OutputPinBase *) |
void BaseClass::removeRequestInputPin | ( | RequestInputPinBase * | pin | ) |
Removes a request input pin.
Usually not used directly, but using the UNINIT_REQUEST_INPUT macro in IOPins.h .
For more information see addInputPin().
pin | (RequestInputPinBase *) |
void BaseClass::removeRequestOutputPin | ( | RequestOutputPinBase * | pin | ) |
Removes a request output pin.
Usually not used directly, but using the UNINIT_REQUEST_OUTPUT macro in IOPins.h .
For more information see addInputPin().
pin | (RequestOutputPinBase *) |
void BaseClass::reportError | ( | const std::string & | error | ) |
Print error message.
This method is not really used, but might be good for inspiration in the future (attaches own identification to a given error message).
error | (const std::string &) |
|
inlinevirtual |
Save current setting into a XML node.
* | (XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument) |
Reimplemented in APDYNAMICART::DAEnvironment, vreckoDP_base::LHeadTracker, vreckoDP_base::NestOfBirds, APClouds::Clouds, grass::Grass, vreckoDP_base::OptiTrack, vreckoDP_base::L3DMouse, vreckoDP_base::Wiimote, boids::Boid, boids::BoidsLogic, boids::BoidsPlanner, navigation::AvatarInHand, BehindObstacleExp_wT, BehindObstacleExperiment, base::Avatar, base::ShowFDH, behindO::WIM, behindO::HeadManipulator, behindO::HMDHeadManipulator, base::Rotate, navigation::KMTracker, ode::Cube, Filter::Linear, ode::CompositeObject, ode::Sphere, ode::CappedCylinder, and Filter::PosNoiseRemover.
|
protected |
Send notifications to all BaseClasses, which are registered to receive the selected notification type (only ONE type at a time, i.e. the notificationType have to have only ONE bit set).
|
inline |
Sets an attribute value.
This method either sets value for a new attribute or replace value of an old attribute.
attr_name | (const std::string &) Attribute name. |
attr_value | (int) New value. |
|
inline |
Sets the priority. (Possible problems - read the full description for more info)
The priority is used if the update() method is called periodically (i.e. every frame). The objects with highest priority will be called first.
If not set explicitly, the default priority of an object is 0.
Once the object is registered in Scheduler, the priority is used to insert sort the object between the "competing" ones. Any later change of priority is allowed and the object will be correctly re-sorted in Scheduler (happens usually in the next frame).
pr | (long int) The new priority, can be negative meaning simply lower-than-default priority. The default is 0. |
void BaseClass::setSceneFile | ( | const std::string & | sceneFileName | ) |
Set the name of the file this component was in (and possibly will be saved to).
You can specify an empty string meaning "no file".
sceneFileName | (const std::string &) |
|
inlinevirtual |
This method is called periodically in case this instance is registered in Scheduler.
The method is called periodically at specified frequency or every frame. Use the Scheduler::addEntity() method to register your class and set the frequency.
Reimplemented in APMenu::DynamicMenu, AP_CableEditor::Cable, vrecko::EventDispatcher, vrecko::Scene, APDYNAMICART::Controller, vrecko::ControllableAbility, APDYNAMICART::DAEnvironment, APDYNAMICART::PoA, APDYNAMICART::Ctrl_MotionVisualization, APDYNAMICART::Ctrl_FreeHandPainting, ArtificialWorld::BlockUpdater, behindO::Mirror, APGUI::GUI_Controller, APDYNAMICART::BrushStroke, vreckoDP_base::LHeadTracker, vreckoDP_base::fsPinchGlove, APCameraMovement::CameraPath, APObjectUtils::ObjectEffect, APNature::TerrainAbility, APDYNAMICART::PoB, APObjectUtils::KeepOnScreen, APDYNAMICART::PLControllerTool, APGUI::Slider, vreckoDP_base::Ultratrak, APHUD::HUDDisplay, vreckoDP_base::NestOfBirds, APInputConnector::InputConnector, APObjectUtils::Animator, PhysXPlugin::PhysXScene, Cache, APShootingSimulation::ShootingSimulation, APLightsEditor::Editor, vrecko::Device, ode::DynamicScene, APClouds::Clouds, APCameraPath::Camera, APDYNAMICART::Ctrl_PerlinLines, APDYNAMICART::PLMagnetTool, CarSim::CarExecutionUnit, APDYNAMICART::ToolBrush, vreckoDP_base::VRPN3DMouse, APDYNAMICART::OrdinaryAttractor, APTextOutput::Console, AP_CableEditor::CableEditor, APDYNAMICART::Ctrl_StringSculptures, APGUI::ColorPicker, vreckoDP_base::KeyboardMouse, CarSim::TLsOnJuncManager, APRoomEdit::RoomEditor, base::SystemInfo, APDYNAMICART::Ctrl_PolyhedraSculptures, APDYNAMICART::ToolTongs, APDYNAMICART::Attractor, base::MTMatrixTransform, APDYNAMICART::PerlinLines, grass::Grass, vreckoDP_base::fdtDataGlove, vreckoDP_base::OptiTrack, boids::BoidsLogic, CarSim::RoadsState, APDYNAMICART::Ctrl_Attractor, APDYNAMICART::PolyhedraSculpture, vrecko::PyAbility, APDYNAMICART::Hoop, vreckoDP_base::L3DMouse, boids::BoidsPlanner, vreckoDP_base::Wiimote, vreckoDP_Kinect::Kinect, boids::Boid, APDYNAMICART::HookObject, APDYNAMICART::ToolMagicWand, APSpacePartitioning::NoPartitioning_Scene, APDYNAMICART::PLNestTool, APDYNAMICART::ToolSelector, navigation::AvatarInHand, base::MouseHand, APCameraMovement::CameraMovementEditor, APDYNAMICART::JuliaAttractor, BehindObstacleExp_wT, BehindObstacleExperiment, APConstrainedMovement::ConstrainedObjectMovement, APDYNAMICART::ToolHook, APObjectUtils::CopyProperties, vreckoDP_base::MicroScribe3D, VirtualFixture::ProxiBorder, base::Avatar, APObjectUtils::ConnectionViz, APObjectUtils::ObjectModif, APObjectUtils::ObjectSelector, base::Display, APEditorController::EditorController, APObjectUtils::ObjectEffectMan, CarSim::CarControlUnit, APDYNAMICART::ToolRotation, APEditorQAbilities::ObjectMovement, behindO::AvatarManipulator, behindO::EyeManipulator, behindO::Manipulator, behindO::WIM, VirtualFixture::ProxiBox, VirtualFixture::ProxiCone, VirtualFixture::ProxiCylinder, VirtualFixture::ProxiSphere, VirtualFixture::Trace, base::ShowFDH, base::ShowFDHModel, navigation::KMTracker, APSpacePartitioning::VoxelGrid_Object_Data, VirtualFixture::Avatar, behindO::HeadManipulator, ht::HeadTracking, behindO::CuttingPlane, behindO::HMDHeadManipulator, APConnectEditor::Cut, APObjectUtils::ObjectInfo, VirtualFixture::Log, base::hand, base::Rotate, behindO::ChangeOfVisibility, CarSim::Remover, PHEffect, behindO::CentreObjectManipulator, behindO::MappingFunctions, APEditorQAbilities::AvatarMovement, APEditorQAbilities::SimpleObjectMovement, APFFDEditor::EditorLogic, PHANToMAvatar, APConnectEditor::Rotation, APConnectEditor::Scale, ChessBoard, ode::Cube, APSpacePartitioning::SP_Object_Data_Base, base::Light, ArtificialWorld::WorldBuilder, APHelloWorld::MyAbility, ode::CompositeObject, ode::Sphere, ChessPiece, ode::CappedCylinder, behindO::ContactObjectManipulator, and behindO::Lens.
|
protected |
|
protected |
|
protected |
List of all input pins for this object... we know that all of them are of type InputPinBase, but the ancestor class is used, so the same methods can be used to manipulate with similar lists.
|
protected |
Array with all the notifications.
|
protected |
Lock to protect access to the notifications vector.
|
protected |
List of all input pins for this object... we know that all of them are of type OutputPinBase, but the ancestor class is used, so the same methods can be used to manipulate with similar lists.
|
protected |
Priority.
The default priority is 0, but can be changed (even to a negative number).
See setPriority() for more information.
|
protected |
List of all input pins for this object... we know that all of them are of type RequestInputPinBase, but the ancestor class is used, so the same methods can be used to manipulate with similar lists.
|
protected |
List of all input pins for this object... we know that all of them are of type RequestOutputPinBase, but the ancestor class is used, so the same methods can be used to manipulate with similar lists.
|
protected |
Name of the scene file this component was in (and will be saved to). This will be a pointer to the shared memory pool, so don't deallocate it. (variable pointer to a const string)
|
protected |
Pre-constructed sender string to be returned by the getSenderString() method.