18 return eid.empty() ? NULL :
eid.back()->Gavol();
22 const int qeid =
eid.size();
27 const int qeid =
eid.size();
32 const int qeid =
eid.size();
33 for (
int n = 0; n < qeid; ++n)
if (
eid[n].get() == amvol)
return 1;
38 const int qeid =
eid.size();
39 for (
int n = 0; n < qeid; ++n)
if (
eid[n]->Gavol() == avol)
return 1;
45 if (tid1.
eid.size() != tid2.
eid.size())
return 0;
49 const int qeid = tid1.
eid.size();
50 for (
int n = 0; n < qeid - 1; ++n) {
51 if (tid1.
eid[n].get() != tid2.
eid[n].get())
return 0;
59 Ifile <<
"no volume defined\n";
61 const int qeid =
eid.size();
63 for (
int n = 0; n < qeid - 1; ++n) {
65 eid[n].print(file, 0);
68 Ifile <<
"n=" << qeid - 1;
69 eid.back().print(file, 0);
76 return std::vector<manip_absvol*>();
82 const unsigned int s = atid->
eid.size();
84 const int qaman = aman.size();
85 for (
int n = 0; n < qaman; ++n) {
86 const int i = aman[n]->m_find_embed_vol(fpt, dir, atid);
89 if (s < atid->eid.size())
break;
90 Imcout <<
"absvol::find_embed_vol:\n";
91 Imcout <<
" Warning: contradiction between "
92 <<
" i==1 and s == fnamvol\n";
107 const int qaman = aman.size();
108 for (
int n = 0; n < qaman; ++n) {
109 if (aman[n]->m_range_ext(fts, 0) == 1) {
114 if (sb == 1 || sb == 2)
return 1;
122 Ifile <<
"absvol::print(l=" << l <<
"): name=" << s <<
'\n';
127 const int qembed = embed.size();
129 Ifile <<
"The following volumes are embraced, q=" << embed.size() <<
'\n';
131 for (
int n = 0; n < qembed; ++n) {
132 Ifile <<
"n=" << n <<
'\n';
134 embed[n]->m_print(file, l);
139 Ifile <<
"None of embraced volumes\n";
147 mcerr <<
"absvol::copy() not defined\n";
154 const vec& fdir)
const {
169 mfunname(
"int manip_absvol::m_find_embed_vol(...)");
176 atid->
eid.resize(atid->
eid.size() + 1);
178 unsigned int s = atid->
eid.size();
181 if (atid->
eid.size() < s) {
182 mcerr <<
"manip_absvol::m_find_embed_vol: should never happen\n";
185 atid->
eid.pop_back();
188 if (atid->
eid.size() < s) {
189 mcerr <<
"manip_absvol::m_find_embed_vol: should never happen\n";
202 const int s = avol->
range(ts, s_ext, sb, faeid);
223 strcpy(nm,
"mvol->");
231 Ifile <<
"manip_absvol::m_print(l=" << l <<
"): " << s <<
'\n';
237 asys->
print(file, l - 1);
239 mcout <<
"manip_absvol::m_print: system==NULL\n";
242 avol->
print(file, l - 1);
244 mcout <<
"manip_absvol::m_print: avol==NULL\n";
251 mcerr <<
"manip_absvol_copy() not defined\n";
272 const std::string& fname)
273 : csys(fc, fbas, fname) {}
276 strcpy(nm,
"mvol->");
281 mcerr <<
"sh_manip_absvol_copy() not defined\n";
290 Ifile <<
"sh_manip_absvol::m_print(l=" << l <<
"): " << s <<
'\n';
296 avol->
print(file, l - 1);
298 mcout <<
"manip_absvol::m_print: avol==NULL\n";
Active pointer or automatic container or controlling pointer.
virtual void print(std::ostream &file, int l) const
virtual void print(std::ostream &file, int l) const
virtual int range(trajestep &fts, int s_ext, int &sb, PassivePtr< manip_absvol > &faeid) const
virtual int find_embed_vol(const point &fpt, const vec &dir, manip_absvol_treeid *atid) const
virtual absvol * copy() const
virtual int range_ext(trajestep &fts, int s_ext) const =0
virtual int check_point_inside(const point &fpt, const vec &dir) const =0
virtual std::vector< manip_absvol * > Gamanip_embed() const
virtual void chname(char *nm) const
Service class (array of manip_absvol).
int check_absvol_registered(absvol *avol)
void down_absref(absref *f)
void print(std::ostream &file, int l) const
void up_absref(absref *f)
int check_manip_absvol_registered(manip_absvol *amvol)
std::vector< PassivePtr< manip_absvol > > eid
List of volumes.
absvol * G_lavol() const
Get last address of volume.
manip_absvol * G_lamvol() const
Get last address of manipulator.
Abstract base classs for volume "manipulators".
virtual int m_check_point_inside(const point &fpt, const vec &dir) const
virtual manip_absvol * copy() const
void up_absref(absref *f) const
virtual absvol * Gavol() const =0
Get the volume.
void m_chname(char *nm) const
virtual const abssyscoor * Gasc() const
Get the coordinate system.
virtual int m_range_ext(trajestep &fts, int s_ext) const
void down_absref(absref *f) const
virtual int m_range(trajestep &fts, int s_ext, int &sb, PassivePtr< manip_absvol > &faeid) const
virtual int m_find_embed_vol(const point &fpt, const vec &fdir, manip_absvol_treeid *atid) const
virtual void m_print(std::ostream &file, int l) const
virtual void up(const abssyscoor *fasc)
Convert numbering representation of objects to new system.
virtual void m_print(std::ostream &file, int l) const
virtual const abssyscoor * Gasc() const
Get the coordinate system.
virtual void get_components(ActivePtr< absref_transmit > &aref_tran)
virtual sh_manip_absvol * copy() const
virtual void m_chname(char *nm) const
void up(const basis *fabas_new)
std::ostream & noindent(std::ostream &f)
int operator==(const circumf &f1, const circumf &f2)