Show kpathfollower.h syntax highlighted
/*
Copyright (C) 2003, 2004, 2005 by Luca Cappa
Written by Luca Cappa groton@users.sourceforge.net
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __KPATHFOLLOWER_H__
#define __KPATHFOLLOWER_H__
#include "cstool/meshobjtmpl.h"
struct iEngine;
struct iGraphics3D;
struct iMaterialWrapper;
struct iMeshWrapper;
class csTransform;
struct iPolygon3D;
struct iPolygon3DStatic;
struct iCollideSystem;
class scfString;
class csVector3;
class BlockId;
class KFlags;
class KPath;
class SKE;
class KSegment3;
class KPathFollower
{
protected:
KPath* m_path;
/**
* Number fo meters walked mistakly above
* which the walked path is meant to be wrong.
*/
float mMetersWalkedMistaklyTolerance;
KSegment3** m_segsFast;
csDirtyAccessArray<csVector3> m_points;
csArray<KSegment3> m_segs;
float m_mistakenMeters;
csVector3 m_lastPosition;
csVector3 m_initPosition;
int m_sequenceNumber;
public:
KPathFollower (KPath*, const csVector3& p_initialPosition);
virtual ~KPathFollower ();
//Copy ctor.
KPathFollower (const KPathFollower & p_pF);
void AddPosition (csVector3&, csVector3&, float);
bool IsPathLeft ();
void Reset ();
/**
* @see mMetersWalkedMistaklyTolerance
*/
void SetMetersTolerance (float pM)
{
mMetersWalkedMistaklyTolerance = pM;
};
/**
* @see mMetersWalkedMistaklyTolerance
* @return mMetersWalkedMistaklyTolerance
*/
float GetMetersTolerance ()
{
return mMetersWalkedMistaklyTolerance;
};
bool IsLastSegmentBeingTouched ();
};
#endif //__KPATHFOLLOWER_H__
See more files for this project here