Developer Documentation

Public Member Functions | Protected Member Functions | Friends | List of all members
SkeletonObject Class Reference

`#include <Type-Skeleton/ObjectTypes/Skeleton/SkeletonObject.hh>`

Inheritance diagram for SkeletonObject:

## Public Member Functions
| SkeletonObject ()
| Constructor. More...
| SkeletonObject (const SkeletonObject &_other)
| Copy Constructor.
virtual | ~SkeletonObject ()
| Destructor. More...
virtual void | cleanup ()
| Reset current object, including all related nodes. More...
virtual BaseObject * | copy ()
| Returns a full copy of the object.
AnimationHandle | activePose ()
void | setActivePose (const AnimationHandle &_hAni)
| Call this to set the active pose. More...
void | showIndices (bool _bVisible=true)
| Shows or hides the indices. More...
bool | indicesVisible ()
void | updateIndices ()
| Updates the joint index text node positions. More...
void | updateIndices (const AnimationHandle &_hAni)
| Updates the joint index text node positions. More...
void | showMotionPath (bool _visible=true)
| Shows or hides the local motion space for a joint. More...
bool | motionPathVisible ()
void | updateMotionPath ()
| Updates the node that visualizes the local space of joint motions.
void | updateMotionPath (const AnimationHandle &_hAni)
| Updates the node that visualizes the local space of joint motions. More...
Name and Path handling
void | setName (QString _name)
| Set the name of the Object. More...
Object Information
QString | getObjectinfo ()
| Returns a string holding information on this object. More...
Picking
bool | picked (uint _node_idx)
| Returns true if the picked node given by _node_idx is this objects scenegraph node. More...
void | enablePicking (bool _enable)
| Enable or disable picking for this object.
bool | pickingEnabled ()
| Check if picking is enabled for this object.
Public Member Functions inherited from BaseObjectData
| BaseObjectData (const BaseObjectData &_object)
| copy constructor More...
| BaseObjectData ()
| constructor
virtual | ~BaseObjectData ()
| destructor
virtual ACG::Vec3d | refinePick (ACG::SceneGraph::PickTarget _pickTarget, const ACG::Vec3d _hitPoint, const ACG::Vec3d _start, const ACG::Vec3d _dir, const unsigned int _targetIdx)
| Refine picking. More...
virtual void | show ()
| Sets the whole Scenegraph subtree of this node to visible.
virtual void | hide ()
| Sets the whole Scenegraph subtree of this node to invisible.
virtual bool | visible () override
| return visiblity
virtual void | visible (bool _visible) override
| Sets visiblity of the whole Scenegraph subtree of this node.
SeparatorNode * | baseNode ()
virtual bool | hasNode (BaseNode *_node)
| Check if the given node is owned by this object. More...
virtual BaseNode * | primaryNode ()
QtTranslationManipulatorNode * | manipulatorNode ()
virtual ACG::SceneGraph::ShaderNode * | shaderNode ()
MaterialNode * | materialNode ()
| get a pointer to the materialnode
const MaterialNode * | materialNode () const
| get a const pointer to the materialnode
BoundingBoxNode * | boundingBoxNode ()
| get a pointer to the bounding box node
StencilRefNode * | stencilRefNode ()
| get a pointer to the stencil reference node
bool | manipPlaced ()
| Check if the manipulator has been placed.
void | manipPlaced (bool _placed)
| set the manipulator place status
void | getBoundingBox (ACG::Vec3d &bbmin, ACG::Vec3d &bbmax)
| get the bounding box of the object
void | setObjectDrawMode (const ACG::SceneGraph::DrawModes::DrawMode &_mode, const bool &_force=false)
| Set the draw mode for the object. More...
template<typename NodeT >
bool | addAdditionalNode (NodeT *_node, QString _pluginName, QString _nodeName, int _id=0)
| add an additional node to the object More...
bool | hasAdditionalNode (QString _pluginName, QString _nodeName, int _id=0)
| check if an object has the additional node More...
template<typename NodeT >
bool | getAdditionalNode (NodeT *&_node, QString _pluginName, QString _nodeName, int _id=0)
| get an addition node from the object More...
template<typename NodeT >
bool | removeAdditionalNode (NodeT *&_node, QString _pluginName, QString _nodeName, int _id=0)
| remove an additional node from the object More...
Public Member Functions inherited from BaseObject
| BaseObject (const BaseObject &_object)
| BaseObject (BaseObject *_parent=0)
virtual void | printObjectInfo ()
| Print all information about the object.
void | dumpTree ()
| Debugging function, writing the subtree to output.
int | row () const
| get the row of this item from the parent
BaseObject * | parent ()
| Get the parent item ( 0 if rootitem )
const BaseObject * | parent () const
| get the row of this item from the parent
void | setParent (BaseObject *_parent)
| Set the parent pointer.
BaseObject * | childExists (int _objectId)
| Check if the element exists in the subtree of this element.
BaseObject * | childExists (QString _name)
| Check if the element exists in the subtree of this element.
void | appendChild (BaseObject *child)
| add a child to this node
BaseObject * | child (int row)
| return a child
int | childCount () const
| get the number of children
void | removeChild (BaseObject *_item)
| Remove a child from this object.
QList< BaseObject *> | getLeafs ()
| get all leafes of the tree below this object ( These will be all visible objects )
void | deleteSubtree ()
| delete the whole subtree below this item ( The item itself is not touched )
int | group () const
bool | isGroup () const
| Check if object is a group.
bool | isInGroup (int _id) const
bool | isInGroup (QString _name) const
std::vector< int > | getGroupIds ()
QStringList | getGroupNames ()
void | setObjectData (QString _dataName, PerObjectData *_data)
void | clearObjectData (QString _dataName)
| Clear the object data pointer ( this will not delete the object!! )
bool | hasObjectData (QString _dataName)
| Checks if object data with given name is available.
PerObjectData * | objectData (QString _dataName)
| Returns the object data pointer.
void | deleteData ()
| Delete all data attached to this object ( calls delete on each object )
int | id () const
int | persistentId () const
void | persistentId (int _id)
bool | dataType (DataType _type) const
DataType | dataType () const
void | setDataType (DataType _type)
bool | target ()
void | target (bool _target)
bool | source ()
void | source (bool _source)
bool | flag (QString _flag)
void | setFlag (QString _flag, bool _set)
QStringList | flags ()
BaseObject * | last ()
BaseObject * | next ()
int | level ()
void | setFromFileName (const QString &_filename)
QString | path () const
| return the path to the object ( defaults to "." if unset )
void | setPath (const QString &_path)
| set the path to the object.
QString | name () const
| return the name of the object. The name defaults to NONAME if unset.
QString | filename () const
| return the filename of the object
void | setFileName (const QString &_filename)
| set the filename for this object
QMap< QString, PerObjectData * > & | getPerObjectDataMap ()
| get reference to map of all perObject Datas More...
QString & | getCommentByKey (const QString &key)
| Get comment for the specified key. More...
const QString | getCommentByKey (const QString &key) const
| Get comment for the specified key. More...
bool | hasCommentForKey (const QString &key) const
bool | hasComments () const
void | clearComment (const QString &key)
| Get comment for the specified key. More...
void | clearAllComments ()
| Get comment for the specified key. More...
const QMap< QString, QString > & | getAllComments () const
const QString | getAllCommentsFlat () const

## Protected Member Functions
virtual void | init ()
| Initialize current object, including all related nodes. More...
void | init (Skeleton *_pSkeleton)
Update handling
This is mostly private. Updates have to be triggered via emit updatedObject()
void | update (UpdateType _type=UPDATE_ALL)
| This function is called to update the object. More...
Update handling
Update handling

## Friends
class | TypeSkeletonPlugin

## Content
Skeleton * | skeleton_
| A pointer to the skeleton data.
Skeleton * | skeleton ()
| Returns a pointer to the skeleton. More...

## Visualization
ACG::SceneGraph::SkeletonNodeT< Skeleton > * | skeletonNode_
| A pointer to the scenegraph node.
ACG::SceneGraph::SkeletonNodeT< Skeleton > * | skeletonNode ()
| Returns the skeleton scenegraph node.

## Additional Inherited Members
Signals inherited from BaseObject
void | objectSelectionChanged (int _objectId)
void | visibilityChanged (int _objectId)
void | objectPropertiesChanged (int _objectId)
Static Public Attributes inherited from BaseObject
static int | NOOBJECT = -1
Protected Attributes inherited from BaseObject
bool | visible_

## Detailed Description

This class provides the functionality for all kind of meshes for the framework

Definition at line 72 of file SkeletonObject.hh.

## Constructor & Destructor Documentation

## ◆ SkeletonObject()

SkeletonObject::SkeletonObject | ( |  | ) |

Constructor.

Constructor for Skeleton Objects. This object class gets a Separator Node giving the root node to which it should be connected. The skeleton is generated internally and all nodes for visualization will be added below the scenegraph node.
You dont need to create an object of this type manually. Use PluginFunctions::addSkeleton instead. ( see Types.hh::DataType )

Definition at line 76 of file SkeletonObject.cc.

## ◆ ~SkeletonObject()

SkeletonObject::~SkeletonObject | ( |  | ) |
| virtual

Destructor.

Destructor for PolyLine Objects. The destructor deletes the Line and all Scenegraph nodes associated with the Line or the object.

Definition at line 100 of file SkeletonObject.cc.

## Member Function Documentation

## ◆ cleanup()

void SkeletonObject::cleanup | ( | void |  | ) |
| virtual

Reset current object, including all related nodes.

Cleanup Function for Line Objects. Deletes the contents of the whole object and calls SkeletonObject::init afterwards.

Reimplemented from BaseObjectData.

Definition at line 126 of file SkeletonObject.cc.

## ◆ getObjectinfo()

QString SkeletonObject::getObjectinfo | ( |  | ) |
| virtual

Returns a string holding information on this object.

Returns a string containing all information about the current object. This also includes the information provided by BaseObjectData::getObjectinfo

Returns
  String containing the object information

Reimplemented from BaseObject.

Definition at line 228 of file SkeletonObject.cc.

## ◆ init()

void SkeletonObject::init | ( | void |  | ) |
| protected virtual

Initialize current object, including all related nodes.

This function initalizes the line object. It creates the scenegraph nodes, the line.

Definition at line 150 of file SkeletonObject.cc.

## ◆ picked()

bool SkeletonObject::picked | ( | uint | _node_idx | ) |
| virtual

Returns true if the picked node given by _node_idx is this objects scenegraph node.

Given an node index from PluginFunctions::scenegraph_pick this function can be used to check if the skeletonNode of the object has been picked.

Parameters

  _node_idx | Index of the picked skeleton node

Returns
  bool if the skeletonNode of this object is the picking target.

Reimplemented from BaseObjectData.

Definition at line 253 of file SkeletonObject.cc.

## ◆ setActivePose()

void SkeletonObject::setActivePose | ( | const AnimationHandle & | _hAni | ) |

Call this to set the active pose.

This method notifies the skeleton node about the change. Call this method, do not call the SkeletonNodeT::setActivePose method directly.

Parameters

  _hAni | The new pose; both animation and frame index are used

Definition at line 285 of file SkeletonObject.cc.

## ◆ setName()

void SkeletonObject::setName | ( | QString | _name | ) |
| virtual

Set the name of the Object.

Set the name of an object. All Scenegraph nodes are renamed too. It also calls BaseObjectData::setName.

Reimplemented from BaseObjectData.

Definition at line 193 of file SkeletonObject.cc.

## ◆ showIndices()

void SkeletonObject::showIndices | ( | bool | _bVisible = `true` | ) |

Shows or hides the indices.

The first call will also create the indices. After the first call, the material nodes visibility is changed.

Parameters

  _bVisible | true if the indices are to be visible, false otherwise

Definition at line 369 of file SkeletonObject.cc.

## ◆ showMotionPath()

void SkeletonObject::showMotionPath | ( | bool | _visible = `true` | ) |

Shows or hides the local motion space for a joint.

The first call will also create the corresponding nodes

Parameters

  _visible | true if the motion space is to be visible, false otherwise

Definition at line 560 of file SkeletonObject.cc.

## ◆ skeleton()

Skeleton * SkeletonObject::skeleton | ( |  | ) |

Returns a pointer to the skeleton.

Get a pointer to the objects line.

Returns
  Pointer to the line

Definition at line 207 of file SkeletonObject.cc.

## ◆ update()

void SkeletonObject::update | ( | UpdateType | _type = `UPDATE_ALL` | ) |
| protected virtual

This function is called to update the object.

If the object changes, the core will call this function. This function triggers an vbo update in the plane node.

Note
  Do not call this function yourself to avoid unnecessary overhead(the core will call it when it is required)

Reimplemented from BaseObjectData.

Definition at line 698 of file SkeletonObject.cc.

## ◆ updateIndices() [1/2]

void SkeletonObject::updateIndices | ( |  | ) |

Updates the joint index text node positions.

Reads the current animation and frame from the skeleton node.

Definition at line 300 of file SkeletonObject.cc.

## ◆ updateIndices() [2/2]

void SkeletonObject::updateIndices | ( | const AnimationHandle & | _hAni | ) |

Updates the joint index text node positions.

Does not add missing indices. Call SkeletonObject::showIndices in that case.

Parameters

  _hAni | A handle to the active animation and frame

Definition at line 314 of file SkeletonObject.cc.

## ◆ updateMotionPath()

void SkeletonObject::updateMotionPath | ( | const AnimationHandle & | _hAni | ) |

Updates the node that visualizes the local space of joint motions.

Does not update the motion space itself. Only moves it to the current local frame. Call SkeletonObject::showMotionPath if the motion space should be updated

Parameters

  _hAni | A handle to the active animation and frame

Definition at line 503 of file SkeletonObject.cc.

The documentation for this class was generated from the following files:

- Type-Skeleton/ObjectTypes/Skeleton/SkeletonObject.hh
- Type-Skeleton/ObjectTypes/Skeleton/SkeletonObject.cc