18 return eid.empty() ? nullptr :
eid.back()->Gavol();
22 const int qeid =
eid.size();
27 const int qeid =
eid.size();
32 for (
auto vol :
eid)
if (vol == amvol)
return 1;
37 for (
auto vol :
eid)
if (vol->Gavol() == avol)
return 1;
43 if (tid1.
eid.size() != tid2.
eid.size())
return 0;
47 const int qeid = tid1.
eid.size();
48 for (
int n = 0; n < qeid - 1; ++n) {
49 if (tid1.
eid[n] != tid2.
eid[n])
return 0;
57 Ifile <<
"no volume defined\n";
77 return std::vector<manip_absvol*>();
83 const unsigned int s = atid->
eid.size();
85 const int qaman = aman.size();
86 for (
int n = 0; n < qaman; ++n) {
87 const int i = aman[n]->m_find_embed_vol(fpt, dir, atid);
90 if (s < atid->eid.size())
break;
91 Imcout <<
"absvol::find_embed_vol:\n";
92 Imcout <<
" Warning: contradiction between "
93 <<
" i==1 and s == fnamvol\n";
108 const int qaman = aman.size();
109 for (
int n = 0; n < qaman; ++n) {
110 if (aman[n]->m_range_ext(fts, 0) == 1) {
115 if (sb == 1 || sb == 2)
return 1;
123 Ifile <<
"absvol::print(l=" << l <<
"): name=" << s <<
'\n';
128 const int qembed = embed.size();
130 Ifile <<
"The following volumes are embraced, q=" << embed.size() <<
'\n';
132 for (
int n = 0; n < qembed; ++n) {
133 Ifile <<
"n=" << n <<
'\n';
135 embed[n]->m_print(file, l);
140 Ifile <<
"None of embraced volumes\n";
148 mcerr <<
"absvol::copy() not defined\n";
155 const vec& fdir)
const {
170 mfunname(
"int manip_absvol::m_find_embed_vol(...)");
177 atid->
eid.resize(atid->
eid.size() + 1);
179 unsigned int s = atid->
eid.size();
182 if (atid->
eid.size() < s) {
183 mcerr <<
"manip_absvol::m_find_embed_vol: should never happen\n";
186 atid->
eid.pop_back();
189 if (atid->
eid.size() < s) {
190 mcerr <<
"manip_absvol::m_find_embed_vol: should never happen\n";
203 const int s = avol->
range(ts, s_ext, sb, faeid);
224 strcpy(nm,
"mvol->");
232 Ifile <<
"manip_absvol::m_print(l=" << l <<
"): " << s <<
'\n';
238 asys->
print(file, l - 1);
240 mcout <<
"manip_absvol::m_print: system==NULL\n";
243 avol->
print(file, l - 1);
245 mcout <<
"manip_absvol::m_print: avol==NULL\n";
252 mcerr <<
"manip_absvol_copy() not defined\n";
273 const std::string& fname)
274 : csys(fc, fbas, fname) {}
277 strcpy(nm,
"mvol->");
282 mcerr <<
"sh_manip_absvol_copy() not defined\n";
291 Ifile <<
"sh_manip_absvol::m_print(l=" << l <<
"): " << s <<
'\n';
297 avol->
print(file, l - 1);
299 mcout <<
"manip_absvol::m_print: avol==NULL\n";
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, 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< 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
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
virtual int m_range(trajestep &fts, int s_ext, int &sb, manip_absvol *&faeid) const
void down_absref(absref *f) 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
void up(const abssyscoor *fasc) override
Convert numbering representation of objects to new system.
virtual absref_transmit get_components() override
virtual void m_print(std::ostream &file, int l) const override
virtual const abssyscoor * Gasc() const override
Get the coordinate system.
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)