00001 /* ImLib3D 00002 * Copyright (c) 2001, ULP-IPB Strasbourg. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or (at 00007 * your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, but 00010 * WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00017 */ 00019 #ifndef _Geometry3D_hpp 00020 #define _Geometry3D_hpp 00021 00023 class Segment3D 00024 { 00025 public: 00026 Vect3Df p0; 00027 Vect3Df p1; 00028 Segment3D (Vect3Df _p0, Vect3Df _p1) : p0(_p0), p1(_p1) 00029 { 00030 ; 00031 } 00033 Segment3D& operator*=(const float& scale) 00034 { 00035 Vect3Df direction = p1-p0; 00036 direction *= scale; 00037 p1 = p0 + direction; 00038 return (*this); 00039 } 00040 }; 00041 00042 #endif// _Geometry3D_hpp