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 //--------------------------------------------------------------------------- 00040 // Includes 00041 //--------------------------------------------------------------------------- 00042 00043 #include <stdlib.h> 00044 #include <stdio.h> 00045 00046 #include <OSGConfig.h> 00047 00048 #include <OSGGL.h> 00049 #include <OSGNodePtr.h> 00050 #include <OSGCamera.h> 00051 #include <OSGBackground.h> 00052 #include <OSGForeground.h> 00053 #include <OSGDrawAction.h> 00054 #include <OSGRenderAction.h> 00055 #include "OSGPassiveViewport.h" 00056 00057 OSG_USING_NAMESPACE 00058 00059 /***************************************************************************\ 00060 * Description * 00061 \***************************************************************************/ 00062 00071 /*----------------------- constructors & destructors ----------------------*/ 00072 00073 PassiveViewport::PassiveViewport(void) : 00074 Inherited() 00075 { 00076 } 00077 00078 PassiveViewport::PassiveViewport(const PassiveViewport &source) : 00079 Inherited(source) 00080 { 00081 } 00082 00083 PassiveViewport::~PassiveViewport(void) 00084 { 00085 } 00086 00087 /*----------------------------- class specific ----------------------------*/ 00088 00089 void PassiveViewport::initMethod (void) 00090 { 00091 } 00092 00093 void PassiveViewport::changed(BitVector whichField, UInt32 origin) 00094 { 00095 Inherited::changed(whichField, origin); 00096 } 00097 00098 void PassiveViewport::dump( UInt32 , 00099 const BitVector ) const 00100 { 00101 SLOG << "Dump PassiveViewport NI" << std::endl; 00102 } 00103 00104 void PassiveViewport::activateSize(void) 00105 { 00106 GLint vp[4]; 00107 glGetIntegerv(GL_VIEWPORT, vp); 00108 00109 setLeft (Real32(vp[0])); 00110 setBottom(Real32(vp[1])); 00111 setRight (Real32(vp[0] + vp[2])); 00112 setTop (Real32(vp[1] + vp[3])); 00113 00114 Inherited::activateSize(); 00115 } 00116 00117 void PassiveViewport::activate(void) 00118 { 00119 Inherited::activate(); 00120 } 00121 00122 void PassiveViewport::deactivate(void) 00123 { 00124 Inherited::deactivate(); 00125 } 00126 00127 void PassiveViewport::draw( DrawAction * action ) 00128 { 00129 Inherited::draw(action); 00130 } 00131 00132 00133 void PassiveViewport::render(RenderActionBase *action) 00134 { 00135 Inherited::render(action); 00136 } 00137 00138 00139 /*-------------------------------------------------------------------------*/ 00140 /* cvs id's */ 00141 00142 #ifdef __sgi 00143 #pragma set woff 1174 00144 #endif 00145 00146 #ifdef OSG_LINUX_ICC 00147 #pragma warning( disable : 177 ) 00148 #endif 00149 00150 namespace 00151 { 00152 static char cvsid_cpp[] = "@(#)$Id: OSGPassiveViewport.cpp,v 1.6 2002/06/30 05:04:24 vossg Exp $"; 00153 static char cvsid_hpp[] = OSGPASSIVEVIEWPORT_HEADER_CVSID; 00154 static char cvsid_inl[] = OSGPASSIVEVIEWPORT_INLINE_CVSID; 00155 }
1.5.5