30#ifndef _LibPhysic_BodyT_H
31#define _LibPhysic_BodyT_H
68 GRANOO_ACCESS_GET (center ,
Geom::Point , Node::get_center() );
74 virtual std::string
info()
const;
82 template<
class Archive>
void serialize(Archive&,
const unsigned int);
85#ifndef DOXYGEN_SHOULD_SKIP_THIS
89 :
Body(*this, p,q,mass,tensor),
90 shape(
Body::local_frame()) {
95 : BodyT<shape>(
Geom::global::center,
Geom::global::quaternion, 0.,
Geom::global::tensor) {
102 template<
class shape>
106 Drawable::apply_color();
108 glMultMatrixd(local_frame().get_glMatrix());
114 template<
class shape>
118 Drawable::apply_color();
120 glMultMatrixd(local_frame().get_glMatrix());
121 shape::draw_gl_edge();
128 template<
class shape>
131 std::ostringstream os;
137 template<
class shape>
138 template<
class Archive>
141 ar & boost::serialization::base_object<Body>(*
this);
142 ar & boost::serialization::base_object<shape>(*
this);
Definition Quaternion.hpp:54
a class that represents a body
Definition Body.hpp:43
Body(Shape::Volume &shape, const Geom::Point &p, const Geom::Quaternion &q, double mass, const Geom::Tensor &inertia)
constructor
Definition Body.hpp:119
std::string info() const
Display some useful info in the terminal.
Definition Body.cpp:63
virtual void draw()
util method for GL drawing the element (used by granoo-viewer)
virtual std::string info() const
get some info on a given element
virtual ~BodyT()
destructor
BodyT(const BodyT &)=delete
void serialize(Archive &, const unsigned int)
complete serializing of the element in the *.gdd format
BodyT(const Geom::Point &p, const Geom::Quaternion &q, double mass, const Geom::Tensor &tensor)
constructor
friend class boost::serialization::access
Definition BodyT.hpp:81
BodyT()
default constructor
BodyT & operator=(const BodyT &)=delete
const Geom::Frame & local_frame() const
Definition Node.hpp:262
This namespace group the entire Geom library.
This namespace group the entire Physic library.
Definition Common.hpp:198