iXrefAtmos.h

Go to the documentation of this file.
00001 //**************************************************************************/
00002 // Copyright (c) 1998-2005 Autodesk, Inc.
00003 // All rights reserved.
00004 // 
00005 // These coded instructions, statements, and computer programs contain
00006 // unpublished proprietary information written by Autodesk, Inc., and are
00007 // protected by Federal copyright law. They may not be disclosed to third
00008 // parties or copied or duplicated in any form, in whole or in part, without
00009 // the prior written consent of Autodesk, Inc.
00010 //**************************************************************************/
00011 // DESCRIPTION: Interface to xref Atmospherics
00012 // AUTHOR: Attila Szabo - created Feb.03.2005
00013 //***************************************************************************/
00014 
00015 #pragma once
00016 
00017 #include "..\ifnpub.h"
00018 #include "..\sfx.h"
00019 
00020 
00021 // Forward declarations
00022 class Animatable;
00023 
00025 #define IID_XREF_ATMOS Interface_ID(0x2672319a, 0x657b4bc1)
00026 
00028 
00041 class IXRefAtmospheric : public Atmospheric, public FPMixinInterface
00042 {
00043 public:
00045     Class_ID ClassID() { return XREFATMOS_CLASS_ID; }       
00047     SClass_ID SuperClassID() { return ATMOSPHERIC_CLASS_ID; }
00048     
00050 
00055     virtual Atmospheric* GetSourceAtmospheric(bool resolveNestedXRef = false) = 0;
00056 
00058 
00061     static bool Is_IXRefAtmospheric(Animatable& animatable);
00062 
00063     using FPMixinInterface::GetInterface;
00065 
00069     static IXRefAtmospheric* GetInterface(InterfaceServer& is) {
00070         return static_cast<IXRefAtmospheric*>(is.GetInterface(IID_XREF_ATMOS));
00071     };
00072 
00073     // From FPMixinInterface
00074     virtual Interface_ID GetID() { return IID_XREF_ATMOS; }
00075     virtual FPInterfaceDesc* GetDesc() { return &mFPInterfaceDesc; }
00076     static FPInterfaceDesc mFPInterfaceDesc;
00077 
00078     // --- Function publishing
00079     enum {
00080         kfpGetSourceAtm,
00081     };
00082 
00083     BEGIN_FUNCTION_MAP
00084         FN_1(kfpGetSourceAtm, TYPE_REFTARG, GetSourceAtmospheric, TYPE_bool);
00085     END_FUNCTION_MAP
00086 };
00087 
00088 inline bool IXRefAtmospheric::Is_IXRefAtmospheric(Animatable& animatable) {
00089 
00090     return ((animatable.SuperClassID() == ATMOSPHERIC_CLASS_ID) &&
00091                     (animatable.ClassID() == XREFATMOS_CLASS_ID));
00092 }
00093