|
collider.h00001 /* 00002 Copyright (C) 1998-2001 by Jorrit Tyberghein 00003 Written by Alex Pfaffe. 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public 00016 License along with this library; if not, write to the Free 00017 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 #ifndef __CS_COLLIDER_H__ 00020 #define __CS_COLLIDER_H__ 00021 00022 #include "csutil/csobject.h" 00023 #include "csgeom/math3d.h" 00024 #include "csgeom/matrix3.h" 00025 #include "csgeom/vector3.h" 00026 00027 class csReversibleTransform; 00028 struct iPolygonMesh; 00029 struct iCollideSystem; 00030 struct iCollider; 00031 struct iObject; 00032 00033 00034 SCF_VERSION (csColliderWrapper, 0, 0, 3); 00035 00044 class csColliderWrapper : public csObject 00045 { 00046 private: 00047 iCollideSystem* collide_system; 00048 iCollider* collider; 00049 00050 public: 00052 csColliderWrapper (csObject& parent, iCollideSystem* collide_system, 00053 iPolygonMesh* mesh); 00054 00056 csColliderWrapper (iObject* parent, iCollideSystem* collide_system, 00057 iPolygonMesh* mesh); 00058 00060 virtual ~csColliderWrapper (); 00061 00063 iCollider* GetCollider () { return collider; } 00064 00066 iCollideSystem* GetCollideSystem () { return collide_system; } 00067 00075 bool Collide (csColliderWrapper& pOtherCollider, 00076 csReversibleTransform* pThisTransform = NULL, 00077 csReversibleTransform* pOtherTransform = NULL); 00082 bool Collide (csObject& otherObject, 00083 csReversibleTransform* pThisTransform = NULL, 00084 csReversibleTransform* pOtherTransform = NULL); 00089 bool Collide (iObject* otherObject, 00090 csReversibleTransform* pThisTransform = NULL, 00091 csReversibleTransform* pOtherTransform = NULL); 00092 00097 static csColliderWrapper* GetColliderWrapper (csObject& object); 00098 00103 static csColliderWrapper* GetColliderWrapper (iObject* object); 00104 00105 SCF_DECLARE_IBASE_EXT (csObject); 00106 }; 00107 00108 #endif // __CS_COLLIDER_H__ Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000 |