SpringMotor.h

Go to the documentation of this file.
00001 /*************************************************************************
00002  *                                                                       *
00003  * Open Physics Abstraction Layer                                        *
00004  * Copyright (C) 2004-2005                                               *
00005  * Alan Fischer  alan.fischer@gmail.com                                  *
00006  * Andres Reinot  andres@reinot.com                                      *
00007  * Tyler Streeter  tylerstreeter@gmail.com                               *
00008  * All rights reserved.                                                  *
00009  * Web: opal.sourceforge.net                                             *
00010  *                                                                       *
00011  * This library is free software; you can redistribute it and/or         *
00012  * modify it under the terms of EITHER:                                  *
00013  *   (1) The GNU Lesser General Public License as published by the Free  *
00014  *       Software Foundation; either version 2.1 of the License, or (at  *
00015  *       your option) any later version. The text of the GNU Lesser      *
00016  *       General Public License is included with this library in the     *
00017  *       file license-LGPL.txt.                                          *
00018  *   (2) The BSD-style license that is included with this library in     *
00019  *       the file license-BSD.txt.                                       *
00020  *                                                                       *
00021  * This library is distributed in the hope that it will be useful,       *
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
00024  * license-LGPL.txt and license-BSD.txt for more details.                *
00025  *                                                                       *
00026  *************************************************************************/
00027 
00028 #ifndef OPAL_SPRING_MOTOR_H
00029 #define OPAL_SPRING_MOTOR_H
00030 
00031 #include "Defines.h"
00032 #include "Matrix44r.h"
00033 #include "Motor.h"
00034 #include "SpringMotorData.h"
00035 
00036 namespace opal
00037 {
00042         class SpringMotor : public Motor
00043         {
00044         public:
00045                 SpringMotor();
00046 
00047                 virtual ~SpringMotor();
00048 
00051                 virtual void OPAL_CALL init(const SpringMotorData& data);
00052 
00054                 virtual const SpringMotorData& OPAL_CALL getData()const;
00055 
00056                 virtual MotorType OPAL_CALL getType()const;
00057 
00058                 virtual void OPAL_CALL setName(const std::string& name);
00059 
00060                 virtual const std::string& OPAL_CALL getName()const;
00061 
00062                 virtual bool OPAL_CALL isEnabled()const;
00063 
00064                 virtual void OPAL_CALL setEnabled(bool e);
00065 
00068                 virtual void OPAL_CALL setLocalAttachOffset(const Point3r& offset);
00069 
00072                 virtual const Point3r& OPAL_CALL getLocalAttachOffset()const;
00073 
00076                 virtual void OPAL_CALL setGlobalAttachPoint(const Point3r& p);
00077 
00080                 virtual Point3r OPAL_CALL getGlobalAttachPoint()const;
00081 
00083                 virtual void OPAL_CALL setDesiredTransform(const Matrix44r& transform);
00084 
00086                 virtual void OPAL_CALL setDesiredPosition(const Point3r& pos);
00087 
00089                 virtual void OPAL_CALL setDesiredOrientation(const Vec3r& forward,
00090                         const Vec3r& up, const Vec3r& right);
00091 
00093                 virtual void OPAL_CALL setLinearKd(real kd);
00094 
00096                 virtual void OPAL_CALL setLinearKs(real ks);
00097 
00099                 virtual real OPAL_CALL getLinearKd()const;
00100 
00102                 virtual real OPAL_CALL getLinearKs()const;
00103 
00105                 virtual void OPAL_CALL setAngularKd(real kd);
00106 
00108                 virtual void OPAL_CALL setAngularKs(real ks);
00109 
00111                 virtual real OPAL_CALL getAngularKd()const;
00112 
00114                 virtual real OPAL_CALL getAngularKs()const;
00115 
00116                 virtual void OPAL_CALL internal_update();
00117 
00118                 virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s);
00119 
00120         protected:
00122                 SpringMotorData mData;
00123 
00124         private:
00125         };
00126 }
00127 
00128 #endif

Generated on Tue May 16 17:49:52 2006 for OPAL by  doxygen 1.4.6-NO