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