Page principale | Hiérarchie des classes | Liste alphabétique | Liste des classes | Liste des fichiers | Membres de classe

C:/Projects/ngn/include/aabb.h

00001 /***************************************************************************
00002  *            aabb.h
00003  *
00004  *  Sun Feb  1 12:12:39 2004
00005  *  Copyright  2004  thierry schartz
00006  *  thierry.schartz@bluebottle.com
00007  ****************************************************************************/
00008 /*
00009  *  This program is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  This program is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU Library General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with this program; if not, write to the Free Software
00021  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022  */
00023 
00024 #ifndef _AABB_H
00025 #define _AABB_H
00026 
00027 #ifdef WIN32
00028 #include <windows.h>
00029 #endif
00030 
00031 #include "vector3d.h"
00032 
00033 namespace ngn {
00034         namespace core {
00035 
00041                 class NGN_API AABB
00042                 {
00043                 public:
00045                         AABB();
00047                         AABB( const AABB& other );
00049                         AABB( const Vector3df& vmin, const Vector3df& vmax );
00051                         virtual ~AABB();
00053                         void setMin( const Vector3df& vmin );
00055                         void setMax( const Vector3df& vmax );
00057                         void setPosition( const Vector3df& pos );
00059                         void scale( float factor );
00061                         const Vector3df& getMin() const;
00063                         const Vector3df& getMax() const;
00065                         Vector3df getPosition() const;
00067                         Vector3df getMaxLength();
00068 
00069                 private:
00070                         //update min and max
00071                         void updateDim( const Vector3df& pos );
00072 
00073                         Vector3df m_min;
00074                         Vector3df m_max;
00075                         Vector3df m_pos;
00076                 };
00077 
00078 
00079         }//core
00080 }//ngn
00081 #endif /* _AABB_H */
00082 
00083 

Généré le Fri Nov 19 14:20:28 2004 pour NGN par  doxygen 1.3.9.1