Developer Documentation
|
The skeletal animation plugin is used to interact with the skeleton. More...
#include <Plugin-SkeletalAnimation/SkeletalAnimationPlugin.hh>
Public Slots | |
void | slotAllCleared () |
clear all occurred More... | |
void | slotObjectUpdated (int _id, const UpdateType &_type) |
Check activePose if a skeleton was updated. | |
void | slotObjectSelectionChanged (int _id) |
Update ui when the object selection changes. More... | |
void | fileOpened (int _id) |
Update ui when the object is loaded. More... | |
void | addedEmptyObject (int _id) |
Update ui when the object is added. More... | |
void | objectDeleted (int _id) |
Update ui when the object is deleted. More... | |
void | UpdateUI () |
Called when the active object changes and the interface needs to be updated. | |
void | setComboBoxPosition (unsigned int _animationIndex) |
Sets the animations combo box to the right entry. | |
void | checkObjectSelection (const int _objectId) |
Check source/target selection of objects. More... | |
void | slotAnimationNameChanged () |
Scripting interface | |
Use these methods in the script editor. | |
int | getNumberOfFrames () |
Returns the number of frames in the currently active animation. | |
bool | attachSkin (int skeletonId, int skinId) |
Returns the number of frames in the currently active animation. | |
bool | detachSkin (int skeletonId, int skinId) |
Returns the number of frames in the currently active animation. | |
bool | clearSkins (int skeletonId) |
Returns the number of frames in the currently active animation. | |
void | setFrame (int _iFrame) |
Displays the given frame from the current animation and updates the view. | |
int | getFrame () |
Gets the current frame number. | |
void | changeFPS (int _fps) |
Change the frames per second (FPS) | |
void | playAnimation () |
Called by the ui and starts an automatic animation. | |
void | pauseAnimation () |
Called by the ui and stops the current animation. | |
void | stopAnimation () |
Called by the ui and stops the current animation. | |
void | nextFrame () |
Called by the ui and goes to next frame of the current animation. | |
void | prevFrame () |
Called by the ui and goes to previous frame of the current animation. | |
void | updateSkins () |
Returns the number of frames in the currently active animation. | |
Signals | |
void | updateView () |
void | log (Logtype _type, QString _message) |
void | log (QString _message) |
void | addEmptyObject (DataType _type, int &_id) |
void | updatedObject (int _id, const UpdateType &_type) |
void | pluginExists (QString _pluginName, bool &_exists) |
void | functionExists (QString _pluginName, QString _functionName, bool &_exists) |
void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon) |
Signals inherited from BaseInterface | |
virtual void | updateView () |
Update current view in Main Application. More... | |
virtual void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
Set a description for a public slot. More... | |
virtual void | setRenderer (unsigned int _viewer, QString _rendererName) |
Set a renderer for the given viewer. More... | |
Signals inherited from ToolboxInterface | |
virtual void | addToolbox (QString _name, QWidget *_widget) |
Add a toolbox widget to the gui with the given name. More... | |
Signals inherited from LoggingInterface | |
virtual void | log (Logtype _type, QString _message)=0 |
virtual void | log (QString _message)=0 |
Signals inherited from LoadSaveInterface | |
virtual void | save (int _id, QString _filename) |
Save object to a file. More... | |
virtual void | load (QString _filename, DataType _type, int &_id) |
Load object from file with a specific DataType. More... | |
Signals inherited from RPCInterface | |
virtual void | pluginExists (QString _pluginName, bool &_exists) |
Public Member Functions | |
SkeletalAnimationPlugin () | |
Constructor. More... | |
QString | name () |
returns the plugin name More... | |
QString | description () |
returns a plugin description More... | |
Protected Member Functions | |
AnimationHandle | currentAnimationHandle () |
Returns a handle describing the current frame in the active animation. More... | |
void | UpdateSkins (BaseObjectData *_pSkeletonObject, AnimationHandle &_hAni) |
Changes the mesh's pose to represent the frame given by the animation handle. More... | |
Protected Attributes | |
AnimationToolboxWidget * | pToolbox_ |
A pointer to the toolbox widget. | |
QIcon * | toolIcon_ |
Private Types | |
typedef PoseT< Skeleton::Point > | Pose |
Pose typedef. | |
Private Slots | |
void | setDescriptions () |
void | initializePlugin () |
initialize the plugin More... | |
void | pluginsInitialized () |
final initializations More... | |
void | exit () |
Plugin gets closed. More... | |
void | slotAttachSkin () |
Called by Qt as the user is trying to connect a mesh to a skeleton. | |
void | slotClearSkins () |
Called by Qt as the user is trying to unbind a mesh from as a skeleton. | |
void | slotMethodChanged (int _index) |
Called as the skin deformation method changed. More... | |
void | slotAnimationIndexChanged (int) |
Called by the framework when the animation index changed. | |
void | slotFrameChanged (int) |
Called by the framework when a different frame was selected. | |
void | slotSkipFramesChanged (int _state) |
Called as the skip frames check box changes state. More... | |
void | slotAddAnimation () |
void | slotDeleteAnimation () |
void | animate () |
Iterates the animation. More... | |
Private Slots inherited from BaseInterface | |
virtual void | exit () |
virtual QString | version () |
Return a version string for your plugin. More... | |
Private Member Functions | |
Skin management | |
void | attachSkin (BaseObjectData *pSkin, BaseObjectData *pSkeleton) |
void | detachSkin (BaseObjectData *pSkin, BaseObjectData *pSkeleton) |
void | clearSkins (BaseObjectData *_pSkeleton) |
Private Member Functions inherited from BaseInterface | |
virtual void | noguiSupported () |
virtual | ~BaseInterface () |
Destructor. | |
virtual void | blockScenegraphUpdates (bool _block) |
Tell the core to prevent scenegraph updates. More... | |
virtual void | updatedObject (int _objectId) |
An object has been changed or added by this plugin. More... | |
virtual void | updatedObject (int _identifier, const UpdateType &_type) |
An object has been changed or added by this plugin. More... | |
virtual void | nodeVisibilityChanged (int _identifier) |
A scenegraph node has been shown or hidden. More... | |
virtual void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName) |
Get the current renderer for the given viewer. More... | |
Private Member Functions inherited from ToolboxInterface | |
virtual | ~ToolboxInterface () |
Destructor. | |
virtual void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon) |
Add a toolbox widget to the gui with the given name and an icon. More... | |
virtual void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget) |
Add a toolbox widget to the gui with the given name, icon and header area widget. More... | |
Private Member Functions inherited from LoggingInterface | |
virtual | ~LoggingInterface () |
Destructor. | |
Private Member Functions inherited from LoadSaveInterface | |
virtual | ~LoadSaveInterface () |
Destructor. | |
virtual void | addEmptyObject (DataType _type, int &_id) |
virtual void | copyObject (int _oldId, int &_newId) |
virtual void | emptyObjectAdded (int _id) |
DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More... | |
virtual void | deleteObject (int _id) |
Delete an object This signal can be called from any thread. . More... | |
virtual void | deleteAllObjects () |
Delete all Objects. More... | |
virtual void | getAllFileFilters (QStringList &_filters) |
Get all file filters that are registered. More... | |
Private Member Functions inherited from RPCInterface | |
virtual | ~RPCInterface () |
Destructor. | |
virtual void | functionExists (QString _pluginName, QString _functionName, bool &_exists) |
Private Attributes | |
BaseSkin::Method | method_ |
The current blending method for the skin. | |
bool | bGuiUpdating_ |
Used to drop a few messages while the gui is being updated. | |
QTimer | animationTimer_ |
Timer used to control animations. | |
QTime | animationTime_ |
Time since the animation was started, used to meet the given fps. | |
int | animationOffset_ |
This frame was selected as the animation was started. | |
std::vector< int > | activeSkeletons_ |
The skeletal animation plugin is used to interact with the skeleton.
this plugin controls the playback of skeletal animations
Definition at line 72 of file SkeletalAnimationPlugin.hh.
SkeletalAnimationPlugin::SkeletalAnimationPlugin | ( | ) |
Constructor.
Definition at line 66 of file SkeletalAnimationPlugin.cc.
|
slot |
Update ui when the object is added.
Definition at line 193 of file SkeletalAnimationPlugin.cc.
|
privateslot |
Iterates the animation.
If frame skipping is disabled, the next frame will be drawn. Otherwise, the next frame is determined by the time that passed since the last call.
Definition at line 595 of file SkeletalAnimationPlugin.cc.
|
slot |
Check source/target selection of objects.
Definition at line 238 of file SkeletalAnimationPlugin.cc.
|
protected |
Returns a handle describing the current frame in the active animation.
This information is derived from the corresponding combo box and slider.
Definition at line 1042 of file SkeletalAnimationPlugin.cc.
|
virtual |
returns a plugin description
Implements BaseInterface.
Definition at line 89 of file SkeletalAnimationPlugin.cc.
|
privateslot |
Plugin gets closed.
Definition at line 153 of file SkeletalAnimationPlugin.cc.
|
slot |
Update ui when the object is loaded.
Definition at line 184 of file SkeletalAnimationPlugin.cc.
|
privateslot |
initialize the plugin
Definition at line 99 of file SkeletalAnimationPlugin.cc.
|
virtual |
returns the plugin name
Implements BaseInterface.
Definition at line 79 of file SkeletalAnimationPlugin.cc.
|
slot |
Update ui when the object is deleted.
Definition at line 203 of file SkeletalAnimationPlugin.cc.
|
privateslot |
final initializations
Definition at line 143 of file SkeletalAnimationPlugin.cc.
|
slot |
clear all occurred
Definition at line 162 of file SkeletalAnimationPlugin.cc.
|
privateslot |
Called as the skin deformation method changed.
The spherical skin blending appears to be buggy, so it is recommended not to use it.
Definition at line 642 of file SkeletalAnimationPlugin.cc.
|
slot |
Update ui when the object selection changes.
Definition at line 174 of file SkeletalAnimationPlugin.cc.
|
privateslot |
Called as the skip frames check box changes state.
To prevent the animation playback from jumping, the animation timer is restarted here.
Definition at line 623 of file SkeletalAnimationPlugin.cc.
|
protected |
Changes the mesh's pose to represent the frame given by the animation handle.
_skeletonObject | The object holding the skeleton, it is holding the pointer to the skin object |
_hAni | A handle of the new animation/pose |
Definition at line 376 of file SkeletalAnimationPlugin.cc.