00001 /**************************************************************************** 00002 * VCGLib o o * 00003 * Visual and Computer Graphics Library o o * 00004 * _ O _ * 00005 * Copyright(C) 2004 \/)\/ * 00006 * Visual Computing Lab /\/| * 00007 * ISTI - Italian National Research Council | * 00008 * \ * 00009 * All rights reserved. * 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 * This program is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00019 * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * 00020 * for more details. * 00021 * * 00022 ****************************************************************************/ 00023 /**************************************************************************** 00024 History 00025 00026 $Log: not supported by cvs2svn $ 00027 Revision 1.2 2005/12/12 11:24:09 ganovelli 00028 missing type added 00029 00030 Revision 1.1 2004/03/16 03:08:17 tarini 00031 first version 00032 00033 00034 ****************************************************************************/ 00035 00036 #ifndef __VCGLIB_LINEAR 00037 #define __VCGLIB_LINEAR 00038 00039 namespace vcg { 00055 template <class T> 00056 class Linear{ 00057 public: 00058 typedef T ScalarType; 00059 inline void SetZero(); 00060 T operator + ( T const & p) const; 00061 T operator - ( T const & p) const; 00062 T operator * ( const ScalarType ); 00063 T operator / ( const ScalarType ) const; 00064 T & operator += ( T const & ); 00065 T & operator -= ( T const & ); 00066 T & operator *= ( const ScalarType ); 00067 T & operator /= ( const ScalarType ); 00068 T operator - () const; 00069 }; 00070 }; 00071 00072 #endif