fbsdk/fbtrigger.h Source File
 
 
 
fbsdk/fbtrigger.h
Go to the documentation of this file.
00001 #ifndef __FBTRIGGER_H__
00002 #define __FBTRIGGER_H__
00003 /**************************************************************************
00004  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
00005  All Rights Reserved.
00006  
00007  The coded instructions, statements, computer programs, and/or related 
00008  material (collectively the "Data") in these files contain unpublished 
00009  information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010  protected by Canada and United States of America federal copyright law 
00011  and by international treaties.
00012  
00013  The Data may not be disclosed or distributed to third parties, in whole 
00014  or in part, without the prior written consent of Autodesk, Inc. 
00015  ("Autodesk").
00016  
00017  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024  FREE.
00025  
00026  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036  
00037 **************************************************************************/
00038 
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL 
00045 
00048         #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050 
00051 #ifdef FBSDKUseNamespace
00052         namespace FBSDKNamespace {
00053 #endif
00054 
00055 __FB_FORWARD( FBTriggerGroup                            );
00056 __FB_FORWARD( FBTrigger                                         );
00057 __FB_FORWARD( FBMotionClip                                      );
00058 __FB_FORWARD( FBTriggerBranch                           );
00059 
00060 __FB_FORWARD( FBPropertyListTriggerGroup        );
00061 __FB_FORWARD( FBPropertyListTrigger                     );
00062 __FB_FORWARD( FBPropertyListMotionClip          );
00063 __FB_FORWARD( FBPropertyListTriggerBranch       );
00064 
00065 FB_DEFINE_COMPONENT( FBSDK_DLL, TriggerGroup    );
00066 FB_DEFINE_COMPONENT( FBSDK_DLL, Trigger         );
00067 FB_DEFINE_COMPONENT( FBSDK_DLL, MotionClip              );
00068 FB_DEFINE_COMPONENT( FBSDK_DLL, TriggerBranch   );
00069 
00071 // FBPropertyListTriggerGroup
00074 class FBSDK_DLL FBPropertyListTriggerGroup : public FBPropertyBaseList< FBTriggerGroup* >
00075 {
00076 public:
00081         virtual int      Add    ( FBTriggerGroup* pItem );
00082     virtual void RemoveAt( int pIndex );
00083         virtual FBTriggerGroup* operator[](int pIndex);
00084         virtual int  GetCount();
00085 };
00086 
00088 // FBPropertyListTrigger
00091 class FBSDK_DLL FBPropertyListTrigger : public FBPropertyBaseList< FBTrigger* >
00092 {
00093 public:
00098         virtual int      Add    ( FBTrigger* pItem );
00099     virtual void RemoveAt( int pIndex );
00100         virtual FBTrigger* operator[](int pIndex);
00101         virtual int  GetCount();
00102 };
00103 
00105 // FBPropertyListMotionClip
00108 class FBSDK_DLL FBPropertyListMotionClip : public FBPropertyBaseList< FBMotionClip* >
00109 {
00110 public:
00115         virtual int      Add    ( FBMotionClip* pItem );
00116     virtual void RemoveAt( int pIndex );
00117         virtual FBMotionClip* operator[](int pIndex);
00118         virtual int  GetCount();
00119 };
00120 
00122 // FBPropertyListTriggerBranch
00125 class FBSDK_DLL FBPropertyListTriggerBranch : public FBPropertyBaseList< FBTriggerBranch* >
00126 {
00127 public:
00132         virtual int      Add    ( FBTriggerBranch* pItem );
00133     virtual void RemoveAt( int pIndex );
00134         virtual FBTriggerBranch* operator[](int pIndex);
00135         virtual int  GetCount();
00136 };
00137 
00138 
00140 // FBTrigger
00143 
00144 enum FBTriggerSource    
00145 { 
00146         kFBTriggerSourceDefault,        
00147         kFBTriggerSourceKeyboard,       
00148         kFBTriggerSourceJoystick1,      
00149         kFBTriggerSourceJoystick2       
00150 };
00152 
00153 enum FBTriggerMode
00154 {
00155         kFBTriggerModeLocal,                            
00156         kFBTriggerModeGlobal,                           
00157         kFBTriggerModeGlobalMatch,                      
00158         kFBTriggerModeGlobalGravityMatch        
00159 };
00160 
00161 FB_DEFINE_ENUM( FBSDK_DLL, TriggerSource        );
00162 FB_DEFINE_ENUM( FBSDK_DLL, TriggerMode          );
00163 
00164 class FBSDK_DLL FBTriggerGroup : public FBComponent
00165 {
00166         //--- Open Reality declaration.
00167         __FBClassDeclare( FBTriggerGroup, FBComponent );
00168 
00169 public:
00174         FBTriggerGroup(char* pName = NULL, HIObject pObject = NULL);
00175 
00176         IObject_Declare(K_IMPLEMENTATION);              // Interface to IObject.
00177 
00178         void Synchronize();
00179 
00180         FBPropertyString                Name;                   
00181         FBPropertyBool                  Active;                 
00182         FBPropertyTriggerSource Source;                 
00183         FBPropertyTriggerMode   Mode;                   
00184         FBPropertyDouble                Speed;                  
00185 
00186         FBPropertyListModel                     Nodes;                  
00187         FBPropertyListTrigger           Triggers;               
00188         FBPropertyListMotionClip        MotionClips;    
00189 };
00190 
00192 // FBTrigger
00195 
00196 enum FBTriggerType
00197 {
00198         kFBTriggerTypeOff,                              
00199         kFBTriggerTypeActivate,                 
00200         kFBTriggerTypeDeactivate,               
00201         kFBTriggerTypeActivateRepeat,   
00202         kFBTriggerTypeDeactivateRepeat  
00203 };
00204 
00205 FB_DEFINE_ENUM( FBSDK_DLL, TriggerType );
00206 
00207 class FBSDK_DLL FBTrigger       : public FBComponent
00208 {
00209         //--- Open Reality declaration.
00210         __FBClassDeclare( FBTrigger, FBComponent );
00211 
00212 public:
00217         FBTrigger(char* pName = NULL, HIObject pObject = NULL);
00218 
00219         IObject_Declare(K_IMPLEMENTATION);      // Interface to IObject.
00220 
00221         FBPropertyString                Name;           
00222         FBPropertyTriggerType   Type;           
00223 };
00224 
00226 // FBMotionClip
00228 class FBSDK_DLL FBMotionClip    : public FBComponent
00229 {
00230         //--- Open Reality declaration.
00231         __FBClassDeclare( FBMotionClip, FBComponent );
00232 
00233 public:
00239         FBMotionClip(char* pName, char* pFilename, HIObject pObject = NULL);
00240 
00241         IObject_Declare(K_IMPLEMENTATION);              // Interface to IObject.
00242 
00243         FBPropertyString                Name;           
00244         FBPropertyString                Filename;       
00245 };
00246 
00248 // FBTriggerBranch
00250 class FBSDK_DLL FBTriggerBranch : public FBComponent
00251 {
00252         //--- Open Reality declaration.
00253         __FBClassDeclare( FBTriggerBranch, FBComponent );
00254 
00255 public:
00260         FBTriggerBranch(char* pName, HIObject pObject = NULL);
00261 
00262         IObject_Declare(K_IMPLEMENTATION);              // Interface to IObject.
00263 
00264         FBPropertyMotionClip    MotionClip;             
00265         FBPropertyTrigger               Trigger;                
00266 };
00267 
00268 #ifdef FBSDKUseNamespace
00269         }
00270 #endif
00271 #endif /* _FB_TRIGGER_H_ */