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
45
46
47
48
49
/********************************************************************
*
*	File:		gfCPhotographableComponent.h
*
*	Purpose:	Marks an entity as being eligible for photo capture
*				and reuses its particle emitter hit testing.
*
*********************************************************************/

#ifndef gfCPhotographableComponenthdr
#define gfCPhotographableComponenthdr

#include <fsCore/src/fsCUniqueId.h>

#include "gfICollectableComponent.h"

struct fsPoint;
class fsRect;


class gfCPhotographableComponent : public gfICollectableComponent
{
	friend class fsCComponentFactory;

public:

	static const fsCUniqueId mTypeId;
	static const fsStr mEntityPrefix;

	const fsStr& subjectIdGet() const;
	fsBool hitTest(const fsPoint& pScreenPos) const;
	fsS32 photoScoreGet(const fsRect& pScreenRect) const;

protected:

	void resetDo() override;
	void finaliseDo() override;
	void listenersRegisterDo() override;
	void listenersDeregisterDo() override;
	fsBool messageProcessDo(const fsCUniqueId& pMessageType,
	                        const fsIMessageDispatcher::sMessageParameters& pParam) override;

	static fsIComponent* create(fsCEntity* pParent);

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

#endif