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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/********************************************************************
 *
 *    File:       fsCNative3dSprite.h
 *
 *    Purpose:    cocos2d-x implementation of 3d sprite.
 *
 *				  left hand rule, thumb up, index right, middle towards
 *				  x - right
 *				  y - up
 *				  z - out 
 *
 *********************************************************************/

#ifndef fsCNative3dSpritehdr
#define fsCNative3dSpritehdr

#include <fsCore/fsBaseTypes.h>

#if defined fs3d

#include "fsINative.h"

namespace ax { class MeshRenderer; }
namespace ax { class Animate3D; }
namespace ax { class Action; }

class fsI3dAnimation;
class fsI3dModelData;
class fsC3dCamera;
class fsC3dSprite;
class fsI3dLight;


class fsCNative3dSprite : public fsINative
{
	friend class fsC3dSpriteRenderData;

public:

	void trackSet(fsC3dSprite* const pAnimation);
	void pathSet(fsI3dAnimation* const pAnimation);
	void animationSet(fsI3dAnimation* const pAnimation);

	virtual ~fsCNative3dSprite();<--- Destructor in derived class

protected:

	virtual void renderDo() override;
	virtual void matrixApplyDo(const fsAffineMtx2d& pRenderMatrix) override;

	fsCNative3dSprite(fsI3dModelData* const pModelData);

private:

	virtual ax::Node* implGet() const override;

	ax::Mat4 mRenderMatrix;

	ax::MeshRenderer* mTrack;
	ax::Animate3D* mAnim;
	ax::Action* mPath;


	ax::MeshRenderer* mModelPtr;
};

#endif

#endif