00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <Cube.hpp>
00021
00022 Cube::
00023 Cube(const Vertex& a,
00024 const Vertex& b)
00025 : Shape(cube),
00026 __lower(std::min (a.x(), b.x()),
00027 std::min (a.y(), b.y()),
00028 std::min (a.z(), b.z())),
00029 __higher(std::max (a.x(), b.x()),
00030 std::max (a.y(), b.y()),
00031 std::max (a.z(), b.z()))
00032 {
00033 ;
00034 }
00035
00036 Cube::
00037 Cube(const Cube& C)
00038 : Shape(C),
00039 __lower (C.__lower),
00040 __higher(C.__higher)
00041 {
00042 ;
00043 }
00044
00045 std::ostream& Cube::
00046 __put(std::ostream& os) const
00047 {
00048 os << "box {\n" << __lower
00049 << ", " << __higher << '\n';
00050 for (size_t i=0; i<numberOfTransformations(); ++i)
00051 os << __trans[i]->povWrite() << '\n';
00052 os << "}\n";
00053
00054 return os;
00055 }
00056
00057 ReferenceCounting<Shape> Cube::
00058 __getCopy() const
00059 {
00060 return new Cube(*this);
00061 }