(c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-
#include "atom.hh"
#include "interval.hh"
#include "string.hh"
if (abs (off_[ax]) >= 100 CM)
{
warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax),
- global_lookup_l->print_dimen (off_[ax])));
+ print_dimen (off_[ax])));
if (experimental_features_global_b)
assert (false);
}
+
Atom::Atom ()
: dim_ (Interval (0,0),Interval (0,0))
{
- /*
- urg
- We should probably make Atom an abstract base class to
- derive Ps_atom and Tex_atom from.
- But Atom is used as a simple type *everywhere*,
- and we don't have virtual contructors.
- */
- lambda_ = 0;
- str_ = global_lookup_l->unknown_str ();
+ str_ = "unknown\n";
+ origin_l_ = 0;
}
Atom::Atom (String s, Box b)
: dim_ (b)
{
- lambda_ = 0;
str_ = s;
+ origin_l_ = 0;
}
Offset
Atom::offset () const
{
+ check_infinity_b ();
return off_;
}
-
-
void
Atom::translate_axis (Real r, Axis a)
{