Moby
PrismaticJoint.h
1 /****************************************************************************
2  * Copyright 2006 Evan Drumwright
3  * This library is distributed under the terms of the Apache V2.0
4  * License (obtainable from http://www.apache.org/licenses/LICENSE-2.0).
5  ****************************************************************************/
6 
7 #ifndef _PRISMATIC_JOINT_H
8 #define _PRISMATIC_JOINT_H
9 
10 #include <Ravelin/PrismaticJointd.h>
11 #include <Moby/Joint.h>
12 
13 namespace Moby {
14 
16 
19 class PrismaticJoint : public Joint, public Ravelin::PrismaticJointd
20 {
21  public:
23  virtual ~PrismaticJoint() {}
24  PrismaticJoint(boost::weak_ptr<RigidBody> inboard, boost::weak_ptr<RigidBody> outboard);
25  virtual unsigned num_dof() const { return PrismaticJointd::num_dof(); }
26  virtual bool is_singular_config() const { return PrismaticJointd::is_singular_config(); }
27  virtual void evaluate_constraints(double C[]) { PrismaticJointd::evaluate_constraints(C); }
28  virtual const std::vector<Ravelin::SVelocityd>& get_spatial_axes_dot() { return PrismaticJointd::get_spatial_axes_dot(); }
29  virtual void determine_q(Ravelin::VectorNd& q) { PrismaticJointd::determine_q(q); }
30  virtual boost::shared_ptr<const Ravelin::Pose3d> get_induced_pose() { return PrismaticJointd::get_induced_pose(); }
31  virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
32  virtual void save_to_xml(XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects) const;
33 }; // end class
34 } // end namespace
35 
36 #endif
37 
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: PrismaticJoint.cpp:40
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Implements Base::save_to_xml()
Definition: PrismaticJoint.cpp:60
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
PrismaticJoint()
Initializes the joint.
Definition: PrismaticJoint.cpp:25
Defines a joint used in articulated rigid body dynamics simulation.
Definition: Joint.h:30
Defines an actuated prismatic joint.
Definition: PrismaticJoint.h:19