Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/chancfg/chanviewport.I

Go to the documentation of this file.
00001 // Filename: chanviewport.I
00002 // Created by:  cary (06Feb99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include <algorithm>
00020 
00021 INLINE ChanViewport::ChanViewport(void) {}
00022 
00023 INLINE ChanViewport::ChanViewport(float l, float r, float b, float t) :
00024   _left(l), _right(r), _bottom(b), _top(t) {
00025   if (_left > _right)
00026     swap(_left, _right);
00027   if (_bottom > _top)
00028     swap(_bottom, _top);
00029 }
00030 
00031 INLINE ChanViewport::ChanViewport(const ChanViewport& c) : _left(c._left),
00032                                                            _right(c._right),
00033                                                            _bottom(c._bottom),
00034                                                            _top(c._top) {}
00035 
00036 INLINE ChanViewport::~ChanViewport(void) {}
00037 
00038 INLINE ChanViewport& ChanViewport::operator=(const ChanViewport& c) {
00039   _left = c._left;
00040   _right = c._right;
00041   _bottom = c._bottom;
00042   _top = c._top;
00043   return *this;
00044 }
00045 
00046 INLINE float ChanViewport::left(void) const { return _left; }
00047 
00048 INLINE float ChanViewport::right(void) const { return _right; }
00049 
00050 INLINE float ChanViewport::bottom(void) const { return _bottom; }
00051 
00052 INLINE float ChanViewport::top(void) const { return _top; }

Generated on Fri May 2 00:35:19 2003 for Panda by doxygen1.3