box.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: box.h,v 1.9.16.1 2007-03-25 21:26:07 oliver Exp $
00005 //
00006 
00007 #ifndef BALL_VIEW_PRIMITIV_BOX_H
00008 #define BALL_VIEW_PRIMITIV_BOX_H
00009 
00010 #ifndef BALL_VIEW_KERNEL_GEOMETRICOBJECT_H
00011 # include <BALL/VIEW/KERNEL/geometricObject.h>
00012 #endif
00013 
00014 #ifndef BALL_MATHS_BOX3_H
00015 # include <BALL/MATHS/box3.h>
00016 #endif
00017 
00018 namespace BALL
00019 {
00020   namespace VIEW
00021   {
00022 
00030     class BALL_VIEW_EXPORT Box
00031       : public GeometricObject,
00032         public Box3
00033     {
00034       public:
00035 
00036       BALL_CREATE(Box)
00037 
00038       
00041 
00051       Box();
00052 
00055       Box(const Box& box);
00056 
00057       Box(const Vector3& point, 
00058           const Vector3& right_vector  = Vector3( 0, 1, 0),
00059           const Vector3& height_vector = Vector3(-1, 0, 0),
00060           float depth = 1);
00061 
00062 
00064 
00066 
00069       virtual ~Box();
00070 
00075       virtual void clear();
00076 
00078 
00081 
00084       void set(const Box& box);
00085 
00088       const Box& operator = (const Box& box);
00089 
00091 
00094 
00105       virtual bool isValid() const;
00106 
00117       virtual void dump(std::ostream&  s = std::cout, Size depth = 0) const;
00118       
00119       // Method to get all vertices from a geometric object
00120       virtual void getVertices(vector<Vector3>& vertices) const;
00122     };
00123 
00124   } // namespace VIEW
00125 } // namespace BALL
00126 
00127 #endif // BALL_VIEW_PRIMITIV_BOX_H