30 #ifndef _GranOO_LibShape_Sphere_hh_
31 #define _GranOO_LibShape_Sphere_hh_
52 GRANOO_OBJECT_FACTORY(
Sphere);
55 static std::string
class_ID() {
return std::string(
"Sphere");}
89 GRANOO_DECLARE_SHAPE_COLLISION();
101 GRANOO_ACCESS_SHAPE_DIM(radius,
double,
_radius);
110 template<
class Archive>
void serialize(Archive&,
const unsigned int);
127 :
Sphere(0., Geom::Frame::global) {
132 :
Sphere(radius, Geom::Frame::global) {
137 :
Sphere(s._radius, s._frame) {
142 :
Sphere(s._radius, frame) {
152 return get_radius()*2.;
174 m.
xx() = m.
yy() = m.
zz() = i;
177 template<
class Archive>
180 ar & boost::serialization::base_object<Volume>(*
this);
190 #include <boost/serialization/export.hpp>
194 #include <boost/serialization/version.hpp>
196 GRANOO_SERIALIZE_SHAPE(Sphere)
201 extern template class Core::ObjectFactoryInterface<Shape::Base, Shape::Sphere>;
BOOST_CLASS_EXPORT_KEY(GranOO3::Shape::Box) namespace GranOO3
Definition: Box.hpp:319
BOOST_CLASS_VERSION(GranOO3::Core::Base, 1) namespace GranOO3
Definition: Base.hpp:277
#define SafeModeAssert(condition, message)
Definition: Macro.hpp:47
Definition: ObjectFactory.hpp:235
static const Frame & global
Definition: Frame.hpp:76
Definition: Tensor.hpp:62
Definition: Vector.hpp:75
const Geom::Point & get_center() const
Definition: Base.hpp:134
const Geom::Frame & local_frame() const
Definition: Base.hpp:133
Definition: Sphere.hpp:50
Interference locate(const Geom::Point &, double radius) const
void update_bounding_box()
static std::string class_ID()
Definition: Sphere.hpp:55
double get_greatest_dimension() const
Definition: Sphere.hpp:151
Geom::Point farthest_point_along(const Geom::Vector &) const
Interference locate(const Geom::Point &) const
Sphere & operator=(const Sphere &)
AABB aabb() const
Definition: Sphere.hpp:156
double _radius
Definition: Sphere.hpp:113
static std::string desc()
void compute_inertia_tensor(double density, Geom::Tensor &) const
Definition: Sphere.hpp:171
double get_volume() const
Definition: Sphere.hpp:166
void read_xml_element(const TiXmlElement *el)
std::ostream & to_povray(std::ostream &out, const Core::Color &y) const
void serialize(Archive &, const unsigned int)
Definition: Sphere.hpp:179
virtual std::istream & read_ascii(std::istream &in)
bool collide_outside(const Geom::Point &p1, double radius, Collision::Data &info) const
bool collide_inside(const Geom::Point &p1, double radius, Collision::Data &info) const
friend class boost::serialization::access
Definition: Sphere.hpp:109
void make_equal_to(const Sphere &)
void update_bounding_sphere()
Sphere()
Definition: Sphere.hpp:126
virtual void to_vtk(vtkUnstructuredGrid *data)
virtual std::ostream & write_ascii(std::ostream &out) const
Definition: Volume.hpp:103
void update_bounding_shape()
Definition: Volume.cpp:96
void set_face_ID(const T &, Args... args)
Definition: Volume.hpp:185
static AABB new_lonely_aabb(double minPoint[3], double maxPoint[3], unsigned int primtiveIndex=-1)
Creates a new 'lonely' AABB with given extreme points.
Definition: StaticAABBTree.cpp:415
Interference
Definition: Volume.hpp:100
Definition: Common.hpp:198
T pow(const T v0, const T v1)
Definition: Exprtk.hpp:1491
Definition: StaticAABBTree.hpp:38