Open Reality Reference Guide
 
Loading...
Searching...
No Matches
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
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
62
65{
66 kFBCharacterPoseNoFlag = 0,
67 kFBCharacterPoseMirror = 1,
68 kFBCharacterPoseGravity = 1<<1,
69 kFBCharacterPoseMatchTX = 1<<2,
70 kFBCharacterPoseMatchTY = 1<<3,
71 kFBCharacterPoseMatchTZ = 1<<4,
72 kFBCharacterPoseMatchR = 1<<5,
73 kFBCharacterPoseMatchPivot = 1<<6,
74 kFBCharacterPoseUseKeyingGroup = 1<<7,
75 kFBCharacterPoseMatchFKTranslation = 1<<8
76};
77
80{
81 kFBMirrorPlaneTypeInvalid = -1,
82 kFBMirrorPlaneTypeAuto = 0,
83 kFBMirrorPlaneTypeZY,
84 kFBMirrorPlaneTypeXY,
85 kFBMirrorPlaneTypeXZ,
86 kFBMirrorPlaneTypeUser,
87 kFBMirrorPlaneTypeEquation,
88 kFBMirrorPlaneTypeCount
89};
90
93{
94 kFBCharacterPoseKeyingModeInvalid = -1,
95 kFBCharacterPoseKeyingModeFullBody = 0,
96 kFBCharacterPoseKeyingModeBodyPart,
97 kFBCharacterPoseKeyingModeCount
98};
99
101// 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
200
204
208 void CopyPose( FBCharacter& pCharacter );
209
213 void CopyPoseCharacter( FBCharacter& pCharacter );
214
219
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
258
263 bool IsCharacterExtensionPoseStored( const char* pCharacterExtensionName );
264
269 void CopyFrom( FBCharacterPose& pFromPose );
270
276
281
286
291
297
302 FBObjectPose* GetCharacterExtensionPose( const char* pCharacterExtensionName );
303
309 FBObjectPose* GetOrCreateCharacterExtensionPose( const char* pCharacterExtensionName );
310
315
319 void RemoveCharacterExtensionPose( const char* pCharacterExtensionName );
320
326
332 void GetMirrorPlaneEquation( FBVector4<double>& pMirrorPlaneEquation, FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
333
339 void GetMirrorPlaneEquation( FBMatrix& pMirrorPlaneEquation, FBCharacter& pCharacter, FBCharacterPoseOptions& pCharacterPoseOptions );
340
341
346
352
360
367 void GetExtraBoneTransform(FBVector3d &pT, FBVector3d &pR, FBVector3d &pS, int pIndex );
368
374
379
380 private:
381
383
388 FBCharacterPose& operator=( const FBCharacterPose& );
390};
391
393// Property List: CharacterPose
395
398{
399 public:
406};
407
408#ifdef FBSDKUseNamespace
409 }
410#endif
411
412#endif /* __FBCHARACTERPOSE_H__ */
Objects Grouping class.
A character is the link between a motion source and a character model.
Used to work with character poses.
void GetExtraBoneTransform(FBVector3d &pT, FBVector3d &pR, FBVector3d &pS, int pIndex)
Get the extra bone transformation.
void ClearPose()
Clear all the data of the pose.
void RemoveCharacterExtensionPoseAt(int pIndex)
Remove the pose of a character extension.
void ApplyPoseCandidate()
After setting the candidate on the skeleton node, calling this function will allow subsequent call to...
void ClearCharacterExtensionsPose()
Clear only the pose of the character extensions (omit the character).
int GetCharacterExtensionPoseCount()
Get the number of character extension stored in the pose.
void ClearCharacterPose()
Clear only the pose of the character (omit the extensions).
bool IsCharacterPoseStored()
Is the pose of the character stored in the pose?
void CopyPoseCharacter(FBCharacter &pCharacter)
Copy the pose of only the character (omit the extensions).
void PastePoseCharacterExtensions(FBCharacter &pCharacter, FBCharacterPoseOptions &pCharacterPoseOptions)
Paste the pose of only the character extensions (omit the character).
void GetMirrorPlaneEquation(FBMatrix &pMirrorPlaneEquation, FBCharacter &pCharacter, FBCharacterPoseOptions &pCharacterPoseOptions)
Get the mirror plane equation that would be used to mirror according to the CharacterPoseOptions.
FBObjectPose * GetCharacterExtensionPose(const char *pCharacterExtensionName)
Get the pose of a character extension.
FBObjectPose * GetCharacterExtensionPoseAt(int pIndex)
Get the pose of a character extension.
int GetExtraBoneCount()
Get the number of extra bones contained in the character pose.
void PastePoseCharacter(FBCharacter &pCharacter, FBCharacterPoseOptions &pCharacterPoseOptions)
Paste the pose of only the character (omit the extensions).
void CopyPoseDataFrom(FBCharacterPose &pFromPose)
Copy all the pose data from a given pose.
FBCharacterPose(const char *pName, HIObject pObject=NULL)
Public constructor.
void CopyPoseCharacterExtension(FBCharacterExtension &pCharacterExtension)
Copy the pose of a single character extension.
void CopyPoseCharacterExtensionsFrom(FBCharacterPose &pFromPose)
Copy the pose data of only the character extensions from a given pose.
void CopyPoseCharacterFrom(FBCharacterPose &pFromPose)
Copy the pose data of only the character from a given pose.
void CopyFrom(FBCharacterPose &pFromPose)
Copy everything from a given object.
FBObjectPose * GetOrCreateCharacterExtensionPose(const char *pCharacterExtensionName)
Get the pose of a character extension and create it if necessary.
void CopyPoseCharacterExtensions(FBCharacter &pCharacter)
Copy the pose of only the character extensions (omit the character).
bool IsCharacterExtensionPoseStored(const char *pCharacterExtensionName)
Is the pose of the character extension stored in the pose?
void PastePoseCharacterExtension(FBCharacterExtension &pCharacterExtension, FBCharacterPoseOptions &pCharacterPoseOptions)
Paste the pose of a single character extension.
void GetMirrorPlaneEquation(FBVector4< double > &pMirrorPlaneEquation, FBCharacter &pCharacter, FBCharacterPoseOptions &pCharacterPoseOptions)
Get the mirror plane equation that would be used to mirror according to the CharacterPoseOptions.
void GetExtraBoneParentRotationOffset(FBRVector &pR, int pIndex)
Get the extra bone transformation offset.
void PastePose(FBCharacter &pCharacter, FBCharacterPoseOptions &pCharacterPoseOptions)
Paste the pose of a character and its extensions.
FBModel * GetExtraBoneModelAt(int pIndex)
Get the extra bone model at the specified index.
FBString GetCharacterExtensionNameFromPose(FBObjectPose &pCharacterExtensionPose)
Get the name of the character extension for the specified pose.
void CopyPose(FBCharacter &pCharacter)
Copy the pose of a character and its extensions.
void GetExtraBoneTransformOffset(FBVector3d &pT, FBVector3d &pR, FBVector3d &pS, int pIndex)
Get the extra bone transformation offset.
void RemoveCharacterExtensionPose(const char *pCharacterExtensionName)
Remove the pose of a character extension.
Stores options for operations on poses.
void ClearFlag()
Clear all flags.
FBVector4< double > mMirrorPlaneEquation
Mirror plane equation (used when mMirrorPlaneType = kFBMirrorPlaneTypeEquation).
bool GetFlag(FBCharacterPoseFlag pFlag) const
Get a flag value.
FBCharacterPoseKeyingMode mCharacterPoseKeyingMode
CharacterPoseKeyingMode (FullBody or BodyPart).
FBCharacterPoseOptions()
Constructor.
double mMirrorPlanePanAngle
Mirror plane pan angle in degrees (used when mMirrorPlaneType = kFBMirrorPlaneTypeUser).
double mMirrorPlaneTiltAngle
Mirror plane tilt angle in degrees (used when mMirrorPlaneType = kFBMirrorPlaneTypeUser).
void SetFlag(FBCharacterPoseFlag pFlag, bool pValue)
Set a flag value.
FBModel * mModelToMatch
Model to match.
FBMirrorPlaneType mMirrorPlaneType
Mirror plane type.
Four x Four (double) Matrix.
Definition fbtypes.h:290
Model class.
Definition fbmodel.h:274
FBObjectPose class.
Pose class.
Definition fbpose.h:76
PropertyList: CharacterPose.
FBCharacterPose * operator[](int pIndex)
Get the character pose at pIndex.
PropertyList: Concrete class for PropertyList of component
Basic string class.
Definition fbstring.h:67
Four dimensional vector (template).
Definition fbtypes.h:222
FBCharacterPoseFlag
Character Pose Options flags.
FBMirrorPlaneType
Mirror Plane Type.
FBCharacterPoseKeyingMode
Character Pose Keying Mode.
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Access to poses.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:62
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:68
class K_DLLIMPORT FBVector3< double > FBVector3d
3D vector.
Definition fbtypes.h:438