/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: include/sgx/graphics/curves/pathfollower.hpp

*/

#ifndef SGX_GFX_CURVE_PATHFOLLOWER_HPP
#define SGX_GFX_CURVE_PATHFOLLOWER_HPP 1


// CSplineFollower: An instance of this class is designed to track an entity's 
// progress along a spline. The entity need not actually be on the spline
// just in proximity of the spline. 

// Note: Assuming a typo where class name is given as both CSplineFollower and CPathFollower.

class CSplineFollower
{
public:
	CSplineFollower(const CSpline &);
	// No return value specified - assuming void.
	void trackPosition(sgxVector3* pPos);
	void update();

protected:
private:
	const	CSpline			*m_pSpline;
			CBezierHandle	m_NearestSubPoint;
			sgxVector3		*m_pTrackingPos;
			sgxVector3		m_vPreviousPos;
			tREAL32			m_fDistance2Spline;

	CSplineFollower() {} // prevent construction of s/f without a spline
};


#endif /* SGX_GFX_CURVE_PATHFOLLOWER_HPP */
