CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

movable.h

Go to the documentation of this file.
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 __CS_IENGINE_MOVABLE_H__
00020 #define __CS_IENGINE_MOVABLE_H__
00021 
00028 #include "csutil/scf.h"
00029 #include "csutil/csvector.h"
00030 #include "csgeom/transfrm.h"
00031 
00032 class csVector3;
00033 class csMatrix3;
00034 struct iSector;
00035 struct iMovable;
00036 struct iSectorList;
00037 
00038 SCF_VERSION (iMovableListener, 0, 0, 1);
00039 
00044 struct iMovableListener : public iBase
00045 {
00050   virtual void MovableChanged (iMovable* movable) = 0;
00052   virtual void MovableDestroyed (iMovable* movable) = 0;
00053 };
00054 
00055 SCF_VERSION (iMovable, 0, 1, 2);
00056 
00073 struct iMovable : public iBase
00074 {
00079   virtual iMovable* GetParent () const = 0;
00085   virtual void SetParent (iMovable* parent) = 0;
00086 
00096   virtual void SetSector (iSector* sector) = 0;
00097 
00106   virtual void ClearSectors () = 0;
00107 
00120   virtual iSectorList* GetSectors () = 0;
00121 
00125   virtual bool InSector () const = 0;
00126 
00137   virtual void SetPosition (iSector* home, const csVector3& v) = 0;
00138 
00149   virtual void SetPosition (const csVector3& v) = 0;
00150 
00159   virtual const csVector3& GetPosition () const = 0;
00160 
00166   virtual const csVector3 GetFullPosition () const = 0;
00167 
00182   virtual void SetTransform (const csMatrix3& matrix) = 0;
00183 
00197   virtual void SetTransform (const csReversibleTransform& t) = 0;
00198 
00209   virtual csReversibleTransform& GetTransform () = 0;
00210 
00215   virtual csReversibleTransform GetFullTransform () const = 0;
00216 
00227   virtual void MovePosition (const csVector3& v) = 0;
00228 
00236   virtual void Transform (const csMatrix3& matrix) = 0;
00237 
00243   virtual void AddListener (iMovableListener* listener) = 0;
00244 
00248   virtual void RemoveListener (iMovableListener* listener) = 0;
00249 
00261   virtual void UpdateMove () = 0;
00262 
00268   virtual long GetUpdateNumber () const = 0;
00269 
00286   virtual bool IsTransformIdentity () const = 0;
00287 
00296   virtual bool IsFullTransformIdentity () const = 0;
00297 
00307   virtual void TransformIdentity () = 0;
00308 };
00309 
00312 #endif // __CS_IENGINE_MOVABLE_H__

Generated for Crystal Space by doxygen 1.2.14