19 return eid.empty() ? nullptr :
eid.back()->Gavol();
23 const int qeid =
eid.size();
28 const int qeid =
eid.size();
33 for (
auto vol :
eid)
if (vol == amvol)
return 1;
38 for (
auto vol :
eid)
if (vol->Gavol() == avol)
return 1;
44 if (tid1.
eid.size() != tid2.
eid.size())
return 0;
48 const int qeid = tid1.
eid.size();
49 for (
int n = 0; n < qeid - 1; ++n) {
50 if (tid1.
eid[n] != tid2.
eid[n])
return 0;
58 Ifile <<
"no volume defined\n";
78 return std::vector<manip_absvol*>();
84 const size_t s = atid->
eid.size();
86 const size_t qaman = aman.size();
87 for (
size_t n = 0; n < qaman; ++n) {
88 const int i = aman[n]->m_find_embed_vol(fpt, dir, atid);
91 if (s < atid->eid.size())
break;
92 Imcout <<
"absvol::find_embed_vol:\n";
93 Imcout <<
" Warning: contradiction between "
94 <<
" i==1 and s == fnamvol\n";
109 const int qaman = aman.size();
110 for (
int n = 0; n < qaman; ++n) {
111 if (aman[n]->m_range_ext(fts, 0) == 1) {
116 if (sb == 1 || sb == 2)
return 1;
124 Ifile <<
"absvol::print(l=" << l <<
"): name=" << s <<
'\n';
129 const int qembed = embed.size();
131 Ifile <<
"The following volumes are embraced, q=" << embed.size() <<
'\n';
133 for (
int n = 0; n < qembed; ++n) {
134 Ifile <<
"n=" << n <<
'\n';
136 embed[n]->m_print(file, l);
141 Ifile <<
"None of embraced volumes\n";
149 mcerr <<
"absvol::copy() not defined\n";
156 const vec& fdir)
const {
171 mfunname(
"int manip_absvol::m_find_embed_vol(...)");
179 const size_t 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";
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";
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)