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 {
75 };
76 
79 {
88 };
89 
92 {
97 };
98 
100 // FBCharacterPoseOptions
102 FB_FORWARD( FBCharacterPoseOptions );
103 
118 {
119  public:
120 
125 
128 
131 
139 
142 
145 
149 
154  void SetFlag( FBCharacterPoseFlag pFlag, bool pValue );
155 
160  bool GetFlag( FBCharacterPoseFlag pFlag ) const;
161 
164  void ClearFlag();
165 
166  private:
167 
168  FBCharacterPoseFlag mFlags;
169 };
170 
172 // FBCharacterPose
175 
180 {
181  //--- Open Reality declaration.
183 
184  public:
190  FBCharacterPose( const char* pName, HIObject pObject=NULL );
191 
194  void ClearPose();
195 
198  void ClearCharacterPose();
199 
202  void ClearCharacterExtensionsPose();
203 
207  void CopyPose( FBCharacter& pCharacter );
208 
212  void CopyPoseCharacter( FBCharacter& pCharacter );
213 
217  void CopyPoseCharacterExtensions( FBCharacter& pCharacter );
218 
222  void CopyPoseCharacterExtension( FBCharacterExtension& pCharacterExtension );
223 
230  void PastePose( FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
231 
237  void PastePoseCharacter( FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
238 
244  void PastePoseCharacterExtensions( FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
245 
251  void PastePoseCharacterExtension( FBCharacterExtension& pCharacterExtension, FBCharacterPoseOptions& pCharacterPoseOptions );
252 
256  bool IsCharacterPoseStored();
257 
262  bool IsCharacterExtensionPoseStored( const char* pCharacterExtensionName );
263 
268  void CopyFrom( FBCharacterPose& pFromPose );
269 
274  void CopyPoseDataFrom( FBCharacterPose& pFromPose );
275 
279  void CopyPoseCharacterFrom( FBCharacterPose& pFromPose );
280 
284  void CopyPoseCharacterExtensionsFrom( FBCharacterPose& pFromPose );
285 
289  int GetCharacterExtensionPoseCount();
290 
295  FBObjectPose* GetCharacterExtensionPoseAt( int pIndex );
296 
301  FBObjectPose* GetCharacterExtensionPose( const char* pCharacterExtensionName );
302 
308  FBObjectPose* GetOrCreateCharacterExtensionPose( const char* pCharacterExtensionName );
309 
313  void RemoveCharacterExtensionPoseAt( int pIndex );
314 
318  void RemoveCharacterExtensionPose( const char* pCharacterExtensionName );
319 
324  FBString GetCharacterExtensionNameFromPose( FBObjectPose& pCharacterExtensionPose );
325 
331  void GetMirrorPlaneEquation( FBVector4<double>& pMirrorPlaneEquation, FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
332 
338  void GetMirrorPlaneEquation( FBMatrix& pMirrorPlaneEquation, FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
339 
340 
344  int GetExtraBoneCount();
345 
350  FBModel* GetExtraBoneModelAt(int pIndex);
351 
358  void GetExtraBoneTransformOffset(FBVector3d &pT, FBVector3d &pR, FBVector3d &pS, int pIndex );
359 
366  void GetExtraBoneTransform(FBVector3d &pT, FBVector3d &pR, FBVector3d &pS, int pIndex );
367 
372  void GetExtraBoneParentRotationOffset( FBRVector &pR, int pIndex );
373 
377  void ApplyPoseCandidate();
378 
379  private:
380 
382 
387  FBCharacterPose& operator=( const FBCharacterPose& );
389 };
390 
392 // Property List: CharacterPose
394 
397 {
398  public:
404  FBCharacterPose* operator[]( int pIndex );
405 };
406 
407 #ifdef FBSDKUseNamespace
408  }
409 #endif
410 
411 #endif /* __FBCHARACTERPOSE_H__ */
Model class.
Definition: fbmodel.h:273
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBCharacterPoseFlag
Character Pose Options flags.
FBModel * mModelToMatch
Model to match.
FBMirrorPlaneType
Mirror Plane Type.
Stores options for operations on poses.
Four x Four (double) Matrix.
Definition: fbtypes.h:289
Basic string class.
Definition: fbstring.h:66
#define NULL
Definition: kaydara.h:169
Used to work with character poses.
FBVector4< double > mMirrorPlaneEquation
Mirror plane equation (used when mMirrorPlaneType = kFBMirrorPlaneTypeEquation).
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:553
PropertyList: CharacterPose.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBCharacterPoseKeyingMode
Character Pose Keying Mode.
class FBVector3< double > FBVector3d
3D vector.
Definition: fbtypes.h:438
A character is the link between a motion source and a character model.
Definition: fbcharacter.h:1229
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
Basic class definitions.
double mMirrorPlaneTiltAngle
Mirror plane tilt angle in degrees (used when mMirrorPlaneType = kFBMirrorPlaneTypeUser).
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
Access to poses.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Pose class.
Definition: fbpose.h:75
double mMirrorPlanePanAngle
Mirror plane pan angle in degrees (used when mMirrorPlaneType = kFBMirrorPlaneTypeUser).
FBCharacterPoseKeyingMode mCharacterPoseKeyingMode
CharacterPoseKeyingMode (FullBody or BodyPart).
FBObjectPose class.
Definition: fbobjectpose.h:192
FBMirrorPlaneType mMirrorPlaneType
Mirror plane type.