Developer Documentation
SkeletonObject.hh
Go to the documentation of this file.
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4  * Copyright (c) 2001-2015, RWTH-Aachen University *
5  * Department of Computer Graphics and Multimedia *
6  * All rights reserved. *
7  * www.openflipper.org *
8  * *
9  *---------------------------------------------------------------------------*
10  * This file is part of OpenFlipper. *
11  *---------------------------------------------------------------------------*
12  * *
13  * Redistribution and use in source and binary forms, with or without *
14  * modification, are permitted provided that the following conditions *
15  * are met: *
16  * *
17  * 1. Redistributions of source code must retain the above copyright notice, *
18  * this list of conditions and the following disclaimer. *
19  * *
20  * 2. Redistributions in binary form must reproduce the above copyright *
21  * notice, this list of conditions and the following disclaimer in the *
22  * documentation and/or other materials provided with the distribution. *
23  * *
24  * 3. Neither the name of the copyright holder nor the names of its *
25  * contributors may be used to endorse or promote products derived from *
26  * this software without specific prior written permission. *
27  * *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41 
42 //=============================================================================
43 //
44 // Types
45 //
46 //=============================================================================
47 
53 #pragma once
54 
55 
56 //== INCLUDES =================================================================
57 
58 #include "SkeletonTypes.hh"
62 
63 #include "SkeletonNodeT.hh"
64 
65 
66 //== TYPEDEFS =================================================================
67 
68 //== CLASS DEFINITION =========================================================
69 
72 class OBJECTTYPEDLLEXPORT SkeletonObject : public BaseObjectData {
73 
74  friend class TypeSkeletonPlugin;
75 
76  public:
80  SkeletonObject(const SkeletonObject &_other);
82  virtual ~SkeletonObject();
84  virtual void cleanup();
85 
86  virtual BaseObject* copy();
87 
88  protected:
90  virtual void init();
91  void init(Skeleton* _pSkeleton);
92 
97  public:
99  void setName( QString _name );
101 
106  public:
108  Skeleton* skeleton();
109 
110  private:
114 
119  public:
122 
123  private:
127 
132  public:
134  QString getObjectinfo();
136 
141  public:
143  bool picked( uint _node_idx );
145  void enablePicking( bool _enable );
147  bool pickingEnabled();
149 
150  AnimationHandle activePose();
151  void setActivePose(const AnimationHandle &_hAni);
152 
153  void showIndices(bool _bVisible = true);
154  bool indicesVisible();
155 
156  void updateIndices();
157  void updateIndices(const AnimationHandle &_hAni);
158 
159  void showMotionPath(bool _visible = true);
160  bool motionPathVisible();
161 
162  void updateMotionPath();
163  void updateMotionPath(const AnimationHandle &_hAni);
164 
165 
166  //===========================================================================
173  //===========================================================================
174 
175  protected:
183  void update(UpdateType _type = UPDATE_ALL );
184 
186 };
187 
virtual QString getObjectinfo()
Get all Info for the Object as a string.
Definition: BaseObject.cc:244
virtual bool picked(uint _node_idx)
detect if the node has been picked
virtual void setName(QString _name) override
path to the file from which the object is loaded ( defaults to "." )
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
ACG::SceneGraph::SkeletonNodeT< Skeleton > * skeletonNode_
A pointer to the scenegraph node.
virtual void enablePicking(bool _enable)
virtual void cleanup() override
virtual void update(UpdateType _type=UPDATE_ALL) override
This function is called to update the object.
Update type class.
Definition: UpdateType.hh:59
Skeleton * skeleton_
A pointer to the skeleton data.
virtual BaseObject * copy()
Returns a full copy of the object.
Definition: BaseObject.cc:769
A handle used to refer to an animation or to a specific frame in an animation.
virtual bool pickingEnabled()