00001 /********************************************************************** 00002 *< 00003 FILE: ILinkTMCtrl.h 00004 00005 DESCRIPTION: Interface for FileLink's LinkTMCtrl 00006 00007 CREATED BY: Stew Sabadell 00008 00009 HISTORY: 00010 00011 *> Copyright (c) 2005, All Rights Reserved. 00012 **********************************************************************/ 00013 #pragma once 00014 00015 #include "maxheap.h" 00016 #include "control.h" 00017 #include "AnimatableInterfaceIDs.h" 00018 // forward declarations 00019 class Matrix3; 00020 class Point3; 00021 class Control; 00022 class Object; 00023 class INode; 00024 class Interface; 00025 00026 // This Class_ID can be used to create an instance of the implementation class. 00027 #define LINKTMCTRL_CLASSID Class_ID(0x615b56e4, 0x5f0e6032) 00028 00029 class ILinkTMCtrl : public MaxHeapOperators //: public BaseInterface 00030 { 00031 public: 00032 // BaseInterface methods 00033 //virtual Interface_ID GetID() { return ILINKTMCTRL_INTERFACE_ID; } 00034 00035 virtual void SetLinkTM(Matrix3 tm) = 0; 00036 virtual Matrix3 GetLinkTM() const = 0; 00037 virtual Point3 GetScales() const = 0; 00038 00039 // Creates the subcontroller, makes a reference to it, and returns a pointer 00040 // to the subcontroller. 00041 virtual Control* CreateSubController() = 0; 00042 }; 00043 00045 00050 class ISubTargetCtrl : public MaxHeapOperators { 00051 public: 00053 virtual bool CanAssignTMController() const = 0; 00054 00056 00057 virtual void AssignTMController(Control* tm) = 0; 00058 00060 virtual Control* GetTMController() const = 0; 00061 }; 00062 00063 // This inline give you an easy way to retrieve the interface ptr from a control; 00064 // I did it as an inline to provide type-checking. It returns NULL if either the 00065 // Control ptr is NULL, or it does not support the I_LINKTMCTRL interface. 00066 inline ILinkTMCtrl* GetLinkTMInterface(Control* c) { return c ? (ILinkTMCtrl*)c->GetInterface(I_LINKTMCTRL) : NULL; } 00067 00068 // This inline give you an easy way to retrieve the version 2 interface ptr from a control; 00069 // I did it as an inline to provide type-checking. 00071 00074 inline ISubTargetCtrl* GetSubTargetInterface(Control* c) { return c ? (ISubTargetCtrl*)c->GetInterface(I_SUBTARGETCTRL) : NULL; } 00075 00076