27 |
std::ostream& Intersection::put(std::ostream& s) const |
std::ostream& Intersection::put(std::ostream& s) const |
28 |
{ |
{ |
29 |
s << "intersection {\n"; |
s << "intersection {\n"; |
30 |
for (size_t i = 0; i<__shape.size(); i++) |
for (Intersection::const_iterator i = __objects.begin(); |
31 |
s << (*__shape[i]); |
i != __objects.end(); ++i) { |
32 |
|
s << (*(*i)); |
33 |
|
} |
34 |
for (size_t i=0; i<nbTransform(); i++) |
for (size_t i=0; i<nbTransform(); i++) |
35 |
s << (*__trans[i]).povWrite() << '\n'; |
s << (*__trans[i]).povWrite() << '\n'; |
36 |
s << "}\n"; |
s << "}\n"; |
44 |
; |
; |
45 |
} |
} |
46 |
|
|
|
//! Constructs and Intersection using an Object \a O. |
|
|
Intersection::Intersection(const Object& O) |
|
|
: Shape(intersection) |
|
|
{ |
|
|
__shape.push_back(O.shape()); |
|
|
} |
|
|
|
|
47 |
//! Copy constructor. |
//! Copy constructor. |
48 |
Intersection::Intersection(const Intersection& U) |
Intersection::Intersection(const Intersection& U) |
49 |
: Shape(U), |
: Shape(U), |
50 |
__shape(U.__shape) |
__objects(U.__objects) |
51 |
{ |
{ |
52 |
; |
; |
53 |
} |
} |