SensorData.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_DATA_H
00029 #define OPAL_SENSOR_DATA_H
00030 
00031 // project headers
00032 #include "Defines.h"
00033 #include "Matrix44r.h"
00034 
00035 namespace opal
00036 {
00038         enum SensorType
00039         {
00040                 ACCELERATION_SENSOR,
00041                 INCLINE_SENSOR,
00042                 RAYCAST_SENSOR,
00043                 VOLUME_SENSOR
00044         };
00045 
00047         class SensorData
00048         {
00049         public:
00050                 OPAL_DECL SensorData()
00051                 {
00052                         // The initial type doesn't matter since the abstract base
00053                         // class will never be instantiated.
00054                         mType = ACCELERATION_SENSOR;
00055                         enabled = defaults::sensor::enabled;
00056                         name = "";
00057                         solid = NULL;
00058                         internal_solidIndex = 0;
00059                         solidBlueprintRefName = "";
00060                         // "transform" is initialized in its own constructor.
00061                 }
00062 
00063                 OPAL_DECL virtual ~SensorData()
00064                 {
00065                 }
00066 
00068                 OPAL_DECL virtual SensorType OPAL_CALL getType()const
00069                 {
00070                         return mType;
00071                 }
00072 
00074                 bool enabled;
00075 
00077                 std::string name;
00078 
00082                 Solid* solid;
00083 
00085                 int internal_solidIndex;
00086 
00088                 std::string solidBlueprintRefName;
00089 
00093                 Matrix44r transform;
00094 
00095         protected:
00097                 SensorType mType;
00098 
00099         private:
00100         };
00101 }
00102 
00103 #endif

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