Open Reality Reference Guide
 
Loading...
Searching...
No Matches
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
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
67FB_DEFINE_COMPONENT( FBSDK_DLL, ActorFace );
68
74{
75 //--- Open Reality declaration.
77public:
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
103FB_DEFINE_COMPONENT( FBSDK_DLL, Character );
104
110{
111 //--- Open Reality declaration.
113public:
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:
392};
393
394
395#ifdef FBSDKUseNamespace
396 }
397#endif
398#endif /* _FBCHARACTERFACE_H_ */
Used to plot actor face animation.
virtual void FBDelete() override
Actual Actor Face destructor.
virtual bool PlotAnimation()
Plot the animation of the actor face.
FBActorFace(const char *pName, HIObject pObject=NULL)
Constructor.
FBActor is used to link motion data to a character.
Animates a character face using an actor as input.
bool ClusterShapeSetName(int pClusterGrpId, int pClusterShapeId, const char *pName)
Set the name of a shape in a cluster group.
int ClusterGroupFindByName(const char *pName)
Find a cluster group by name.
FBPropertyBool ActiveInput
Read Write Property: Is the character input active?
int ExpressionFindByName(const char *pName)
Find an expression on the face by name.
int ClusterShapeFindByName(int pClusterGrpId, const char *pName)
Find a cluster shape in a cluster group by name.
bool ClusterGroupRemove(int pClusterGrpId)
Remove a cluster group from the character face.
FBCharacterFace(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyActorFace InputActorFace
Read Write Property: The index of the actor used for the input.
virtual void FBDelete() override
Actual Character Face destructor.
bool ClusterGroupSnapRest(int pClusterGrpId)
Set a cluster group's rest pose to the current pose.
int ClusterGroupAdd(FBModelList *pList, const char *pName=NULL)
Add a cluster group to the character face.
const char * ShapeGroupGetName(int pShapeGrpId)
Retrieve the name of a blendshape group.
const char * ClusterShapeGetName(int pClusterGrpId, int pClusterShapeId)
Retrieve the name of a shape in a cluster group.
bool ShapeGroupAdd(FBModelList *pList, const char *pName=NULL)
Add a blendshape model group for each input model.
int ClusterShapeAdd(int pClusterGrpId, const char *pName=NULL)
Add a cluster shape to a cluster group.
int ShapeGetCount(int pShapeGrpId)
Retrieve the total number of shapes in a blendshape group.
int ShapeFindByName(int pShapeGrpId, const char *pName)
Find a shape in a blendshape group by name.
virtual bool PlotAnimation()
Plot the animation of the character face.
bool ClusterShapeRemove(int pClusterGrpId, int pClusterShapeId)
Remove a cluster shape from a cluster group.
bool ShapeGroupRemove(int pShapeGrpId)
Remove a blendshape model group.
int ClusterGroupGetCount()
Retrieve the total number of cluster groups.
const char * ExpressionGetName(int pExpressionId)
Retrieve the name of an expression.
double ExpressionGetShapeWeight(int pExpressionId, int pGrpId, int pShapeId)
Retrieve the weight of a shape to an expression.
int ClusterShapeGetCount(int pClusterGrpId)
Retrieve the total number of shapes in a cluster group.
bool ExpressionRemove(int pExpressionId)
Remove an expression from the face.
void GotoRest()
Set the character face back to its rest shape.
bool ExpressionSetName(int pExpressionId, const char *pName)
Set the name of an expression.
bool ClusterGroupSetName(int pClusterGrpId, const char *pName)
Set the name of a cluster group.
bool ClusterShapeSnap(int pClusterGrpId, int pClusterShapeId)
Record the current pose of the cluster group to a cluster shape.
const char * ShapeGetName(int pShapeGrpId, int pShapeId)
Retrieve the name of the shape in a blendshape group.
int ExpressionAdd(const char *pName)
Add an expression to the face.
bool ShapeSetName(int pShapeGrpId, int pShapeId, const char *pName)
Set the name of the shape in a blendshape group.
bool ExpressionSetShapeWeight(int pExpressionId, int pGrpId, int pShapeId, float pValue=0.0f)
Assign the weight of a shape to an expression.
int ShapeGroupFindByName(const char *pName)
Find a blendshape group by name.
int ExpressionGetCount()
Retrieve the total number of expressions on the face.
bool ShapeGroupSetName(int pShapeGrpId, const char *pName)
Set the name of a blendshape group.
int ShapeGroupGetCount()
Retrieve the total number of blendshape groups on this character face.
const char * ClusterGroupGetName(int pClusterGrpId)
Retrieve the name of a cluster group.
MotionBuilder SDK base class.
Base class for constraints.
PropertyList: Actor face.
FBActorFace * operator[](int pIndex)
Get the actor face at pIndex.
PropertyList: Character face.
FBCharacterFace * operator[](int pIndex)
Get the Character face at pIndex.
PropertyList: Concrete class for PropertyList of component
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Constraint classes.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition fbtypes.h:68