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++) {
112 Joint* j =
static_cast<Joint*
>(o);
121 IMPKINEMATICS_END_NAMESPACE
#define IMP_DECORATOR_SETUP_1(Name, FirstArgumentType, first_argument_name)
Exception definitions and assertions.
IMP::Vector< IMP::WeakPointer< Joint > > JointsTemp
Class for storing model, its restraints, constraints, and particles.
functionality for defining a kinematic joint between rigid bodies as part of a kinematic tree ...
Common base class for heavy weight IMP objects.
functionality for defining rigid bodies
#define IMP_DECORATOR_SETUP_2(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name)
IMP::Vector< IMP::Pointer< Joint > > Joints
IMP::Vector< IMP::Pointer< Object > > Objects
A list of objects.
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
A decorator for a rigid body.
#define IMP_DECORATOR_SETUP_3(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name)