Moby
SphericalJoint.h
1 /****************************************************************************
2  * Copyright 2007 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 _SPHERICAL_JOINT_H
8 #define _SPHERICAL_JOINT_H
9 
10 #include <Ravelin/SphericalJointd.h>
11 #include <Moby/Joint.h>
12 
13 namespace Moby {
14 
16 class SphericalJoint : public Joint, public Ravelin::SphericalJointd
17 {
18  public:
20  virtual ~SphericalJoint() {}
21  SphericalJoint(boost::weak_ptr<RigidBody> inboard, boost::weak_ptr<RigidBody> outboard);
22  virtual unsigned num_dof() const { return SphericalJointd::num_dof(); }
23  virtual bool is_singular_config() const { return SphericalJointd::is_singular_config(); }
24  virtual void evaluate_constraints(double C[]) { SphericalJointd::evaluate_constraints(C); }
25  virtual const std::vector<Ravelin::SVelocityd>& get_spatial_axes_dot() { return SphericalJointd::get_spatial_axes_dot(); }
26  virtual void determine_q(Ravelin::VectorNd& q) { SphericalJointd::determine_q(q); }
27  virtual boost::shared_ptr<const Ravelin::Pose3d> get_induced_pose() { return SphericalJointd::get_induced_pose(); }
28  virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
29  virtual void save_to_xml(XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects) const;
30 }; // end class
31 } // end namespace
32 
33 #endif
34 
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: SphericalJoint.cpp:41
SphericalJoint()
Initializes the joint.
Definition: SphericalJoint.cpp:26
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Implements Base::save_to_xml()
Definition: SphericalJoint.cpp:74
Defines an actuated spherical joint.
Definition: SphericalJoint.h:16
Defines a joint used in articulated rigid body dynamics simulation.
Definition: Joint.h:30