iengine/movable.h Source File (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

iengine/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
    00029 #include "csutil/scf.h"
    00030 #include "csutil/refarr.h"
    00031
    00032 class csMatrix3;
    00033 class csReversibleTransform;
    00034 class csVector3;
    00035
    00036 struct iMovable;
    00037 struct iSector;
    00038 struct iSectorList;
    00039 struct iSceneNode;
    00040
    00048 struct iMovableListener : public virtual iBase
    00049 {
    00050   SCF_INTERFACE(iMovableListener, 2, 0, 0);
    00051
    00056   virtual void MovableChanged (iMovable* movable) = 0;
    00058   virtual void MovableDestroyed (iMovable* movable) = 0;
    00059 };
    00060
    00087 struct iMovable : public virtual iBase
    00088 {
    00089   SCF_INTERFACE(iMovable, 2,0,2);
    00090
    00094   virtual iSceneNode* GetSceneNode () = 0;
    00095
    00105   virtual void SetSector (iSector* sector) = 0;
    00106
    00115   virtual void ClearSectors () = 0;
    00116
    00129   virtual iSectorList* GetSectors () = 0;
    00130
    00134   virtual bool InSector () const = 0;
    00135
    00146   virtual void SetPosition (iSector* home, const csVector3& v) = 0;
    00147
    00158   virtual void SetPosition (const csVector3& v) = 0;
    00159
    00168   virtual const csVector3& GetPosition () const = 0;
    00169
    00175   virtual const csVector3 GetFullPosition () const = 0;
    00176
    00191   virtual void SetTransform (const csMatrix3& matrix) = 0;
    00192
    00206   virtual void SetTransform (const csReversibleTransform& t) = 0;
    00207
    00218   virtual csReversibleTransform& GetTransform () = 0;
    00219
    00224   virtual csReversibleTransform GetFullTransform () const = 0;
    00225
    00236   virtual void MovePosition (const csVector3& v) = 0;
    00237
    00245   virtual void Transform (const csMatrix3& matrix) = 0;
    00246
    00252   virtual void AddListener (iMovableListener* listener) = 0;
    00253
    00257   virtual void RemoveListener (iMovableListener* listener) = 0;
    00258
    00270   virtual void UpdateMove () = 0;
    00271
    00277   virtual long GetUpdateNumber () const = 0;
    00278
    00295   virtual bool IsTransformIdentity () const = 0;
    00296
    00305   virtual bool IsFullTransformIdentity () const = 0;
    00306
    00316   virtual void TransformIdentity () = 0;
    00317
    00324   virtual void SetFullTransform (const csReversibleTransform& t) = 0;
    00325
    00332   virtual void SetFullPosition (const csVector3& v) = 0;
    00333 };
    00334
    00337 #endif // __CS_IENGINE_MOVABLE_H__