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

Surface.hpp

00001 /*
00002  *  $Id: Surface_8hpp-source.html,v 1.1.1.1 2002/06/12 22:58:44 cgagne Exp $
00003  *
00004  *  LOSR -- Library for Optical Systems Raytracing
00005  *  Copyright (C) 2001 by Christian Gagné and Julie Beaulieu
00006  *
00007  *  This library is free software; you can redistribute it and/or
00008  *  modify it under the terms of the GNU Lesser General Public
00009  *  License as published by the Free Software Foundation; either
00010  *  version 2.1 of the License, or (at your option) any later version.
00011  *
00012  *  This library is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *  Lesser General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU Lesser General Public
00018  *  License along with this library; if not, write to the Free Software
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  */
00022 
00023 #ifndef LOSR_Surface_hpp
00024 #define LOSR_Surface_hpp
00025 
00026 #include <iostream>
00027 
00028 namespace LOSR {
00029 
00041 class Surface {
00042 
00043 public:
00044   Surface(double inCurvature=0, double inIndex=0, double inAperture=0, double inThickness=0);
00045   ~Surface() {}       
00046 
00047   double getAperture() const {return mAperture;}      
00048   double getCurvature() const {return mCurvature;}  
00049   double getIndex() const {return mIndex;}          
00050   double getThickness() const {return mThickness;}  
00051   void   read(std::istream& ioIs=std::cin);
00052   void   setAperture(double inAperture) {mAperture=inAperture;}     
00053   void   setCurvature(double inCurvature) {mCurvature=inCurvature;} 
00054   void   setIndex(double inIndex) {mIndex=inIndex;}                   
00055   void   setThickness(double inThickness) {mThickness=inThickness;} 
00056   void   write(std::ostream& ioOs=std::cout) const;
00057 
00058 protected:
00059   double mCurvature;  
00060   double mIndex;      
00061   double mAperture;   
00062   double mThickness;  
00063 
00064 };
00065 
00066 }
00067 
00068 
00074 inline std::istream& operator>>(
00075   std::istream&     ioIs,       
00076   LOSR::Surface& outSurface     
00077 )
00078 {
00079   outSurface.read(ioIs);
00080   return ioIs;
00081 }
00082 
00088 inline std::ostream& operator<<(
00089   std::ostream& ioOs,             
00090   const LOSR::Surface& inSurface  
00091 )
00092 {
00093   inSurface.write(ioOs);
00094   return ioOs;
00095 }
00096 
00097 #endif // LOSR_Surface_hpp

Generated at Sat Dec 22 10:58:13 2001 for Library for Optical Systems Raytracing by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001