|
| IMovableItemCallback (void) |
| Default constructor. More...
|
|
virtual | ~IMovableItemCallback (void) |
| Destructor. More...
|
|
virtual void | AddBodyClicked (float fltPosX, float fltPosY, float fltPosZ, float fltNormX, float fltNormY, float fltNormZ)=0 |
| Called to signal to the GUI that a part was clicked while AddBody mode was active. More...
|
|
virtual void | PositionChanged ()=0 |
| Called to signal to the GUI that the position of the body part changed. More...
|
|
virtual void | RotationChanged ()=0 |
| Called to signal to the GUI that the rotation of the body part changed. More...
|
|
virtual void | SelectedVertexChanged (float fltPosX, float fltPosY, float fltPosZ)=0 |
| Called to signal when the selected vertex has changed. More...
|
|
virtual void | SelectionChanged (bool bSelected, bool bSelectMultiple)=0 |
| Called to signal to the GUI that the selected body part changed. More...
|
|
virtual void | SizeChanged ()=0 |
| Called to signal to the GUI that the size of the body part changed. More...
|
|
Movable Item callback to the GUI.
How the Movable Item callback works: I have this interface defined within AnimatSim. It contains NO references to any managed code, so it is still STL compliant and is not used if we are running stand-alone without a gui. If we are running a gui then when the simulation is created each object creates a managed ManagedAnimatTools.DataObjectInterface class that is used to send data down from the managed GUI to the unmanaged sim. If the part it is talking to is a MovableItem or a structure then it also creates a new unmanaged ManagedAnimatTools::MovableItemCallback class that implements the IMovableItemCallback interface. It contains a gcroot pointer to its associated DataObjectInterface and callback methods for PositionChanged, RotationChanged, and SelectionChanged. When the user clicks on an object in the sim window it is picked and the Select method is called. That method checks to see if the pointer to the IMovableItemCallback is not null. If it is not then it calls the SelectionChanged method, which calls that method on the DataObjectInterface, which fires the SelectionChangedEvent of that MovableItem. However, there was a wrinkle in that any UI class has to be able to handle multi-threaded operations. Initially the treecontrol from DotNetMagic could not do that. I added code in the SelectNode to check if an Invoke was required. if it was then it did a begininvoke to re-fire the method using the UI thread.
- Author
- dcofer
- Date
- 2/25/2011
Definition at line 26 of file IMovableItemCallback.h.