Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

cybplanesensorc.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Malte Weiß, 26.08.2002: Fields are loaded by events.
00005             27.08.2002: Implementation extended.
00006             28.08.2002: Sensor fully functional.
00007 
00008 Address:  FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00009       Neuenahrer Str. 20
00010       D - 53343 Wachtberg
00011       
00012 Email:    winkelholz@fgan.de
00013 
00014 This program is free software; you can redistribute it and/or
00015 modify it under the terms of the GNU General Public License
00016 as published by the Free Software Foundation; either version 2
00017 of the License, or (at your option) any later version.
00018 
00019 This program is distributed in the hope that it will be useful,
00020 but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022 GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License
00025 along with this program; if not, write to the Free Software
00026 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00027 */
00028 
00029 #ifndef CYBPLANESENSOR_HC
00030 #define CYBPLANESENSOR_HC
00031 
00032 #include "oaw/ctk/cybdragsensorc.h"
00033 #include "oaw/ctk/cybwrlfields.h"
00034 #include "../oawconfig.h"
00035 
00036 OAW_BEGIN_NAMESPACE
00037 
00038 
00039 class CybIsectLineChannelC;
00040 
00041 class OAW_DLLMAPPING CybPlaneSensorC : public CybDragSensorC
00042 {
00043 public:
00044   CybPlaneSensorC(CybWorldC*);
00045   CybPlaneSensorC(const CybPlaneSensorC&);
00046   CybPlaneSensorC& operator = (const CybPlaneSensorC&);
00047   virtual void CreateNewCopy(CybNodeC* pNode);
00048   virtual ~CybPlaneSensorC();
00049 
00050   virtual void SetEvent(long, const void*, BaseI*);
00051   virtual long GetFieldEventID(const char*);
00052   virtual long GetFieldDataType(long);
00053 
00054   virtual void StartDrag(Vector3C vLineStart, Vector3C vLineEnd, Vector3C vIntersect);
00055   virtual void DoDrag(Vector3C vLineStart, Vector3C vLineEnd);
00056   virtual void EndDrag();
00057 
00058 protected:
00059   virtual void LoadVRML(char*& iter, const char* iterEnd,long& znr);
00060 
00061   void CheckTranslation(Vector3C &v);
00062 
00063   // Send eventOuts
00064   void SendIsActive(SFBool b);
00065   void SendTrackPointChanged(SFVec3f v);
00066   void SendTranslationChanged(SFVec3f v);
00067   void SendOffsetChanged(SFVec3f v);
00068 
00069 protected:
00070   short     m_bLoading;            // Currently loading?
00071   Vector3C  m_vStart, m_vCurrent;  // Start and current drag position
00072   
00073 public:
00074   // Plane sensor properties
00075   SFBool    m_bAutoOffset;         // Auto offset?
00076   SFBool    m_bEnabled;            // Enabled?
00077   SFVec2f   m_vMaxPosition;        // Maximum position
00078   SFVec2f   m_vMinPosition;        // Minimum position
00079   SFVec3f   m_vOffset;             // Offset
00080 
00081   // Key list
00082   static char VRMLKeyStrList[][30];
00083 };
00084 
00085 OAW_END_NAMESPACE
00086 
00087 
00088 #endif

Generated on Tue Jul 29 14:24:12 2003 for Open ActiveWrl by doxygen1.3-rc2