00001 /* 00002 * Copyright (c) 2001 The AUTHORS 00003 * Romeu Andre' Pieritz, Ph.D. - romeu_pieritz@hotmail.com 00004 * Rafael Mendes, Eng. – mendes_rafael@yahoo.com 00005 * Rodrigo Ferraz de Andrade, Eng. – rferraz@iname.com 00006 * All rights reserved. 00007 * 00008 * Permission to use, copy and distribute this software and its 00009 * documentation for educational and personal use, without fee is hereby granted, 00010 * provided that the above copyright notice and the following 00011 * two paragraphs appear in all copies of this software. 00012 * 00013 * IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR 00014 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 00015 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS 00016 * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00017 * 00018 * THE AUTHORS SPECIFICALLY DISCLAIMS ANY WARRANTIES, 00019 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00020 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HERE UNDER IS 00021 * ON AN "AS IS" BASIS, AND THE AUTHORS HAVE NO OBLIGATION TO 00022 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 00023 * 00024 * SINMEC Lab. - CFD Sinflow Project - http://www.sinmec.ufsc.br/cfd 00025 */ 00026 00027 00028 // Visual C++ Precompiled Header Optimization 00029 00030 #ifdef _MSC_VER 00031 #pragma hdrstop 00032 #pragma warning( disable : 4786 4355 4250 4244 ) 00033 #endif // _MSC_VER 00034 00035 00036 // File Define 00037 #ifndef __CSFL_SYS_GEOM_POINT_H__ 00038 #define __CSFL_SYS_GEOM_POINT_H__ 00039 00040 // Include 00041 #include <csfl/sys/core/sflobject.h> 00042 00043 00044 // Namespace 00045 namespace csfl { 00046 00047 00048 class IPoint 00049 00054 00055 { 00056 public: 00058 static const IPoint zero, negative; 00059 00063 IPoint( int _x = 0, int _y = 0 ) : x(_x), y(_y) {} 00064 ~IPoint(){} 00065 00069 inline IPoint operator + ( const IPoint & _p ) const 00070 { return IPoint( x + _p.x, y + _p.y ); } 00071 00075 inline IPoint operator - ( const IPoint & _p ) const 00076 { return IPoint( x - _p.x, y - _p.y ); } 00077 00081 inline IPoint operator * ( double n ) const 00082 { return IPoint( (int)(x * n),(int)(y * n) ); } 00083 00087 inline IPoint operator / ( double n ) const 00088 { return IPoint( (int)(x / n),(int)(y / n) ); } 00089 00093 inline bool operator == ( const IPoint & _p ) const 00094 { return (_p.x == x && _p.y == y ); } 00095 00099 inline bool operator != ( const IPoint & _p ) const 00100 { return (_p.x != x && _p.y != y ); } 00101 00102 00103 public: 00105 int x, y; 00106 00107 }; 00108 00109 00110 } // csfl namespace 00111 00112 #endif// __CSFL_SYS_GEOM_POINT_H__
CFD Project
|
Documents |
Downloads |
Contact us |
Use Terms |
|
|||
© SINMEC/EMC/UFSC,
2001. |
All rights
reserved. |
Last Update: Jan. 18, 2002 |
|