Open Reality Reference Guide
fbdeck.h
Go to the documentation of this file.
1 #ifndef __FBDECK_H__
2 #define __FBDECK_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 
64 #define FBRegisterDeck( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
65  HIObject RegisterDeck##ClassName( HIObject /*pOwner*/,const char* pName,void * /*pData*/) \
66  { \
67  ClassName *Class = new ClassName(pName); \
68  Class->UniqueName = UniqueNameStr; \
69  if (Class->FBCreate()) { \
70  Class->ThreadSync(); \
71  return Class->GetHIObject(); \
72  } else { \
73  delete Class; \
74  return NULL; \
75  } \
76  } \
77  FBLibraryModule( ClassName ) \
78  { \
79  FBRegisterObject( ClassName,"Decks",Label,Description,RegisterDeck##ClassName, true, IconFilename ); \
80  }
81 
85 #define FBDeckDeclare( ClassName ) \
86  FBClassDeclare( ClassName,FBDeck ); \
87  public: \
88  ClassName(const char* pName):FBDeck(pName) { FBClassInit; } \
89  private:
90 
94 #define FBDeckImplementation( ThisComponent ) \
95  FBClassImplementation( ThisComponent )
96 
98 // FBDeck
101 //
102 
107  /*K_DEPRECATED_2022*/ kFBDeckTransportSlave = kFBDeckTransportSync,
110 };
111 
112 FB_DEFINE_ENUM ( FBSDK_DLL, DeckTransportMode );
114 
116 class FBSDK_DLL FBDeck : public FBComponent {
118 public:
119  const char* UniqueName;
120  void ThreadSync();
121 
126  FBDeck(const char* pName, HIObject pObject=NULL);
127 
128  IObject_Declare(override);
129 
130  //--- Real-Time deck callback
131  virtual void DeckStatusUpdateNotify();
132  virtual void DeckAutoCommandsNotify();
133 
134  //--- Operations
135  virtual void Rewind ();
136  virtual void Stop ();
140  virtual void Play (double pSpeed = 1.0);
141  virtual void Forward ();
145  virtual void ReversePlay (double pSpeed = 1.0);
146  virtual void StepBack ();
147  virtual void StepForward ();
148  virtual void Eject ();
152  virtual void CueAt (FBTime pTime);
153 
154  //--- Time
158  virtual FBTime GetTime ();
159 
160  //--- FBX store/retrieve
162  virtual bool FbxStore ( FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat );
164  virtual bool FbxRetrieve ( FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat );
166 
167  //--- Icon
169 
170  //--- Settings
176  FBPropertyDeckTransportMode TransportControl;
177 
178  //--- State
184 };
185 
187 // FBPropertyListDeck
191 {
192 public:
198  FBDeck* operator[](int pIndex);
199 };
200 
201 #ifdef FBSDKUseNamespace
202  }
203 #endif
204 #endif
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
Interface to a tape deck.
Definition: fbdeck.h:116
virtual void Forward()
Fast forward.
virtual FBTime GetTime()
Get the deck's time.
FBPropertyTime PreRoll
Read Write Property: Pre-Roll.
Definition: fbdeck.h:174
virtual void StepForward()
Step forwards.
FBPropertyTime PostRoll
Read Write Property: Post-Roll.
Definition: fbdeck.h:175
FBPropertyBool CassetteInside
Read Only Property: Is the cassette inside?
Definition: fbdeck.h:179
virtual void DeckStatusUpdateNotify()
Interface to IObject.
FBPropertyBool PlayingBackward
Read Only Property: Playing backwards?
Definition: fbdeck.h:181
FBPropertyBool EE
Read Write Property: Is EE on?
Definition: fbdeck.h:182
FBPropertyBool PlayingForward
Read Only Property: Playing forward?
Definition: fbdeck.h:180
FBPropertyTime Offset
Read Write Property: Current offset for the TC.
Definition: fbdeck.h:172
FBDeck(const char *pName, HIObject pObject=NULL)
Constructor.
virtual void DeckAutoCommandsNotify()
Deck auto commands notification.
virtual void CueAt(FBTime pTime)
Cue deck at a given time.
virtual void Rewind()
Rewind.
const char * UniqueName
internal Unique name.
Definition: fbdeck.h:119
virtual void Play(double pSpeed=1.0)
Play forwards.
FBPropertyDeckTransportMode TransportControl
Read Write Property: Mode w/r to TC (None, Sync, Main );
Definition: fbdeck.h:176
FBPropertyBool StandBy
Read Write Property: In standby mode?
Definition: fbdeck.h:183
virtual void ReversePlay(double pSpeed=1.0)
Play backwards.
virtual void Eject()
Eject tape.
FBPropertyBool Online
Read Write Property: Is deck online?
Definition: fbdeck.h:171
virtual void StepBack()
Step backwards.
FBPropertyString IconFilename
Read Write Property: Filename of icon for deck.
Definition: fbdeck.h:168
FBPropertyTime Latency
Read Write Property: Latency of response for the deck;
Definition: fbdeck.h:173
virtual void Stop()
Stop.
FBX file interface.
Definition: fbfbx.h:80
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:536
PropertyList: Deck
Definition: fbdeck.h:191
FBDeck * operator[](int pIndex)
Get the deck at pIndex.
Property class: const char * (String).
Time data structure.
Definition: fbtime.h:88
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: fbdeck.h:48
FBDeckTransportMode
FBDeckTransportMode.
Definition: fbdeck.h:104
@ kFBDeckTransportNone
No transport interaction.
Definition: fbdeck.h:105
@ kFBDeckTransportSlave
Definition: fbdeck.h:107
@ kFBDeckTransportSync
Sync to transport controls.
Definition: fbdeck.h:106
@ kFBDeckTransportMain
Transport main.
Definition: fbdeck.h:108
@ kFBDeckTransportMaster
Definition: fbdeck.h:109
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
class K_DLLIMPORT FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
Definition: fbtypes.h:74
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68