fbxsdk/scene/constraint/fbxcontrolset.h Source File

fbxcontrolset.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_SCENE_CONSTRAINT_CONTROL_SET_H_
14 #define _FBXSDK_SCENE_CONSTRAINT_CONTROL_SET_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
22 class FbxControlSetPlug;
23 
30 {
31 public:
34 
38  FbxControlSetLink(const FbxControlSetLink& pControlSetLink);
39 
43  FbxControlSetLink& operator=(const FbxControlSetLink& pControlSetLink);
44 
49  void Reset();
50 
53 
57 };
58 
63 {
64 public:
65  enum ESetId
66  {
82  eSetIdCount
83  };
84 
85  enum ENodeId
86  {
132  eNodeIdInvalid=-1
133  };
134 
136  FbxEffector();
137 
141  FbxEffector& operator=(const FbxEffector& pEffector);
142 
147  void Reset();
148 
151 
153  bool mShow;
154 
155 /*****************************************************************************************************************************
156 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
157 *****************************************************************************************************************************/
158 #ifndef DOXYGEN_SHOULD_SKIP_THIS
159  //These members are for backward compatibility and should not be used.
160  //These properties are now published through class FbxControlSetPlug.
161  bool mTActive;
162  bool mRActive;
163  bool mCandidateTActive;
164  bool mCandidateRActive;
165 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
166 };
167 
186 {
187 public:
191  void Reset();
192 
198  enum EType
199  {
202  eIkOnly
203  };
204 
208  void SetType(EType pType);
209 
213  EType GetType() const;
214 
218  void SetUseAxis(bool pUseAxis);
219 
223  bool GetUseAxis() const;
224 
228  void SetLockTransform(bool pLockTransform);
229 
233  bool GetLockTransform()const;
234 
238  void SetLock3DPick(bool pLock3DPick);
239 
243  bool GetLock3DPick() const;
244 
254  bool SetControlSetLink(FbxCharacter::ENodeId pCharacterNodeId, const FbxControlSetLink& pControlSetLink);
255 
265  bool GetControlSetLink(FbxCharacter::ENodeId pCharacterNodeId, FbxControlSetLink* pControlSetLink = NULL) const;
266 
272  bool SetEffector(FbxEffector::ENodeId pEffectorNodeId, FbxEffector pEffector);
273 
279  bool GetEffector(FbxEffector::ENodeId pEffectorNodeId, FbxEffector* pEffector = NULL);
280 
287  bool SetEffectorAux(FbxEffector::ENodeId pEffectorNodeId, FbxNode* pNode, FbxEffector::ESetId pEffectorSetId=FbxEffector::eAux1Set);
288 
295  bool GetEffectorAux(FbxEffector::ENodeId pEffectorNodeId, FbxNode** pNode=NULL, FbxEffector::ESetId pEffectorSetId=FbxEffector::eAux1Set) const;
296 
301  static char* GetEffectorNodeName(FbxEffector::ENodeId pEffectorNodeId);
302 
308  static FbxEffector::ENodeId GetEffectorNodeId(char* pEffectorNodeName);
309 
310 /*****************************************************************************************************************************
311 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
312 *****************************************************************************************************************************/
313 #ifndef DOXYGEN_SHOULD_SKIP_THIS
314  void FromPlug(FbxControlSetPlug *pPlug);
315  void ToPlug(FbxControlSetPlug *pPlug);
316 
317 private:
318  FbxControlSet();
319  ~FbxControlSet();
320 
321  FbxCharacter* mCharacter;
322  EType mType;
323  bool mUseAxis;
324  bool mLockTransform;
325  bool mLock3DPick;
326  FbxControlSetLink mControlSetLink[FbxCharacter::eNodeIdCount]; // Except floor node IDs!
329 
331  friend class FbxCharacter;
332  friend class FbxNode;
333 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
334 };
335 
340 {
342 
343 public:
345  FbxPropertyT<FbxControlSet::EType> ControlSetType;
346 
349 
352 
353 protected:
354  virtual void Construct(const FbxObject* pFrom);
355  virtual void ConstructProperties(bool pForceSet);
356  virtual FbxStringList GetTypeFlags() const;
357 
358 private:
359  FbxArray<FbxProperty> mFKBuf;
360  FbxArray<FbxProperty> mIKBuf;
361 
362  friend class FbxScene;
363  friend class FbxControlSet;
364 };
365 
367 
368 #include <fbxsdk/fbxsdk_nsend.h>
369 
370 #endif /* _FBXSDK_SCENE_CONSTRAINT_CONTROL_SET_H_ */
#define FBXSDK_OBJECT_DECLARE(Class, Parent)
Macro used to declare a new class derived from FbxObject.
Definition: fbxobject.h:61
FBX SDK environment definition.
#define FBXSDK_FRIEND_NEW()
Definition: fbxnew.h:397
bool mShow
true if the effector is visible, false if hidden
#define NULL
Definition: fbxarch.h:210
FbxPropertyT< FbxReference > Character
Reference character.
Array that stores pairs of FbxString and a pointer.
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxNode * mNode
The character's node in a hierarchy linked to this effector.
ENodeId
Define ID for each character node.
Definition: fbxcharacter.h:133
Plug class for control set.
EFbxType
Type identifier constants.
The base class of most FBX objects.
Definition: fbxobject.h:157
Represents an element in the scene graph.
Definition: fbxnode.h:72
EType
Control rig type.
This class contains the description of a 3D scene.
Definition: fbxscene.h:61
EFbxType FbxTypeOf(const FbxControlSet::EType &)
virtual void Construct(const FbxObject *pFrom)
Optional constructor override, automatically called by default constructor.
Enumeration.
#define FBXSDK_DLL
Definition: fbxarch.h:173
This class contains all methods to either set-up an exported control rig or query information on an i...
An effector wraps a character node (FbxNode) used to animate its control rig (FbxControlSet) via inve...
Definition: fbxcontrolset.h:62
A Character is a person or animal with pre-defined skeleton system.
Definition: fbxcharacter.h:91
FbxPropertyT< FbxBool > UseAxis
Use axis flag.
virtual void ConstructProperties(bool pForceSet)
Optional property constructor override, automatically called by default constructor.