IvfSlerpController.h

00001 //
00002 // Copyright 1999-2006 by Structural Mechanics, Lund University.
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Library General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Library General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Library General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00017 // USA.
00018 //
00019 // Please report all bugs and problems to "ivf@byggmek.lth.se".
00020 //
00021 
00022 #ifndef _CIvfSlerpController_h_
00023 #define _CIvfSlerpController_h_
00024 
00025 #include <ivf/ivfconfig.h>
00026 
00027 #include <ivfmath/IvfSlerp.h>
00028 
00029 #include <ivfctl/IvfController.h>
00030 
00031 IvfSmartPointer(CIvfSlerpController);
00032 
00039 class IVFCTL_API CIvfSlerpController : public CIvfController {
00040 private:
00041 public:
00042         enum TEndAction {
00043                 EA_STOP,
00044                 EA_REVERSE,
00045                 EA_RESET,
00046                 EA_DEACTIVATE
00047         };
00048         enum TStartAction {
00049                 SA_STOP,
00050                 SA_REVERSE,
00051                 SA_RESET,
00052                 SA_DEACTIVATE
00053         };
00054 private:
00055         CIvfSlerpPtr m_slerp;
00056         CIvfQuat m_q;
00057         double m_v0;
00058         double m_a0;
00059         double m_t0;
00060         double m_t;
00061         double m_v;
00062         TEndAction m_endAction;
00063         TStartAction m_startAction;
00064 public:
00066         CIvfSlerpController();
00067 
00069         virtual ~CIvfSlerpController();
00070 
00072         void setSlerp(CIvfSlerp* slerp);
00073 
00075         CIvfSlerp* getSlerp();
00081         void setInitialPos(double value);
00082 
00088         void setInitialSpeed(double value);
00089 
00097         void setStartActionType(TStartAction action);
00098 
00106         void setEndActionType(TEndAction action);
00107         
00108         virtual void doReset();
00109         virtual void doUpdate(double dt);
00110 };
00111 
00112 #endif 

Generated on Fri Sep 1 15:36:46 2006 for Interactive Visualisation Framework - Ivf++ by  doxygen 1.4.6-NO