fbsdk/fbcharacterpose.h Source File

fbcharacterpose.h
Go to the documentation of this file.
1 #ifndef __FBCHARACTERPOSE_H__
2 #define __FBCHARACTERPOSE_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
45 
48  #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #include <fbsdk/fbcomponent.h>
52 #include <fbsdk/fbpose.h>
53 
54 #ifdef FBSDKUseNamespace
55  namespace FBSDKNamespace {
56 #endif
57 
58 FB_FORWARD( FBCharacter );
59 FB_FORWARD( FBCharacterExtension );
60 FB_FORWARD( FBObjectPose );
61 FB_FORWARD( FBModel );
62 
65 {
76 };
77 
80 {
89 };
90 
93 {
98 };
99 
101 // FBCharacterPoseOptions
103 FB_FORWARD( FBCharacterPoseOptions );
104 
119 {
120  public:
121 
126 
129 
132 
140 
143 
146 
150 
155  void SetFlag( FBCharacterPoseFlag pFlag, bool pValue );
156 
161  bool GetFlag( FBCharacterPoseFlag pFlag ) const;
162 
165  void ClearFlag();
166 
167  private:
168 
169  FBCharacterPoseFlag mFlags;
170 };
171 
173 // FBCharacterPose
176 
181 {
182  //--- Open Reality declaration.
184 
185  public:
191  FBCharacterPose( const char* pName, HIObject pObject=NULL );
192 
195  void ClearPose();
196 
199  void ClearCharacterPose();
200 
203  void ClearCharacterExtensionsPose();
204 
208  void CopyPose( FBCharacter& pCharacter );
209 
213  void CopyPoseCharacter( FBCharacter& pCharacter );
214 
218  void CopyPoseCharacterExtensions( FBCharacter& pCharacter );
219 
223  void CopyPoseCharacterExtension( FBCharacterExtension& pCharacterExtension );
224 
231  void PastePose( FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
232 
238  void PastePoseCharacter( FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
239 
245  void PastePoseCharacterExtensions( FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
246 
252  void PastePoseCharacterExtension( FBCharacterExtension& pCharacterExtension, FBCharacterPoseOptions& pCharacterPoseOptions );
253 
257  bool IsCharacterPoseStored();
258 
263  bool IsCharacterExtensionPoseStored( const char* pCharacterExtensionName );
264 
269  void CopyFrom( FBCharacterPose& pFromPose );
270 
275  void CopyPoseDataFrom( FBCharacterPose& pFromPose );
276 
280  void CopyPoseCharacterFrom( FBCharacterPose& pFromPose );
281 
285  void CopyPoseCharacterExtensionsFrom( FBCharacterPose& pFromPose );
286 
290  int GetCharacterExtensionPoseCount();
291 
296  FBObjectPose* GetCharacterExtensionPoseAt( int pIndex );
297 
302  FBObjectPose* GetCharacterExtensionPose( const char* pCharacterExtensionName );
303 
309  FBObjectPose* GetOrCreateCharacterExtensionPose( const char* pCharacterExtensionName );
310 
314  void RemoveCharacterExtensionPoseAt( int pIndex );
315 
319  void RemoveCharacterExtensionPose( const char* pCharacterExtensionName );
320 
325  FBString GetCharacterExtensionNameFromPose( FBObjectPose& pCharacterExtensionPose );
326 
332  void GetMirrorPlaneEquation( FBVector4<double>& pMirrorPlaneEquation, FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
333 
339  void GetMirrorPlaneEquation( FBMatrix& pMirrorPlaneEquation, FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
340 
341 
345  int GetExtraBoneCount();
346 
351  FBModel* GetExtraBoneModelAt(int pIndex);
352 
359  void GetExtraBoneTransformOffset(FBVector3d &pT, FBVector3d &pR, FBVector3d &pS, int pIndex );
360 
367  void GetExtraBoneTransform(FBVector3d &pT, FBVector3d &pR, FBVector3d &pS, int pIndex );
368 
373  void GetExtraBoneParentRotationOffset( FBRVector &pR, int pIndex );
374 
378  void ApplyPoseCandidate();
379 
380  private:
381 
383 
388  FBCharacterPose& operator=( const FBCharacterPose& );
390 };
391 
393 // Property List: CharacterPose
395 
398 {
399  public:
405  FBCharacterPose* operator[]( int pIndex );
406 };
407 
408 #ifdef FBSDKUseNamespace
409  }
410 #endif
411 
412 #endif /* __FBCHARACTERPOSE_H__ */
double mMirrorPlaneTiltAngle
Mirror plane tilt angle in degrees (used when mMirrorPlaneType = kFBMirrorPlaneTypeUser).
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
Model class.
Definition: fbmodel.h:273
FBCharacterPoseKeyingMode mCharacterPoseKeyingMode
CharacterPoseKeyingMode (FullBody or BodyPart).
Basic string class.
Definition: fbstring.h:66
Four x Four (double) Matrix.
Definition: fbtypes.h:289
class FBVector3< double > FBVector3d
3D vector.
Definition: fbtypes.h:438
#define NULL
Definition: kaydara.h:179
FBVector4< double > mMirrorPlaneEquation
Mirror plane equation (used when mMirrorPlaneType = kFBMirrorPlaneTypeEquation).
double mMirrorPlanePanAngle
Mirror plane pan angle in degrees (used when mMirrorPlaneType = kFBMirrorPlaneTypeUser).
Stores options for operations on poses.
FBCharacterPoseFlag
Character Pose Options flags.
Pose class.
Definition: fbpose.h:75
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:549
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
FBModel * mModelToMatch
Model to match.
Basic class definitions.
FBMirrorPlaneType
Mirror Plane Type.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
Access to poses.
Used to work with character poses.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
A character is the link between a motion source and a character model.
Definition: fbcharacter.h:1364
const char void * pValue
Definition: fbcontrols.h:2116
FBObjectPose class.
Definition: fbobjectpose.h:192
FBMirrorPlaneType mMirrorPlaneType
Mirror plane type.
FBCharacterPoseKeyingMode
Character Pose Keying Mode.
PropertyList: CharacterPose.