IObjectDisplay.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2010 Autodesk, Inc.  All rights reserved.
00003 //
00004 // Use of this software is subject to the terms of the Autodesk license
00005 // agreement provided at the time of installation or download, or which 
00006 // otherwise accompanies this software in either electronic or hard copy form.   
00007 //
00008 //
00009 
00010 #pragma once
00011 
00012 #include "./Types.h"
00013 #include "./MaterialRequiredStreams.h"
00014 #include "./RenderItemHandle.h"
00015 
00016 #include "../BaseInterface.h"
00017 
00020 #define IOBJECT_DISPLAY_INTERFACE_ID Interface_ID(0x39820fa0, 0x6311340d)
00021 
00022 namespace MaxSDK { namespace Graphics {
00023 
00035 class IObjectDisplay : public BaseInterface
00036 {
00037 public:
00038     IObjectDisplay() {}
00039     virtual ~IObjectDisplay() {}
00040 
00046     virtual bool RequiresSupportForLegacyDisplayMode() const = 0;
00047 
00055     virtual bool UpdateDisplay(
00056         unsigned long renderItemCategories, 
00057         const MaterialRequiredStreams& materialRequiredStreams, 
00058         TimeValue t) = 0;
00059 
00063     virtual const RenderItemHandleArray& GetRenderItems() const = 0;
00064 
00065     // from BaseInterface
00066     virtual Interface_ID GetID() {
00067         return IOBJECT_DISPLAY_INTERFACE_ID;
00068     }
00069 
00070     virtual BaseInterface* GetInterface(Interface_ID id) {
00071         if (id == IOBJECT_DISPLAY_INTERFACE_ID) {
00072             return this;
00073         }
00074 
00075         return BaseInterface::GetInterface(id);
00076     }
00077 
00078     // internally used only
00079     void SetDirtyFlag(unsigned long flags) {
00080         mFlags = flags;
00081     }
00082 
00083     unsigned long GetDirtyFlag() const {
00084         return mFlags;
00085     }
00086 
00087 private:
00088     unsigned long mFlags;
00089 };
00090 
00091 } } // end namespace