SpikeStream Library  0.2
Box.h
Go to the documentation of this file.
00001 #ifndef BOX_H
00002 #define BOX_H
00003 
00004 //SpikeStream includes
00005 #include "Point3D.h"
00006 
00007 //Qt includes
00008 #include <QList>
00009 #include <QString>
00010 
00011 namespace spikestream {
00012 
00014     class Box {
00015                 public:
00016                         Box();
00017                         Box(float x1, float y1, float z1, float x2, float y2, float z2);
00018                         Box(const Box& box);
00019                         Box& operator=(const Box& rhs);
00020                         bool operator==(const Box& rhs);
00021                         ~Box();
00022                         Point3D centre() const;
00023                         bool contains(const Point3D& point) const;
00024                         static Box getEnclosingBox(const QList<Box>& boxList);
00025                         static Box getEnclosingBox(const QList<Point3D>& pointList);
00026                         static Box getEnclosingBox(const QList<Box>& boxList, const QList<Point3D>& pointList);
00027                         float getX1() const { return x1; }
00028                         float getX2() const { return x2; }
00029                         float getY1() const { return y1; }
00030                         float getY2() const { return y2; }
00031                         float getZ1() const { return z1; }
00032                         float getZ2() const { return z2; }
00033                         float getWidth() const;
00034                         float getLength() const;
00035                         float getHeight() const;
00036                         void expand_percent(float percent);
00037                         bool intersects(const Box& box) const;
00038                         void setCoordinates(float x1, float y1, float z1, float x2, float y2, float z2);
00039                         QString toString() const;
00040                         void translate(float dx, float dy, float dz);
00041 
00042                         float x1;
00043                         float y1;
00044                         float z1;
00045                         float x2;
00046                         float y2;
00047                         float z2;
00048 
00049                 private:
00050                         //========================  VARIABLES  =========================
00051 
00052     };
00053 
00054 }
00055 
00056 #endif//BOX_H
00057 
 All Classes Files Functions Variables Typedefs Defines