1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/********************************************************************
*
*	Created:	15/4/2014   15:28
*
*	File:		fsCStraightLineTrailComponent.h
*
*	Author:		Mick Waites
*	
*	Purpose:	
*
*********************************************************************/

#ifndef fsCStraightLineTrailComponenthdr
#define fsCStraightLineTrailComponenthdr

#include "../../src/fsCGraph.h"
#include "fsITrailComponent.h"


class fsCStraightLineTrailComponent : public fsITrailComponent
{
	friend class fsCComponentFactory;

public:

	static const fsCUniqueId mTypeId;

protected:

	static fsIComponent* create(fsCEntity* pParent);

	void initialiseDo(const fsPoint& pStartPos, const fsPoint& pEndPos) override;
	void updateDo() override;

	fsCStraightLineTrailComponent(fsCEntity* pParent);
	virtual ~fsCStraightLineTrailComponent();<--- Destructor in derived class

private:

	fsCGraph<fsF32> mPosXGraph;
	fsCGraph<fsF32> mPosYGraph;
};

#endif