Each visual object or animator is dynamically created through events. There are two ways for creation, the first way is by sending the events. The second one is by describing the visual objets and animators in the parameters of the configuration file. When the file is read, the corresponding events are sent to create the new visual objects or animator.
Class a
name, the id of the class which is registered in the factory of visual objects. ObjectName a
string, the name of the visual object. It will be used to identify the object, to add an animator for example. OgreVis a
string, the name of the visualisation which will be the owner of the visual object. This is an optional parameter. If it is empty, all the current visualisations will create their own visual object and will add it to their objects list. If a visualisation name is specified, only this one will create the visual object. It is the same for events, it can be sent to a specific visualisation or fired as a signal to all.Class a
name, the id of the class which is registered in the factory of animators. VisualObjectName a
string, the name of the visual object which the animator will be associated to. OgreVis a
string, the name of the visualisation which is the owner of the visual object. This is an optional parameter. It is the same use of the visual objects creation.The parameters for the plugs are the followings:
ConnectTo an
array of two strings, the first is the name of the simulated object and the second is the name of its input.ListenedEvent a
string, the name of the event to listen, if this parameter is not found the listened event will have the same id as the animator. Emitter a
string, the name of the event emitter, if the parameter or the emitter is not found, listen any object.animator2
is commented because there is no output to connected with the input of the animator plug and in this situation the simulation cannot run. #OpenMASK3 root { Class Controller Sons { visuOgre // The visualisation name { Class OgreVis // The visualisation class Scheduling { Frequency 25 } UserParams { VisualObject // The list of visual objects { visualObject1 // The name of the visual object { Class OgreObject // Class id must be registered, see DECLARE_VISUAL_OBJECT_FACTORY Animator // The list of animators, implicitly the owner of these animators is the current visual object { animator1 // The name of the animator { Class TransformAnimator // Class id must be registered, see DECLARE_ANIMATOR_FACTORY ListenedEvent theFirstEvent // To create a plug which listens "theFirstEvent" } //animator2 // cannot be implemented because "theOutput" doesn't exist //{ // Class TransformAnimator // Class id // ConnectTo[theObject theOutput] // To create a plug which is connected to the output of an object //} } } } Animator // The list of animators { animator3 { Class TransformAnimator // Class id VisualObjectName visualObject1 // This animator will be added in the "visualObject1" list of animators ListenedEvent theSecondEvent // To create a plug which listens "theSecondEvent" } } } } myObject // An other object name { Class MyObject Scheduling { Frequency 25 } UserParams { VisualObject // The list of visual objects { visualObject2 // The name of the visual object { Class OgreObject // Class id must be registered VisName visuOgre } } } } } }
Documentation generated on Mon Jun 9 11:45:59 2008 |
Generated with doxygen by Dimitri van Heesch , 1997-2007 |