Sensor.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_SENSOR_H
00029 #define OPAL_SENSOR_H
00030 
00031 #include "Defines.h"
00032 #include "SensorData.h"
00033 
00034 namespace opal
00035 {
00042         class Sensor
00043         {
00044         public:
00045                 Sensor();
00046 
00048                 virtual void OPAL_CALL setEnabled(bool e) = 0;
00049 
00051                 virtual bool OPAL_CALL isEnabled()const = 0;
00052 
00056                 virtual void OPAL_CALL setUserData(void* data);
00057 
00059                 virtual void* OPAL_CALL getUserData();
00060 
00062                 virtual SensorType OPAL_CALL getType()const = 0;
00063 
00065                 virtual void OPAL_CALL setTransform(const Matrix44r& t) = 0;
00066 
00068                 virtual const Matrix44r& OPAL_CALL getTransform()const = 0;
00069 
00071                 virtual void OPAL_CALL setName(const std::string& name) = 0;
00072 
00074                 virtual const std::string& OPAL_CALL getName()const = 0;
00075 
00078                 virtual void OPAL_CALL internal_update() = 0;
00079 
00081                 virtual bool OPAL_CALL internal_dependsOnSolid(Solid* s);
00082 
00084                 virtual void OPAL_CALL internal_destroy();
00085 
00086         protected:
00087                 virtual ~Sensor();
00088 
00090                 void init();
00091 
00094                 void* mUserData;
00095 
00097                 bool mInitCalled;
00098 
00099         private:
00100         };
00101 }
00102 
00103 #endif
00104 

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