PrismaticJoint.h

00001 /****************************************************************************
00002  * Copyright 2006 Evan Drumwright
00003  * This library is distributed under the terms of the GNU General Public 
00004  * License (found in COPYING).
00005  ****************************************************************************/
00006 
00007 #ifndef _PRISMATIC_JOINT_H
00008 #define _PRISMATIC_JOINT_H
00009 
00010 #include <Physsim/Joint.h>
00011 
00012 namespace Physsim {
00013 
00015 
00018 class PrismaticJoint : public Joint
00019 {
00020         public:
00021                 PrismaticJoint();
00022                 virtual ~PrismaticJoint() {}
00023                 PrismaticJoint(boost::weak_ptr<RigidBody> inboard, boost::weak_ptr<RigidBody> outboard);
00024                 virtual void clone(BasePtr& cloned, bimap<BasePtr, BasePtr>* obj_map = NULL) const;
00025                 virtual void load_state(BaseConstPtr object, bimap<BasePtr, BasePtr>* correspondence = NULL);
00026                 virtual void save_state(BasePtr object, bimap<BasePtr, BasePtr>* correspondence = NULL) const;
00027                 Vector3 get_axis_global() const;
00028                 void set_axis_global(const Vector3& axis);
00029                 void set_axis_local(const Vector3& axis);
00030                 virtual void update_spatial_axes();             
00031                 virtual void determine_Q();
00032                 virtual const Matrix4& get_transform();
00033                 virtual SMatrixN& get_spatial_axes_deriv(ReferenceFrameType type);
00034                 virtual void load_from_xml(XMLTreeConstPtr node, std::map<std::string, BasePtr>& id_map);
00035                 virtual void save_to_xml(XMLTreePtr node, std::list<BaseConstPtr>& shared_objects) const;
00036                 virtual unsigned get_num_dof() const { return 1; } 
00037         
00039 
00046                 const Vector3& get_axis_local() const { return _u; }
00047 
00049                 virtual bool is_singular_config() const { return false; }
00050                 
00051         private:
00052                 Vector3 _u;
00053                 SMatrixN _si_deriv;
00054                 Matrix4 _T;
00055 };
00056 }
00057 
00058 #endif
00059 

Generated on Wed Oct 24 14:54:22 2007 for Physsim by  doxygen 1.5.1