30#ifndef _LibDEM_ElementT_TPP
31#define _LibDEM_ElementT_TPP
35#include <boost/serialization/version.hpp>
36#include <boost/serialization/map.hpp>
73 GRANOO_ACCESS_GET (center ,
Geom::Point , Node::get_center() );
78 virtual std::string
info()
const;
105 template<
class Archive>
void serialize(Archive&,
const unsigned int);
110 template<
class shape>
116 Body::set_density(density);
119 template<
class shape>
126 template<
class shape>
131 template<
class shape>
135 template<
class shape> std::string
137 return shape::class_ID();
140 template<
class shape>
142 return shape::get_volume();
147 return Physic::Node::get_position();
151 template<
class shape>
158 template<
class shape>
160 this->shape::make_equal_to(el);
164 template<
class shape>
void
167 Drawable::apply_color();
175 template<
class shape>
void
178 Drawable::apply_edge_color();
181 shape::draw_gl_edge();
186 template<
class shape> std::string
188 std::ostringstream os;
190 << Body::info() <<
'\n'
195 template<
class shape> std::ostream&
198 shape::write_ascii(out);
202 template<
class shape> std::istream&
205 shape::read_ascii(in);
211 template<
class shape>
bool
216 template<
class shape>
bool
222 template<
class shape>
template<
class Archive>
void
224 ar & boost::serialization::base_object<Element>(*
this);
225 ar & boost::serialization::base_object<shape>(*
this);
236 template<
class shape>
bool is() const
Definition Base.hpp:150
Definition PropClass.hpp:47
virtual std::ostream & write_ascii(std::ostream &os) const
dump the current state of the element in a ascii file (standard *.lgdd format)
Definition Element.cpp:218
void make_equal_to(const Element &el)
for equalizing two elements
Definition Element.cpp:205
virtual std::string info() const
get some info on a given element
Definition Element.cpp:210
virtual std::istream & read_ascii(std::istream &is)
update the current state of the element from an ascii file format *.lgdd
Definition Element.cpp:224
Element(Shape::Volume &shape, const Geom::Point &point)
constructor
Definition Element.cpp:70
a template class that model an element with a given shape
Definition ElementT.hpp:59
void serialize(Archive &, const unsigned int)
complete serializing of the element in the *.gdd format
Definition ElementT.hpp:223
virtual ~ElementT()
destructor
Definition ElementT.hpp:132
virtual bool is_polyhedral_element() const
util method for knowing if the element is polyhedral or not
Definition ElementT.hpp:217
void make_equal_to(const ElementT &el)
for equalizing two elements
Definition ElementT.hpp:159
double get_volume() const
get the volume the element
Definition ElementT.hpp:141
virtual std::ostream & write_ascii(std::ostream &os) const
dump the current state of the element in a ascii file (standard *.lgdd format)
Definition ElementT.hpp:196
virtual void draw_edge()
Definition ElementT.hpp:176
std::string shape_class_ID() const
get the related shape classID
Definition ElementT.hpp:136
virtual std::istream & read_ascii(std::istream &is)
update the current state of the element from an ascii file format *.lgdd
Definition ElementT.hpp:203
const Geom::Vector & get_position() const
get the current position vector of the element
Definition ElementT.hpp:146
ElementT()
default constructor
Definition ElementT.hpp:127
virtual std::string info() const
get some info on a given element
Definition ElementT.hpp:187
virtual Core::Base & clone()
clone the current ElementT
Definition ElementT.hpp:152
ElementT & operator=(const ElementT &)=delete
ElementT(const ElementT &)=delete
ElementT(const Geom::Point &pos, double radius, double density)
constructor mainly used for spherical element
virtual bool is_spherical_element() const
util method for knowing if the element is spherical or not
Definition ElementT.hpp:212
friend class boost::serialization::access
Definition ElementT.hpp:104
ElementT(const Geom::Point &p, double radius, double density)
Definition ElementT.cpp:68
virtual void draw()
util method for GL drawing the element (used by granoo-viewer)
Definition ElementT.hpp:165
Definition Quaternion.hpp:54
void set_density(double density)
set the density value
Definition Body.hpp:177
const Geom::Frame & local_frame() const
Definition Node.hpp:262
void update_bounding_shape()
Definition Volume.cpp:96
This namespace group the entire DEM library.
This namespace group the entire Geom library.
Definition Common.hpp:198
static Base * new_object(const std::string &classID, std::istream &in)
Definition ElementT.hpp:239
Definition SetOfManager.hpp:63