/********************************************************************
*
* Created: 15/4/2014 15:28
*
* File: fsCHookedLineTrailComponent.h
*
* Author: Mick Waites
*
* Purpose:
*
*********************************************************************/
#ifndef fsCHookedLineTrailComponenthdr
#define fsCHookedLineTrailComponenthdr
#include <fsCore/fsVec2d.h>
#include <fsCore/fsPoint.h>
#include "fsITrailComponent.h"
class fsCBezierPath;
class fsCHookedLineTrailComponent : public fsITrailComponent
{
friend class fsCComponentFactory;
public:
static fsF32 distanceBetweenPoints(const fsVec2d& pKnotA, const fsVec2d& pKnotB);
static fsVec2d midPoint(const fsVec2d& pStart, const fsVec2d& pEnd);
static const fsCUniqueId mTypeId;
protected:
static fsIComponent* create(fsCEntity* pParent);
void initialiseDo(const fsPoint& pStartPos, const fsPoint& pEndPos) override;
void updateDo() override;
fsCHookedLineTrailComponent(fsCEntity* pParent);
virtual ~fsCHookedLineTrailComponent();<--- Destructor in derived class
private:
fsCBezierPath* mPath;
};
#endif