Open Reality Reference Guide
fbtrigger.h
Go to the documentation of this file.
1 #ifndef __FBTRIGGER_H__
2 #define __FBTRIGGER_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
45 
48  #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #ifdef FBSDKUseNamespace
52  namespace FBSDKNamespace {
53 #endif
54 
59 
64 
65 FB_DEFINE_COMPONENT( FBSDK_DLL, TriggerGroup );
66 FB_DEFINE_COMPONENT( FBSDK_DLL, Trigger );
67 FB_DEFINE_COMPONENT( FBSDK_DLL, MotionClip );
68 FB_DEFINE_COMPONENT( FBSDK_DLL, TriggerBranch );
69 
71 // FBPropertyListTriggerGroup
74 class FBSDK_DLL FBPropertyListTriggerGroup : public FBPropertyBaseList< FBTriggerGroup* >
75 {
76 public:
81  virtual int Add ( FBTriggerGroup* pItem );
82  virtual void RemoveAt( int pIndex );
83  virtual FBTriggerGroup* operator[](int pIndex);
84  virtual int GetCount();
85 };
86 
88 // FBPropertyListTrigger
92 {
93 public:
98  virtual int Add ( FBTrigger* pItem );
99  virtual void RemoveAt( int pIndex );
100  virtual FBTrigger* operator[](int pIndex);
101  virtual int GetCount();
102 };
103 
105 // FBPropertyListMotionClip
108 class FBSDK_DLL FBPropertyListMotionClip : public FBPropertyBaseList< FBMotionClip* >
109 {
110 public:
115  virtual int Add ( FBMotionClip* pItem );
116  virtual void RemoveAt( int pIndex );
117  virtual FBMotionClip* operator[](int pIndex);
118  virtual int GetCount();
119 };
120 
122 // FBPropertyListTriggerBranch
125 class FBSDK_DLL FBPropertyListTriggerBranch : public FBPropertyBaseList< FBTriggerBranch* >
126 {
127 public:
132  virtual int Add ( FBTriggerBranch* pItem );
133  virtual void RemoveAt( int pIndex );
134  virtual FBTriggerBranch* operator[](int pIndex);
135  virtual int GetCount();
136 };
137 
138 
140 // FBTrigger
143 
145 {
150 };
152 
154 {
159 };
160 
161 FB_DEFINE_ENUM( FBSDK_DLL, TriggerSource );
162 FB_DEFINE_ENUM( FBSDK_DLL, TriggerMode );
163 
165 {
166  //--- Open Reality declaration.
168 
169 public:
174  FBTriggerGroup(char* pName = NULL, HIObject pObject = NULL);
175 
176  IObject_Declare(override); // Interface to IObject.
177 
178  void Synchronize();
179 
182  FBPropertyTriggerSource Source;
183  FBPropertyTriggerMode Mode;
185 
189 };
190 
192 // FBTrigger
195 
197 {
203 };
204 
205 FB_DEFINE_ENUM( FBSDK_DLL, TriggerType );
206 
208 {
209  //--- Open Reality declaration.
211 
212 public:
217  FBTrigger(char* pName = NULL, HIObject pObject = NULL);
218 
219  IObject_Declare(override); // Interface to IObject.
220 
222  FBPropertyTriggerType Type;
223 };
224 
226 // FBMotionClip
228 class FBSDK_DLL FBMotionClip : public FBComponent
229 {
230  //--- Open Reality declaration.
232 
233 public:
239  FBMotionClip(char* pName, char* pFilename, HIObject pObject = NULL);
240 
241  IObject_Declare(override); // Interface to IObject.
242 
244  FBPropertyString Filename;
245 };
246 
248 // FBTriggerBranch
251 {
252  //--- Open Reality declaration.
254 
255 public:
260  FBTriggerBranch(char* pName, HIObject pObject = NULL);
261 
262  IObject_Declare(override); // Interface to IObject.
263 
264  FBPropertyMotionClip MotionClip;
265  FBPropertyTrigger Trigger;
266 };
267 
268 #ifdef FBSDKUseNamespace
269  }
270 #endif
271 #endif /* _FB_TRIGGER_H_ */
kFBTriggerSourceJoystick1
@ kFBTriggerSourceJoystick1
Joystick1.
Definition: fbtrigger.h:148
FBSDK_DLL
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbtrigger.h:48
FBPropertyListTriggerBranch::GetCount
virtual int GetCount()
Get the number of properties in the list.
FB_DEFINE_ENUM
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
FBTriggerBranch::Trigger
FBPropertyTrigger Trigger
Trigger to control branching.
Definition: fbtrigger.h:265
FBPropertyListTrigger::operator[]
virtual FBTrigger * operator[](int pIndex)
[] operator overload.
kFBTriggerSourceDefault
@ kFBTriggerSourceDefault
Default.
Definition: fbtrigger.h:146
FBMotionClip::Name
FBPropertyString Name
Name of motion clip.
Definition: fbtrigger.h:243
FBTriggerBranch::MotionClip
FBPropertyMotionClip MotionClip
Motion clip to branch into.
Definition: fbtrigger.h:264
FBPropertyListTriggerGroup
PropertyList: TriggerGroup
Definition: fbtrigger.h:75
FBPropertyListTriggerBranch::operator[]
virtual FBTriggerBranch * operator[](int pIndex)
[] operator overload.
FBPropertyListTriggerGroup::operator[]
virtual FBTriggerGroup * operator[](int pIndex)
[] operator overload.
FBPropertyDouble
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
Definition: fbproperties.h:1340
FBPropertyListMotionClip::RemoveAt
virtual void RemoveAt(int pIndex)
Remove the component at pIndex from list.
FBTriggerSource
FBTriggerSource
Trigger Sources.
Definition: fbtrigger.h:145
kFBTriggerTypeDeactivate
@ kFBTriggerTypeDeactivate
Deactivate.
Definition: fbtrigger.h:200
kFBTriggerModeGlobal
@ kFBTriggerModeGlobal
Global.
Definition: fbtrigger.h:156
FBTriggerBranch::FBTriggerBranch
FBTriggerBranch(char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyListModel
List: Model
Definition: fbmodel.h:97
FBTrigger::Type
FBPropertyTriggerType Type
Trigger type.
Definition: fbtrigger.h:222
FBMotionClip::FBMotionClip
FBMotionClip(char *pName, char *pFilename, HIObject pObject=NULL)
Constructor.
kFBTriggerTypeActivateRepeat
@ kFBTriggerTypeActivateRepeat
Activate Repeat.
Definition: fbtrigger.h:201
FBTriggerGroup::Active
FBPropertyBool Active
Property: Is trigger group active?
Definition: fbtrigger.h:181
FBPropertyListTrigger::RemoveAt
virtual void RemoveAt(int pIndex)
Remove property at pIndex.
FBPropertyListMotionClip::Add
virtual int Add(FBMotionClip *pItem)
Add an MotionClip to the property list.
FBTriggerGroup::Name
FBPropertyString Name
Property: Name of trigger group.
Definition: fbtrigger.h:180
__FBClassDeclare
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FBPropertyListTrigger
PropertyList: Trigger
Definition: fbtrigger.h:92
__FB_FORWARD
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPropertyBaseList
Definition: fbproperties.h:893
FBPropertyListTrigger::GetCount
virtual int GetCount()
Get the number of properties in the list.
FBTriggerGroup::Mode
FBPropertyTriggerMode Mode
Property: Motion clip play mode.
Definition: fbtrigger.h:183
FBTrigger::FBTrigger
FBTrigger(char *pName=NULL, HIObject pObject=NULL)
Constructor.
FBPropertyListTriggerGroup::GetCount
virtual int GetCount()
Get the number of properties in the list.
FBTriggerGroup::MotionClips
FBPropertyListMotionClip MotionClips
List: Motion clips for the group.
Definition: fbtrigger.h:188
kFBTriggerTypeOff
@ kFBTriggerTypeOff
Off.
Definition: fbtrigger.h:198
FBTriggerGroup::Nodes
FBPropertyListModel Nodes
List: Nodes to be animated (note must be in a hierarchy).
Definition: fbtrigger.h:186
FBPropertyListTriggerBranch::Add
virtual int Add(FBTriggerBranch *pItem)
Add an TriggerBranch to the property list.
FBTriggerGroup::FBTriggerGroup
FBTriggerGroup(char *pName=NULL, HIObject pObject=NULL)
Constructor.
kFBTriggerModeGlobalMatch
@ kFBTriggerModeGlobalMatch
Global Match.
Definition: fbtrigger.h:157
FBTrigger
Definition: fbtrigger.h:208
FBTriggerGroup::Triggers
FBPropertyListTrigger Triggers
List: Triggers for the group.
Definition: fbtrigger.h:187
kFBTriggerModeLocal
@ kFBTriggerModeLocal
Local.
Definition: fbtrigger.h:155
kFBTriggerSourceJoystick2
@ kFBTriggerSourceJoystick2
Joystick2.
Definition: fbtrigger.h:149
FBPropertyBool
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Definition: fbproperties.h:1308
FBPropertyListTriggerBranch::RemoveAt
virtual void RemoveAt(int pIndex)
Remove property at pIndex.
FBTriggerGroup
Definition: fbtrigger.h:165
FBPropertyListTrigger::Add
virtual int Add(FBTrigger *pItem)
Add a trigger to the property list.
FBMotionClip
Motion class.
Definition: fbmotion.h:68
kFBTriggerTypeDeactivateRepeat
@ kFBTriggerTypeDeactivateRepeat
Deacticate Repeat.
Definition: fbtrigger.h:202
kFBTriggerTypeActivate
@ kFBTriggerTypeActivate
Activate.
Definition: fbtrigger.h:199
FBPropertyListTriggerBranch
PropertyList: TriggerBranch
Definition: fbtrigger.h:126
kFBTriggerSourceKeyboard
@ kFBTriggerSourceKeyboard
Keyboard.
Definition: fbtrigger.h:147
FB_DEFINE_COMPONENT
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
FBPropertyListTriggerGroup::RemoveAt
virtual void RemoveAt(int pIndex)
Remove property at pIndex.
FBPropertyListMotionClip
List: MotionClip
Definition: fbmotion.h:92
FBTriggerType
FBTriggerType
Trigger Types.
Definition: fbtrigger.h:197
FBTriggerMode
FBTriggerMode
Trigger Mode.
Definition: fbtrigger.h:154
FBTriggerBranch
Definition: fbtrigger.h:251
FBPropertyString
Property class: const char * (String).
Definition: fbproperties.h:1281
FBTriggerGroup::Source
FBPropertyTriggerSource Source
Property: Source of triggering information.
Definition: fbtrigger.h:182
FBComponent
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
FBPropertyListTriggerGroup::Add
virtual int Add(FBTriggerGroup *pItem)
Add a TriggerGroup to the property list.
FBTriggerGroup::Speed
FBPropertyDouble Speed
Property: Motion clip speed.
Definition: fbtrigger.h:184
FBTrigger::Name
FBPropertyString Name
Name of trigger.
Definition: fbtrigger.h:221
FBPropertyListMotionClip::GetCount
virtual int GetCount()
Get the Component count.
kFBTriggerModeGlobalGravityMatch
@ kFBTriggerModeGlobalGravityMatch
Global Gravity Match.
Definition: fbtrigger.h:158