9 #ifndef IMPKINEMATICS_KINEMATIC_NODE_H
10 #define IMPKINEMATICS_KINEMATIC_NODE_H
12 #include "kinematics_config.h"
18 IMPKINEMATICS_BEGIN_NAMESPACE
20 class KinematicForest;
34 Joint* in_joint =
nullptr,
56 inline Joint* get_in_joint();
61 void set_out_joints(
Joints in);
63 void add_out_joint(
Joint* j);
65 void set_in_joint(
Joint* j);
68 static ObjectKey k(
"kinematics__kinematic_node_owner");
73 static ObjectKey k(
"kinematics__kinematic_node_in_joint");
78 static ObjectsKey k(
"kinematics__kinematic_node_out_joint");
86 return m->get_has_attribute(get_owner_key(), pi);
90 Joint* KinematicNode::get_in_joint() {
91 if (!get_model()->get_has_attribute(get_in_joint_key(),
92 get_particle_index())) {
96 get_model()->get_attribute(get_in_joint_key(), get_particle_index());
97 return static_cast<Joint*
>(obj);
104 if (!get_model()->get_has_attribute(get_out_joints_key(),
105 get_particle_index())) {
109 get_model()->get_attribute(get_out_joints_key(), get_particle_index());
110 for (
unsigned int i = 0; i < objs.size(); i++) {
111 base::Object* o = objs[i];
112 Joint* j =
static_cast<Joint*
>(o);
121 IMPKINEMATICS_END_NAMESPACE
#define IMP_DECORATOR_SETUP_2(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name)
IMP::base::Vector< IMP::base::Pointer< Object > > Objects
A list of objects.
IMP::base::Vector< IMP::base::WeakPointer< Joint > > JointsTemp
#define IMP_DECORATOR_METHODS(Name, Parent)
Exception definitions and assertions.
functionality for defining a kinematic joint between rigid bodies as part of a kinematic tree ...
functionality for defining rigid bodies
Key< 7, true > ObjectsKey
The type used to identify a particle attribute in the Particles.
IMP::base::Vector< IMP::base::Pointer< Joint > > Joints
Common base class for heavy weight IMP objects.
#define IMP_DECORATOR_SETUP_3(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name)
A decorator for a rigid body.
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
Class for storing model, its restraints, constraints, and particles.