9 #ifndef IMPKINEMATICS_KINEMATIC_NODE_H
10 #define IMPKINEMATICS_KINEMATIC_NODE_H
12 #include <IMP/kinematics/kinematics_config.h>
18 IMPKINEMATICS_BEGIN_NAMESPACE
20 class KinematicForest;
31 Joint* in_joint =
nullptr,
50 inline Joint* get_in_joint();
55 void set_out_joints(
Joints in);
57 void add_out_joint(
Joint* j);
59 void set_in_joint(
Joint* j);
62 static ObjectKey k(
"kinematics__kinematic_node_owner");
67 static ObjectKey k(
"kinematics__kinematic_node_in_joint");
72 static ObjectsKey k(
"kinematics__kinematic_node_out_joint");
84 Joint* KinematicNode::get_in_joint() {
85 if (!get_model()->get_has_attribute(get_in_joint_key(),
86 get_particle_index())) {
90 get_model()->get_attribute(get_in_joint_key(), get_particle_index());
91 return static_cast<Joint*
>(obj);
98 if (!get_model()->get_has_attribute(get_out_joints_key(),
99 get_particle_index())) {
103 get_model()->get_attribute(get_out_joints_key(), get_particle_index());
104 for (
unsigned int i = 0; i < objs.size(); i++) {
106 Joint* j =
static_cast<Joint*
>(o);
115 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.
A rigid body that is connected by a joint to other rigid bodies.
Base class for joints between rigid bodies in a kinematic tree.
#define IMP_DECORATOR_METHODS(Name, Parent)
#define IMP_DECORATORS(Name, PluralName, Parent)
Define the types for storing sets of decorators.
bool get_has_attribute(TypeKey attribute_key, ParticleIndex particle) const
return true if particle has attribute with the specified key
A decorator for a rigid body.
#define IMP_DECORATOR_SETUP_3(Name, FirstArgumentType, first_argument_name,SecondArgumentType, second_argument_name,ThirdArgumentType, third_argument_name)
Define and manipulate a kinematic structure over a model.