00001 //<<<<<< INCLUDES >>>>>> 00002 00003 #include "Iguana/GLBrowsers/interface/IgOIVExtension.h" 00004 #include "Iguana/GLBrowsers/interface/Ig3DSystem.h" 00005 #include "Iguana/GLBrowsers/interface/IgIVView.h" 00006 #include "Iguana/Studio/interface/IgDocument.h" 00007 #include "Iguana/Studio/interface/IgPage.h" 00008 #include "Iguana/Studio/interface/IgStudioDriver.h" 00009 #include "Iguana/Studio/interface/IgQtSite.h" 00010 00011 //<<<<<< PRIVATE DEFINES >>>>>> 00012 //<<<<<< PRIVATE CONSTANTS >>>>>> 00013 //<<<<<< PRIVATE TYPES >>>>>> 00014 //<<<<<< PRIVATE VARIABLE DEFINITIONS >>>>>> 00015 //<<<<<< PUBLIC VARIABLE DEFINITIONS >>>>>> 00016 //<<<<<< CLASS STRUCTURE INITIALIZATION >>>>>> 00017 00018 IG_DEFINE_STATE_ELEMENT (IgOIVExtension, "Services/Studio/Session Types/Vis Example--Open Inventor File Reader; IvReader"); 00019 00020 //<<<<<< PRIVATE FUNCTION DEFINITIONS >>>>>> 00021 //<<<<<< PUBLIC FUNCTION DEFINITIONS >>>>>> 00022 //<<<<<< MEMBER FUNCTION DEFINITIONS >>>>>> 00023 00024 IgOIVExtension::IgOIVExtension (IgState *state) 00025 : m_state (state), 00026 m_view (0) 00027 { 00028 ASSERT (m_state); 00029 m_state->put (s_key, this); 00030 } 00031 00032 IgOIVExtension::~IgOIVExtension () 00033 { delete m_view; } 00034 00035 bool 00036 IgOIVExtension::setup (IgStudioDriver *into) 00037 { 00038 ASSERT (into); 00039 00040 // Initialise SoQt if it hasn't been done yet. 00041 Ig3DSystem::init (m_state, IgQtSite::selfFrom (into->mainSite ())); 00042 00043 m_view = new IgIVView (new IgPage (new IgDocument (into))); 00044 00045 return true; 00046 }