Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

movable.h

00001 /*
00002     Copyright (C) 2000-2001 by Jorrit Tyberghein
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
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __IENGINE_MOVABLE_H__
00020 #define __IENGINE_MOVABLE_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "csutil/csvector.h"
00024 #include "csgeom/transfrm.h"
00025 
00026 class csVector3;
00027 class csMatrix3;
00028 struct iSector;
00029 struct iMovable;
00030 struct iSectorList;
00031 
00032 SCF_VERSION (iMovableListener, 0, 0, 1);
00033 
00038 struct iMovableListener : public iBase
00039 {
00041   virtual void MovableChanged (iMovable* movable, void* userdata) = 0;
00043   virtual void MovableDestroyed (iMovable* movable, void* userdata) = 0;
00044 };
00045 
00046 SCF_VERSION (iMovable, 0, 1, 1);
00047 
00053 struct iMovable : public iBase
00054 {
00056   virtual iMovable* GetParent () const = 0;
00058   virtual void SetParent (iMovable* parent) = 0;
00059 
00067   virtual void SetSector (iSector* sector) = 0;
00068 
00073   virtual void ClearSectors () = 0;
00074 
00080   virtual iSectorList* GetSectors () = 0;
00081 
00085   virtual bool InSector () const = 0;
00086 
00091   virtual void SetPosition (iSector* home, const csVector3& v) = 0;
00092 
00097   virtual void SetPosition (const csVector3& v) = 0;
00098 
00102   virtual const csVector3& GetPosition () const = 0;
00103 
00108   virtual const csVector3 GetFullPosition () const = 0;
00109 
00113   virtual void SetTransform (const csMatrix3& matrix) = 0;
00114 
00118   virtual void SetTransform (const csReversibleTransform& t) = 0;
00119 
00123   virtual csReversibleTransform& GetTransform () = 0;
00124 
00129   virtual csReversibleTransform GetFullTransform () const = 0;
00130 
00134   virtual void MovePosition (const csVector3& v) = 0;
00135 
00139   virtual void Transform (const csMatrix3& matrix) = 0;
00140 
00145   virtual void AddListener (iMovableListener* listener, void* userdata) = 0;
00146 
00150   virtual void RemoveListener (iMovableListener* listener) = 0;
00151 
00158   virtual void UpdateMove () = 0;
00159 
00165   virtual long GetUpdateNumber () const = 0;
00166 };
00167 
00168 #endif

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000