VelocityMotor.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 * Oleksandr Lozitskiy mr.olexander@gmail.com                            *
00009 * All rights reserved.                                                  *
00010 * Web: opal.sourceforge.net                                             *
00011 *                                                                       *
00012 * This library is free software; you can redistribute it and/or         *
00013 * modify it under the terms of EITHER:                                  *
00014 *   (1) The GNU Lesser General Public License as published by the Free  *
00015 *       Software Foundation; either version 2.1 of the License, or (at  *
00016 *       your option) any later version. The text of the GNU Lesser      *
00017 *       General Public License is included with this library in the     *
00018 *       file license-LGPL.txt.                                          *
00019 *   (2) The BSD-style license that is included with this library in     *
00020 *       the file license-BSD.txt.                                       *
00021 *                                                                       *
00022 * This library is distributed in the hope that it will be useful,       *
00023 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
00025 * license-LGPL.txt and license-BSD.txt for more details.                *
00026 *                                                                       *
00027 *************************************************************************/
00028 
00029 #ifndef OPALVELOCITYMOTOR_H
00030 #define OPALVELOCITYMOTOR_H
00031 
00032 // class headers
00033 #include "Motor.h"
00034 
00035 // project headers
00036 #include "Portability.h"
00037 #include "VelocityMotorData.h"
00038 
00039 namespace opal
00040 {
00041     class Simulator;
00042     class VelocityMotorData;
00043 
00049     class VelocityMotor : public Motor
00050     {
00051         public:
00053 
00056             VelocityMotor( Simulator * sim );
00057 
00059             virtual ~VelocityMotor();
00060 
00062             virtual void OPAL_CALL init( const VelocityMotorData & data );
00063 
00065             virtual void OPAL_CALL setEnabled( bool e );
00066 
00068             virtual bool OPAL_CALL isEnabled() const;
00069 
00071             virtual MotorType OPAL_CALL getType() const;
00072 
00074             virtual void OPAL_CALL setName( const std::string & name );
00075 
00077             virtual const std::string & OPAL_CALL getName() const;
00078 
00080             virtual void OPAL_CALL setVelocity( const Vec3r & velocity );
00081 
00083             virtual const Vec3r & OPAL_CALL getVelocity() const;
00084 
00087             virtual void OPAL_CALL internal_update();
00088 
00090             virtual bool OPAL_CALL internal_dependsOnSolid( Solid * s ) const;
00091 
00093 
00097             virtual void OPAL_CALL letGravityAffectSolid( bool affect );
00098 
00100             virtual bool OPAL_CALL doesGravityAffectSolid() const;
00101 
00103             virtual void OPAL_CALL setMaximumForce( real maxForce );
00104 
00106             virtual real OPAL_CALL getMaximumForce() const;
00107 
00108         protected:
00110             VelocityMotorData mData;
00111 
00112         private:
00113             Simulator * mSimulator;
00114     };
00115 }
00116 
00117 #endif

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