00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #include <cstdlib> 00040 #include <cstdio> 00041 00042 #include <sstream> 00043 #include <fstream> 00044 00045 #include <OSGConfig.h> 00046 00047 #include <OSGAction.h> 00048 #include <OSGCamera.h> 00049 #include <OSGRenderAction.h> 00050 #include <OSGSceneFileHandler.h> 00051 #include <OSGVolumeDraw.h> 00052 00053 #include "OSGAlgorithm.h" 00054 00055 #include "OSGFrameBufferObject.h" 00056 #include "OSGFrameBufferAttachment.h" 00057 00058 OSG_USING_NAMESPACE 00059 00060 // Documentation for this class is emited in the 00061 // OSGAlgorithmBase.cpp file. 00062 // To modify it, please change the .fcd file (OSGAlgorithm.fcd) and 00063 // regenerate the base file. 00064 00065 /*-------------------------------------------------------------------------*/ 00066 /* Sync */ 00067 00068 void Algorithm::changed(ConstFieldMaskArg whichField, 00069 UInt32 origin, 00070 BitVector details) 00071 { 00072 #if 0 00073 if(whichField & (UrlFieldMask)) 00074 { 00075 if(getAbsoluteUrl().empty()) 00076 { 00077 PathHandler *ph = SceneFileHandler::the()->getPathHandler(); 00078 00079 if(ph != NULL) 00080 { 00081 setAbsoluteUrl(ph->findFile(getUrl().c_str())); 00082 } 00083 00084 if(getAbsoluteUrl().empty()) 00085 { 00086 setAbsoluteUrl(getUrl()); 00087 } 00088 00089 setState(NOT_LOADED); 00090 } 00091 } 00092 if(whichField & (StateFieldMask | 00093 UrlFieldMask | 00094 VolumeFieldMask)) 00095 { 00096 for(UInt32 i = 0; i < _mfParents.size(); i++) 00097 { 00098 _mfParents[i]->invalidateVolume(); 00099 } 00100 } 00101 #endif 00102 00103 Inherited::changed(whichField, origin, details); 00104 } 00105 00106 /*-------------------------------------------------------------------------*/ 00107 /* Dump */ 00108 00109 void Algorithm::dump( UInt32 OSG_CHECK_ARG(uiIndent), 00110 const BitVector OSG_CHECK_ARG(bvFlags )) const 00111 { 00112 SLOG << "Dump VisitSubTree NI" << std::endl; 00113 } 00114 00115 /*-------------------------------------------------------------------------*/ 00116 /* Constructors */ 00117 00118 Algorithm::Algorithm(void) : 00119 Inherited() 00120 { 00121 } 00122 00123 Algorithm::Algorithm(const Algorithm &source) : 00124 Inherited(source) 00125 { 00126 } 00127 00128 /*-------------------------------------------------------------------------*/ 00129 /* Destructor */ 00130 00131 Algorithm::~Algorithm(void) 00132 { 00133 } 00134 00135 /*-------------------------------------------------------------------------*/ 00136 /* Draw */ 00137 00138 00139 /*-------------------------------------------------------------------------*/ 00140 /* loading */ 00141 00142 /*-------------------------------------------------------------------------*/ 00143 /* Init */ 00144 00145 void Algorithm::initMethod(InitPhase ePhase) 00146 { 00147 Inherited::initMethod(ePhase); 00148 00149 if(ePhase == TypeObject::SystemPost) 00150 { 00151 } 00152 } 00153