Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

ellipsoid.h

Go to the documentation of this file.
00001 // ellipsoid.h
00002 //
00003 // Copyright (C) 2002, Chris Laurel <claurel@shatters.net>
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 
00010 #ifndef _CELMATH_ELLIPSOID_H_
00011 #define _CELMATH_ELLIPSOID_H_
00012 
00013 #include "vecmath.h"
00014 
00015 template<class T> class Ellipsoid
00016 {
00017  public:
00018     Ellipsoid();
00019     Ellipsoid(const Vector3<T>&);
00020     Ellipsoid(const Point3<T>&, const Vector3<T>&);
00021  
00022  public:
00023     Point3<T> center;
00024     Vector3<T> axes;
00025 };
00026 
00027 typedef Ellipsoid<float>   Ellipsoidf;
00028 typedef Ellipsoid<double>  Ellipsoidd;
00029 
00030 
00031 template<class T> Ellipsoid<T>::Ellipsoid() :
00032     center(0, 0, 0), axes(1, 1, 1)
00033 {
00034 }
00035 
00036 template<class T> Ellipsoid<T>::Ellipsoid(const Vector3<T>& _axes) :
00037     center(0, 0, 0), axes(_axes)
00038 {
00039 }
00040 
00041 template<class T> Ellipsoid<T>::Ellipsoid(const Point3<T>& _center,
00042                                           const Vector3<T>& _axes) :
00043     center(_center), axes(_axes)
00044 {
00045 }
00046 
00047 #endif // _CELMATH_ELLIPSOID_H_
00048 

Generated on Sat Jan 14 22:30:32 2006 for Celestia by  doxygen 1.4.1