8 #ifndef IMPALGEBRA_ELLIPSOID_3D_H
9 #define IMPALGEBRA_ELLIPSOID_3D_H
18 IMPALGEBRA_BEGIN_NAMESPACE
26 #if IMP_HAS_CHECKS >= IMP_USAGE
27 radii_[0] = std::numeric_limits<double>::quiet_NaN();
32 double get_radius(
unsigned int i)
const {
34 "Attempt to use uninitialized ellipsoid.");
37 const Vector3D &get_center()
const {
return center_; }
38 const Rotation3D &get_rotation()
const {
return rot_; }
43 out <<
"(" << spaces_io(center_) <<
": " << get_radius(0) <<
", "
44 << get_radius(1) <<
", " << get_radius(2) <<
")";
56 return 4.0 / 3.0 *
PI * g.get_radius(0) * g.get_radius(1) * g.get_radius(2),
58 Vector3D v(g.get_radius(0), g.get_radius(1), g.get_radius(2));
60 return get_transformed(b, g.get_transformation());
63 IMPALGEBRA_END_NAMESPACE
#define IMP_NOT_IMPLEMENTED
Use this to make that the method is not implemented yet.
static const double PI
the constant pi
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
#define IMP_USAGE_CHECK(expr, message)
A runtime test for incorrect usage of a class or method.
#define IMP_VOLUME_GEOMETRY_METHODS(Name, name, area, volume, bounding_box)
implement the needed namespace methods for a geometry type
A bounding box in D dimensions.
Various useful constants.
bool isnan(const T &a)
Return true if a number is NaN.