fbsdk/fbcharacterface.h Source File

fbcharacterface.h
Go to the documentation of this file.
1 #ifndef __FBCHARACTERFACE_H__
2 #define __FBCHARACTERFACE_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 
46 #include <kaydaradef.h>
47 #ifndef FBSDK_DLL
48 
51  #define FBSDK_DLL K_DLLIMPORT
52 #endif
53 
54 #include <fbsdk/fbcomponent.h>
55 #include <fbsdk/fbconstraint.h>
56 
57 #ifdef FBSDKUseNamespace
58  namespace FBSDKNamespace {
59 #endif
60 
61 
63 // FBActorFace - Representation of an actor face
65 __FB_FORWARD( FBActor );
66 __FB_FORWARD( FBActorFace );
68 
74 {
75  //--- Open Reality declaration.
77 public:
83  FBActorFace(const char* pName, HIObject pObject=NULL);
84 
88  virtual bool PlotAnimation( );
89 
90  IObject_Declare(K_IMPLEMENTATION); // Interface to IObject.
91 
95  virtual void FBDelete();
96 };
97 
98 
100 // FBCharacterFace - Representation of a character
103 FB_DEFINE_COMPONENT( FBSDK_DLL, Character );
104 
110 {
111  //--- Open Reality declaration.
113 public:
119  FBCharacterFace(const char* pName, HIObject pObject=NULL);
120 
121  IObject_Declare(K_IMPLEMENTATION); // Interface to IObject.
122 
125 
129  virtual bool PlotAnimation( );
130 
134  virtual void FBDelete();
135 
138  void GotoRest();
139 
145  bool ShapeGroupAdd( FBModelList* pList, const char* pName = NULL );
146 
151  bool ShapeGroupRemove( int pShapeGrpId );
152 
157  int ShapeGroupFindByName( const char* pName );
158 
162  int ShapeGroupGetCount();
163 
168  const char* ShapeGroupGetName( int pShapeGrpId );
169 
175  bool ShapeGroupSetName( int pShapeGrpId, const char* pName );
176 
182  int ShapeFindByName( int pShapeGrpId, const char* pName );
183 
188  int ShapeGetCount( int pShapeGrpId );
189 
195  const char* ShapeGetName( int pShapeGrpId, int pShapeId );
196 
203  bool ShapeSetName( int pShapeGrpId, int pShapeId, const char* pName );
204 
210  int ClusterGroupAdd( FBModelList* pList, const char* pName = NULL );
211 
216  bool ClusterGroupRemove( int pClusterGrpId );
217 
222  int ClusterGroupFindByName( const char* pName );
223 
227  int ClusterGroupGetCount();
228 
233  const char* ClusterGroupGetName( int pClusterGrpId );
234 
240  bool ClusterGroupSetName( int pClusterGrpId, const char* pName );
241 
246  bool ClusterGroupSnapRest( int pClusterGrpId );
247 
253  int ClusterShapeAdd( int pClusterGrpId, const char* pName = NULL );
254 
260  bool ClusterShapeRemove( int pClusterGrpId, int pClusterShapeId );
261 
267  int ClusterShapeFindByName( int pClusterGrpId, const char* pName );
268 
273  int ClusterShapeGetCount( int pClusterGrpId );
274 
280  const char* ClusterShapeGetName( int pClusterGrpId, int pClusterShapeId );
281 
288  bool ClusterShapeSetName( int pClusterGrpId, int pClusterShapeId, const char* pName );
289 
295  bool ClusterShapeSnap( int pClusterGrpId, int pClusterShapeId );
296 
301  int ExpressionAdd( const char* pName );
302 
307  bool ExpressionRemove( int pExpressionId );
308 
313  int ExpressionFindByName( const char* pName );
314 
318  int ExpressionGetCount();
319 
324  const char* ExpressionGetName( int pExpressionId );
325 
331  bool ExpressionSetName( int pExpressionId, const char* pName );
332 
342  bool ExpressionSetShapeWeight( int pExpressionId, int pGrpId, int pShapeId, float pValue = 0.0f );
343 
352  double ExpressionGetShapeWeight( int pExpressionId, int pGrpId, int pShapeId );
353 };
354 
355 
356 
358 // Property List: ActorFace
360 
365 {
366  public:
372  FBActorFace* operator[]( int pIndex );
373 };
374 
375 
377 // Property List: Character face
379 
384 {
385  public:
391  FBCharacterFace* operator[]( int pIndex );
392 };
393 
394 
395 #ifdef FBSDKUseNamespace
396  }
397 #endif
398 #endif /* _FBCHARACTERFACE_H_ */
class FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate FBModelList;
Definition: fbcharacter.h:597
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
Animates a character face using an actor as input.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
Base class for constraints.
Definition: fbconstraint.h:134
Contraint classes.
PropertyList: Actor face.
#define NULL
Definition: kaydara.h:169
#define K_IMPLEMENTATION
Definition: iobject.h:53
#define IObject_Declare(IsPure)
Definition: iobject.h:75
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:553
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class FBPropertyBaseComponent< FBActorFace * > FBPropertyActorFace
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
FBPropertyBool ActiveInput
Read Write Property: Is the character input active?
Basic class definitions.
Used to plot actor face animation.
PropertyList: Character face.
FBPropertyActorFace InputActorFace
Read Write Property: The index of the actor used for the input.