19 mcerr <<
"one should not call this function, since this object cannot be "
25 : m_dx(0), m_dy(0), m_dz(0), m_dxh(0), m_dyh(0), m_dzh(0), m_name(
"none") {
32 pvecerror(
"box(vfloat fdx, vfloat fdy, vfloat fdz, const string &fname)");
45 const std::string& fname) {
46 pvecerror(
"box(vfloat fdx, vfloat fdy, vfloat fdz, vfloat fprec, const string &fname)");
99 for (
int n = 0; n < 6; ++n) fsurf[n] = &spl[n];
104 mfunname(
"virtual int check_point_inside(const point& fpt, const vec& dir)");
105#ifdef TRACE_find_embed_vol
106 mcout <<
"box::check_point_inside: \n";
108 mcout <<
"fpt=" << fpt <<
"dir=" << dir;
119#ifdef TRACE_find_embed_vol
120 mcout <<
"cond 1, returning 1\n";
126#ifdef TRACE_find_embed_vol
130 mcout <<
"cond 2, returning 0\n";
135#ifdef IMPROVED_BOUNDARY
139 if (dir.
x == 0.0)
return 0;
140 if ((fpt.
v.
x > 0 && dir.
x > 0) || (fpt.
v.
x < 0 && dir.
x < 0)) {
141#ifdef TRACE_find_embed_vol
142 mcout <<
"cond 3, returning 0\n";
148 if (dir.
y == 0.0)
return 0;
149 if ((fpt.
v.
y > 0 && dir.
y > 0) || (fpt.
v.
y < 0 && dir.
y < 0)) {
150#ifdef TRACE_find_embed_vol
151 mcout <<
"cond 4, returning 0\n";
157 if (dir.
z == 0.0)
return 0;
158 if ((fpt.
v.
z > 0 && dir.
z > 0) || (fpt.
v.
z < 0 && dir.
z < 0)) {
159#ifdef TRACE_find_embed_vol
160 mcout <<
"cond 5, returning 0\n";
165#ifdef TRACE_find_embed_vol
166 mcout <<
"finish, returning 1\n";
193 ((fpt.
v.
x > 0 && dir.
x > 0) || (fpt.
v.
x < 0 && dir.
x < 0))) {
194#ifdef TRACE_find_embed_vol
195 mcout <<
"cond 3, returning 0\n";
200 ((fpt.
v.
y > 0 && dir.
y > 0) || (fpt.
v.
y < 0 && dir.
y < 0))) {
201#ifdef TRACE_find_embed_vol
202 mcout <<
"cond 4, returning 0\n";
207 ((fpt.
v.
z > 0 && dir.
z > 0) || (fpt.
v.
z < 0 && dir.
z < 0))) {
208#ifdef TRACE_find_embed_vol
209 mcout <<
"cond 5, returning 0\n";
213#ifdef TRACE_find_embed_vol
214 mcout <<
"finish, returning 1\n";
225 Ifile <<
"box::print(l=" << l <<
"): " << s <<
'\n';
228 <<
" prec=" <<
prec <<
'\n';
241 mfunname(
"virtual int box::range_ext(trajestep& fts, int s_ext) const");
261 strcat(nm,
m_name.c_str());
269 strcpy(nm,
"manip_box: ");
270 strcat(nm,
m_name.c_str());
277 Ifile <<
"manip_box::print(l=" << l <<
"): " << s <<
'\n';
300 strcpy(nm,
"sh_manip_box: ");
301 strcat(nm,
m_name.c_str());
308 Ifile <<
"sh_manip_box::print(l=" << l <<
"): " << s <<
'\n';
#define mfunnamep(string)
Active pointer or automatic container or controlling pointer.
virtual void print(std::ostream &file, int l) const
virtual int range_ext(trajestep &fts, int s_ext) const
Range till exit from given volume or to entry only.
virtual box * copy() const
virtual void print(std::ostream &file, int l) const
vfloat m_dz
Lengths of sides.
virtual void get_components(ActivePtr< absref_transmit > &aref_tran)
vfloat m_dzh
Half-lengths of sides.
virtual void chname(char *nm) const
virtual int check_point_inside(const point &fpt, const vec &dir) const
box()
Default constructor.
virtual void income(gparticle *gp)
virtual void print(std::ostream &file, int l) const
virtual void chname(char *nm) const
virtual manip_box * copy() const
virtual void print(std::ostream &file, int l) const
virtual absvol * Gavol() const
Get the volume.
Plane, defined by defined by a point and a vector normal to the plane.
virtual void get_components(ActivePtr< absref_transmit > &aref_tran)
virtual sh_manip_box * copy() const
virtual void print(std::ostream &file, int l) const
sh_manip_box()
Constructor.
virtual absvol * Gavol() const
Get the volume.
virtual void chname(char *nm) const
virtual void get_components(ActivePtr< absref_transmit > &aref_tran)
vfloat mrange
Maximal possible range.
virtual void print(std::ostream &file, int l) const
int range_ext(trajestep &fts, int s_ext) const
void ulsvolume_init(surface *fsurf[pqqsurf], int fqsurf, const std::string &fname, vfloat fprec)
DoubleAc fabs(const DoubleAc &f)
#define pvecerror(string)