29#ifndef _libPhysic_BodyInteraction_tpp_
30#define _libPhysic_BodyInteraction_tpp_
61 GRANOO_ACCESS_REF_CONST_PTR(body1,
Body,
_body1);
65 GRANOO_ACCESS_REF_CONST_PTR(body2,
Body,
_body2);
80 template<
class Archive>
void serialize(Archive &,
const unsigned int);
95 template<
class Archive>
99 ar & boost::serialization::base_object<NodeInteraction>(*
this);
104#include <boost/serialization/version.hpp>
110 namespace serialization
113 template<
class Archive>
122 template<
class Archive>
BOOST_CLASS_VERSION(GranOO3::Physic::BodyInteraction, 0) namespace boost
Definition BodyInteraction.hpp:105
a class that represents a body
Definition Body.hpp:43
a class that represents a generic physical interaction between two bodies
Definition BodyInteraction.hpp:44
void swap(Body &from, Body &to)
swap one body
Definition BodyInteraction.cpp:100
Geom::Vector _torque_on2
the current value of the applied torque on the body 2
Definition BodyInteraction.hpp:87
Body * _body1
a pointer the first body
Definition BodyInteraction.hpp:84
void serialize(Archive &, const unsigned int)
complete serializing of the item in the *.gdd format
Definition BodyInteraction.hpp:97
Geom::Vector & torque_on(const Body &b)
get the torque value applied on b
Definition BodyInteraction.cpp:55
BodyInteraction(Body &b1, Body &b2, bool contact_interaction)
constructor
Definition BodyInteraction.cpp:41
void add_label_torque(const std::string &label, const Geom::Vector &t1, const Geom::Vector &t2)
add a label for the torque
Definition BodyInteraction.cpp:93
BodyInteraction & operator=(const BodyInteraction &)=delete
BodyInteraction(const BodyInteraction &frame)=delete
Body * _body2
a pointer the second body
Definition BodyInteraction.hpp:85
virtual ~BodyInteraction()
destructor
Definition BodyInteraction.cpp:50
void clear_torque()
set the torques to zero
Definition BodyInteraction.cpp:87
Geom::Vector _torque_on1
the current value of the applied torque on the body 1
Definition BodyInteraction.hpp:86
friend class boost::serialization::access
Definition BodyInteraction.hpp:79
std::map< std::string, Geom::Vector > _energy_balance_torque1
a map of label for computing energy balance (internal usage only)
Definition BodyInteraction.hpp:90
void apply_torque()
apply the current torque value
Definition BodyInteraction.cpp:77
std::map< std::string, Geom::Vector > _energy_balance_torque2
a map of label for computing energy balance (internal usage only)
Definition BodyInteraction.hpp:91
bool contact_interaction() const
Definition NodeInteraction.cpp:57
NodeInteraction(Node &de1, Node &de2, bool build_node_interaction)
Definition NodeInteraction.cpp:42
This namespace group the entire Physic library.
Definition Common.hpp:198