00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright 2000-2002 by OpenSG Forum * 00006 * * 00007 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00008 * * 00009 \*---------------------------------------------------------------------------*/ 00010 /*---------------------------------------------------------------------------*\ 00011 * License * 00012 * * 00013 * This library is free software; you can redistribute it and/or modify it * 00014 * under the terms of the GNU Library General Public License as published * 00015 * by the Free Software Foundation, version 2. * 00016 * * 00017 * This library is distributed in the hope that it will be useful, but * 00018 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00020 * Library General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU Library General Public * 00023 * License along with this library; if not, write to the Free Software * 00024 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00025 * * 00026 \*---------------------------------------------------------------------------*/ 00027 /*---------------------------------------------------------------------------*\ 00028 * Changes * 00029 * * 00030 * * 00031 * * 00032 * * 00033 * * 00034 * * 00035 \*---------------------------------------------------------------------------*/ 00036 00037 #include <stdlib.h> 00038 #include <stdio.h> 00039 00040 #include "OSGConfig.h" 00041 00042 OSG_BEGIN_NAMESPACE 00043 00044 /*------------------------------- size ----------------------------------*/ 00045 00048 inline Int32 Viewport::getPixelWidth( void ) const 00049 { 00050 return getPixelRight() - getPixelLeft() + 1; 00051 } 00052 00055 inline Int32 Viewport::getPixelHeight( void ) const 00056 { 00057 return getPixelTop() - getPixelBottom() + 1; 00058 } 00059 00060 /*---------------------------- properties ---------------------------------*/ 00061 00066 inline void Viewport::setSize( Real32 left, Real32 bottom, Real32 right, 00067 Real32 top ) 00068 { 00069 _sfLeft.setValue( left ); 00070 _sfRight.setValue( right ); 00071 _sfBottom.setValue( bottom ); 00072 _sfTop.setValue( top ); 00073 } 00074 00075 00076 OSG_END_NAMESPACE 00077 00078 #define OSGVIEWPORT_INLINE_CVSID "@(#)$Id: FCTemplate_inl.h,v 1.7 2001/09/17 14:15:07 vossg Exp $" 00079
1.5.5