home *** CD-ROM | disk | FTP | other *** search
- /*
- * BoundingBox.h - definition of class BoundingBox.
- *
- * Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
- * University of Berne, Switzerland
- * All rights reserved.
- *
- * This software may be freely copied, modified, and redistributed
- * provided that this copyright notice is preserved on all copies.
- *
- * You may not distribute this software, in whole or in part, as part of
- * any commercial product without the express consent of the authors.
- *
- * There is no warranty or other guarantee of fitness of this software
- * for any purpose. It is provided solely "as is".
- *
- */
-
- #ifndef BoundingBox_H
- # define BoundingBox_H
-
- #include "Vector.h"
-
- //___________________________________________________________ BoundingBox
-
- class TransMatrix;
-
- class BoundingBox
- {
- public:
- BoundingBox();
-
- void expand(const Vector&);
- void expand(const BoundingBox&);
- BoundingBox transform(const TransMatrix&) const;
- real xmin() const { return vmin[0]; }
- real xmax() const { return vmax[0]; }
- real ymin() const { return vmin[1]; }
- real ymax() const { return vmax[1]; }
- real zmin() const { return vmin[2]; }
- real zmax() const { return vmax[2]; }
-
- friend ostream& operator<<(ostream&, const BoundingBox&);
-
- private:
- Vector vmin, vmax;
- };
-
- #endif // BoundingBox
-
-