Open Reality Reference Guide
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
67 FB_DEFINE_COMPONENT( FBSDK_DLL, ActorFace );
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(override); // Interface to IObject.
91 
95  virtual void FBDelete() override;
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(override); // Interface to IObject.
122 
123  FBPropertyActorFace InputActorFace;
125 
129  virtual bool PlotAnimation( );
130 
134  virtual void FBDelete() override;
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 
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 
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 
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_ */
FBPropertyListCharacterFace::operator[]
FBCharacterFace * operator[](int pIndex)
Get the Character face at pIndex.
FBCharacterFace::ClusterGroupAdd
int ClusterGroupAdd(FBModelList *pList, const char *pName=NULL)
Add a cluster group to the character face.
FBCharacterFace::ClusterShapeGetCount
int ClusterShapeGetCount(int pClusterGrpId)
Retrieve the total number of shapes in a cluster group.
FBCharacterFace::ClusterShapeRemove
bool ClusterShapeRemove(int pClusterGrpId, int pClusterShapeId)
Remove a cluster shape from a cluster group.
FBActorFace::FBDelete
virtual void FBDelete() override
Actual Actor Face destructor.
FBSDK_DLL
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbcharacterface.h:51
FBActorFace::FBActorFace
FBActorFace(const char *pName, HIObject pObject=NULL)
Constructor.
FBCharacterFace::ClusterGroupSetName
bool ClusterGroupSetName(int pClusterGrpId, const char *pName)
Set the name of a cluster group.
FBCharacterFace::ActiveInput
FBPropertyBool ActiveInput
Read Write Property: Is the character input active?
Definition: fbcharacterface.h:124
FBPropertyListCharacterFace
PropertyList: Character face.
Definition: fbcharacterface.h:384
FBCharacterFace::ClusterGroupSnapRest
bool ClusterGroupSnapRest(int pClusterGrpId)
Set a cluster group's rest pose to the current pose.
FBCharacterFace::ClusterShapeFindByName
int ClusterShapeFindByName(int pClusterGrpId, const char *pName)
Find a cluster shape in a cluster group by name.
FBCharacterFace::PlotAnimation
virtual bool PlotAnimation()
Plot the animation of the character face.
FBCharacterFace::ShapeFindByName
int ShapeFindByName(int pShapeGrpId, const char *pName)
Find a shape in a blendshape group by name.
FBCharacterFace::ExpressionAdd
int ExpressionAdd(const char *pName)
Add an expression to the face.
FBCharacterFace::ClusterGroupGetCount
int ClusterGroupGetCount()
Retrieve the total number of cluster groups.
FBActor
FBActor is used to link motion data to a character.
Definition: fbcharacter.h:989
FBActorFace::PlotAnimation
virtual bool PlotAnimation()
Plot the animation of the actor face.
FBCharacterFace::FBCharacterFace
FBCharacterFace(const char *pName, HIObject pObject=NULL)
Constructor.
__FBClassDeclare
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
__FB_FORWARD
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBActorFace
Used to plot actor face animation.
Definition: fbcharacterface.h:74
FBCharacterFace::ClusterGroupRemove
bool ClusterGroupRemove(int pClusterGrpId)
Remove a cluster group from the character face.
FBCharacterFace::ClusterGroupGetName
const char * ClusterGroupGetName(int pClusterGrpId)
Retrieve the name of a cluster group.
FBCharacterFace::ExpressionGetShapeWeight
double ExpressionGetShapeWeight(int pExpressionId, int pGrpId, int pShapeId)
Retrieve the weight of a shape to an expression.
FBCharacterFace
Animates a character face using an actor as input.
Definition: fbcharacterface.h:110
FBCharacterFace::ClusterShapeAdd
int ClusterShapeAdd(int pClusterGrpId, const char *pName=NULL)
Add a cluster shape to a cluster group.
FBCharacterFace::ExpressionSetShapeWeight
bool ExpressionSetShapeWeight(int pExpressionId, int pGrpId, int pShapeId, float pValue=0.0f)
Assign the weight of a shape to an expression.
FBCharacterFace::ExpressionGetCount
int ExpressionGetCount()
Retrieve the total number of expressions on the face.
FBCharacterFace::ShapeGetName
const char * ShapeGetName(int pShapeGrpId, int pShapeId)
Retrieve the name of the shape in a blendshape group.
FBCharacterFace::GotoRest
void GotoRest()
Set the character face back to its rest shape.
FBCharacterFace::InputActorFace
FBPropertyActorFace InputActorFace
Read Write Property: The index of the actor used for the input.
Definition: fbcharacterface.h:123
FBModelList
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
Definition: fbcharacter.h:597
FBCharacterFace::ShapeGroupRemove
bool ShapeGroupRemove(int pShapeGrpId)
Remove a blendshape model group.
FBCharacterFace::ClusterGroupFindByName
int ClusterGroupFindByName(const char *pName)
Find a cluster group by name.
FBPropertyBool
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Definition: fbproperties.h:1308
FBCharacterFace::ExpressionFindByName
int ExpressionFindByName(const char *pName)
Find an expression on the face by name.
fbcomponent.h
Basic class definitions.
FBCharacterFace::ShapeGroupGetCount
int ShapeGroupGetCount()
Retrieve the total number of blendshape groups on this character face.
FBCharacterFace::ShapeGroupFindByName
int ShapeGroupFindByName(const char *pName)
Find a blendshape group by name.
FBCharacterFace::ClusterShapeSnap
bool ClusterShapeSnap(int pClusterGrpId, int pClusterShapeId)
Record the current pose of the cluster group to a cluster shape.
FBPropertyListComponent
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:536
FBCharacterFace::ShapeSetName
bool ShapeSetName(int pShapeGrpId, int pShapeId, const char *pName)
Set the name of the shape in a blendshape group.
FBConstraint
Base class for constraints.
Definition: fbconstraint.h:134
FBCharacterFace::ExpressionSetName
bool ExpressionSetName(int pExpressionId, const char *pName)
Set the name of an expression.
fbconstraint.h
Contraint classes.
FBCharacterFace::FBDelete
virtual void FBDelete() override
Actual Character Face destructor.
FBCharacterFace::ExpressionGetName
const char * ExpressionGetName(int pExpressionId)
Retrieve the name of an expression.
FB_DEFINE_COMPONENT
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
FBCharacterFace::ClusterShapeSetName
bool ClusterShapeSetName(int pClusterGrpId, int pClusterShapeId, const char *pName)
Set the name of a shape in a cluster group.
FBCharacterFace::ShapeGroupSetName
bool ShapeGroupSetName(int pShapeGrpId, const char *pName)
Set the name of a blendshape group.
FBCharacterFace::ShapeGroupAdd
bool ShapeGroupAdd(FBModelList *pList, const char *pName=NULL)
Add a blendshape model group for each input model.
FBCharacterFace::ShapeGroupGetName
const char * ShapeGroupGetName(int pShapeGrpId)
Retrieve the name of a blendshape group.
FBCharacterFace::ClusterShapeGetName
const char * ClusterShapeGetName(int pClusterGrpId, int pClusterShapeId)
Retrieve the name of a shape in a cluster group.
FBComponent
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
FBCharacterFace::ExpressionRemove
bool ExpressionRemove(int pExpressionId)
Remove an expression from the face.
FBCharacterFace::ShapeGetCount
int ShapeGetCount(int pShapeGrpId)
Retrieve the total number of shapes in a blendshape group.
FBPropertyListActorFace::operator[]
FBActorFace * operator[](int pIndex)
Get the actor face at pIndex.
FBPropertyListActorFace
PropertyList: Actor face.
Definition: fbcharacterface.h:365