Open Reality Reference Guide
fbpose.h
Go to the documentation of this file.
1 #ifndef __FBPOSE_H__
2 #define __FBPOSE_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 
53 #ifdef FBSDKUseNamespace
54  namespace FBSDKNamespace {
55 #endif
56 
57 
59 
61 // FBPose
64 
67 {
70 };
71 
72 FB_DEFINE_ENUM( FBSDK_DLL, PoseType );
73 
76 {
78 
79 public:
84  FBPose( const char *pName, HIObject pObject = NULL );
85 
86  IQuery_Declare(override);
87 
89  int GetNodeCount();
90 
96  int AddNode( FBModel* pObject, FBMatrix* pMatrix = NULL, bool pIsLocalMatrix = false );
97 
101  void RemoveNode( int pIndex );
102 
107  void SetNodeObject( int pIndex, FBModel* pObject );
108 
114  FBModel* GetNodeObject( int pIndex );
115 
121  FBString GetNodeName( int pIndex ) const;
122 
127  void SetNodeMatrix( int pIndex, FBMatrix* pMatrix );
128 
135  FBMatrix GetNodeMatrix( int pIndex ) const;
136 
143  FBMatrix GetNodeMatrixGlobal( int pIndex ) const;
144 
149  void SetIsNodeLocalMatrix( int pIndex, bool pIsNodeLocalMatrix );
150 
156  bool IsNodeLocalMatrix( int pIndex );
157 
162  int Find( FBString pNodeName );
163 
167 
168 public:
169  FBPropertyPoseType Type;
170 };
171 
172 
174 // FBPropertyListPose
177 
180 {
181 public:
187  FBPose* operator[](int pIndex);
188 };
189 
190 
191 #ifdef FBSDKUseNamespace
192  }
193 #endif
194 #endif
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
Four x Four (double) Matrix.
Definition: fbtypes.h:290
Model class.
Definition: fbmodel.h:274
Pose class.
Definition: fbpose.h:76
FBModel * GetNodeObject(int pIndex)
Get the pose node object.
void RemoveNode(int pIndex)
Remove the pose node at specified index.
void SetNodeObject(int pIndex, FBModel *pObject)
Set the pose node object.
void SetIsNodeLocalMatrix(int pIndex, bool pIsNodeLocalMatrix)
Set the type of the Matrix for a given node.
FBMatrix GetNodeMatrix(int pIndex) const
Get the pose node matrix.
int GetNodeCount()
Returns the number of pose nodes stored.
FBPropertyPoseType Type
Read Only Property: Type of the pose (bind pose or rest pose)
Definition: fbpose.h:169
FBString GetNodeName(int pIndex) const
Get the pose node at specified index.
int Find(FBString pNodeName)
Look in this pose if the given node is present.
int AddNode(FBModel *pObject, FBMatrix *pMatrix=NULL, bool pIsLocalMatrix=false)
Add a new pose node.
void SetNodeMatrix(int pIndex, FBMatrix *pMatrix)
Set the pose node matrix.
FBMatrix GetNodeMatrixGlobal(int pIndex) const
Get the global pose node matrix.
bool IsNodeLocalMatrix(int pIndex)
Get the type of the Matrix for a given node.
void CreatePoseThumbnail()
Create an image thumbnail for the current pose.
FBPose(const char *pName, HIObject pObject=NULL)
Constructor.
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:536
List: Model
Definition: fbpose.h:180
FBPose * operator[](int pIndex)
Get the pose at pIndex.
Basic string class.
Definition: fbstring.h:67
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbpose.h:48
FBPoseType
Types of pose.
Definition: fbpose.h:67
@ kFBRestPose
Rest pose.
Definition: fbpose.h:69
@ kFBBindPose
Bind pose.
Definition: fbpose.h:68
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68