## Public API Reference

- Main Page
- Classes
- Files

# propclass/colldet.h

    00001 /*
    00002     Crystal Space Entity Layer
    00003     Copyright (C) 2001 PlaneShift Team (info@planeshift.it,
    00004     Copyright (C) 2001-2003 by Jorrit Tyberghein
    00005
    00006     This library is free software; you can redistribute it and/or
    00007     modify it under the terms of the GNU Library General Public
    00008     License as published by the Free Software Foundation; either
    00009     version 2 of the License, or (at your option) any later version.
    00010
    00011     This library is distributed in the hope that it will be useful,
    00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014     Library General Public License for more details.
    00015
    00016     You should have received a copy of the GNU Library General Public
    00017     License along with this library; if not, write to the Free
    00018     Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00019 */
    00020
    00021 /*
    00022  * This code is heavily based on pslinmove from the PlaneShift project.
    00023  * Thanks a lot for making this!
    00024  */
    00025
    00026 #ifndef __CEL_PF_COLL_DET__
    00027 #define __CEL_PF_COLL_DET__
    00028
    00029 #include "cstypes.h"
    00030 #include "csutil/scf.h"
    00031 #include "csutil/strhash.h"
    00032
    00033
    00034 SCF_VERSION (iPcCollisionDetection, 0, 0, 1);
    00035
    00043 struct iPcCollisionDetection : public iBase
    00044 {
    00053   virtual bool Init (const csVector3& body, const csVector3& legs,
    00054         const csVector3& shift)=0;
    00055
    00056   virtual bool Init ()=0;
    00057
    00061   virtual bool IsOnGround () const = 0;
    00062
    00064   virtual void SetOnGround (bool flag) = 0;
    00065
    00066   virtual void UseCD(bool flag) = 0;
    00067
    00072   virtual bool AdjustForCollisions (csVector3& oldpos,
    00073                                     csVector3& newpos,
    00074                                     csVector3& vel,
    00075                                     float delta,
    00076                                     iMovable* movable) = 0;
    00077   virtual bool QueryRevert() = 0;
    00078 };
    00079
    00080 #endif
    00081