comparison engine/core/view/renderers/genericrenderer.i @ 29:0cb049f291e1

make members private and prefix with m_
author spq@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 11 Jul 2008 13:00:10 +0000
parents 788cb9525b2f
children 75b6394ced14
comparison
equal deleted inserted replaced
28:1e3b68c260a6 29:0cb049f291e1
43 Location* m_location; 43 Location* m_location;
44 Point m_point; 44 Point m_point;
45 }; 45 };
46 class GenericRendererElementInfo { 46 class GenericRendererElementInfo {
47 public: 47 public:
48 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) = 0; 48 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) {};
49 virtual ~GenericRendererElementInfo() {}; 49 virtual ~GenericRendererElementInfo() {};
50 }; 50 };
51 51
52 class GenericRendererLineInfo : public GenericRendererElementInfo { 52 class GenericRendererLineInfo : public GenericRendererElementInfo {
53 public: 53 public:
54 GenericRendererNode n1; 54 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
55 GenericRendererNode n2;
56 uint8_t r;
57 uint8_t g;
58 uint8_t b;
59 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
60 GenericRendererLineInfo(GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b); 55 GenericRendererLineInfo(GenericRendererNode n1, GenericRendererNode n2, uint8_t r, uint8_t g, uint8_t b);
61 virtual ~GenericRendererLineInfo() {}; 56 virtual ~GenericRendererLineInfo() {};
57 private:
58 GenericRendererNode m_edge1;
59 GenericRendererNode m_edge2;
60 uint8_t m_red;
61 uint8_t m_green;
62 uint8_t m_blue;
62 }; 63 };
63 class GenericRendererPointInfo : public GenericRendererElementInfo { 64 class GenericRendererPointInfo : public GenericRendererElementInfo {
64 public: 65 public:
65 GenericRendererNode n; 66 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
66 uint8_t r;
67 uint8_t g;
68 uint8_t b;
69 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
70 GenericRendererPointInfo(GenericRendererNode n, uint8_t r, uint8_t g, uint8_t b); 67 GenericRendererPointInfo(GenericRendererNode n, uint8_t r, uint8_t g, uint8_t b);
71 virtual ~GenericRendererPointInfo() {}; 68 virtual ~GenericRendererPointInfo() {};
69 private:
70 GenericRendererNode m_anchor;
71 uint8_t m_red;
72 uint8_t m_green;
73 uint8_t m_blue;
72 }; 74 };
73 class GenericRendererQuadInfo : public GenericRendererElementInfo { 75 class GenericRendererQuadInfo : public GenericRendererElementInfo {
74 public: 76 public:
75 GenericRendererNode n1; 77 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
76 GenericRendererNode n2;
77 GenericRendererNode n3;
78 GenericRendererNode n4;
79 uint8_t r;
80 uint8_t g;
81 uint8_t b;
82 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
83 GenericRendererQuadInfo(GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b); 78 GenericRendererQuadInfo(GenericRendererNode n1, GenericRendererNode n2, GenericRendererNode n3, GenericRendererNode n4, uint8_t r, uint8_t g, uint8_t b);
84 virtual ~GenericRendererQuadInfo() {}; 79 virtual ~GenericRendererQuadInfo() {};
80 private:
81 GenericRendererNode m_edge1;
82 GenericRendererNode m_edge2;
83 GenericRendererNode m_edge3;
84 GenericRendererNode m_edge4;
85 uint8_t m_red;
86 uint8_t m_green;
87 uint8_t m_blue;
85 }; 88 };
86 class GenericRendererImageInfo : public GenericRendererElementInfo { 89 class GenericRendererImageInfo : public GenericRendererElementInfo {
87 public: 90 public:
88 GenericRendererNode n; 91 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
89 int image;
90 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
91 GenericRendererImageInfo(GenericRendererNode n, int image); 92 GenericRendererImageInfo(GenericRendererNode n, int image);
92 virtual ~GenericRendererImageInfo() {}; 93 virtual ~GenericRendererImageInfo() {};
94 private:
95 GenericRendererNode m_anchor;
96 int m_image;
93 }; 97 };
94 class GenericRendererAnimationInfo : public GenericRendererElementInfo { 98 class GenericRendererAnimationInfo : public GenericRendererElementInfo {
95 public: 99 public:
96 GenericRendererNode n; 100 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
97 int animation;
98 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
99 GenericRendererAnimationInfo(GenericRendererNode n, int animation); 101 GenericRendererAnimationInfo(GenericRendererNode n, int animation);
100 virtual ~GenericRendererAnimationInfo() {}; 102 virtual ~GenericRendererAnimationInfo() {};
103 private:
104 GenericRendererNode m_anchor;
105 int m_animation;
101 }; 106 };
102 class GenericRendererTextInfo : public GenericRendererElementInfo { 107 class GenericRendererTextInfo : public GenericRendererElementInfo {
103 public: 108 public:
104 GenericRendererNode n; 109 void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
105 AbstractFont* font;
106 std::string text;
107 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool);
108 GenericRendererTextInfo(GenericRendererNode n, AbstractFont* font, std::string text); 110 GenericRendererTextInfo(GenericRendererNode n, AbstractFont* font, std::string text);
109 virtual ~GenericRendererTextInfo() {}; 111 virtual ~GenericRendererTextInfo() {};
112 private:
113 GenericRendererNode m_anchor;
114 AbstractFont* m_font;
115 std::string m_text;
110 }; 116 };
111 class GenericRenderer: public RendererBase { 117 class GenericRenderer: public RendererBase {
112 public: 118 public:
113 GenericRenderer(RenderBackend* renderbackend, int position, ImagePool* imagepool, AnimationPool* animpool); 119 GenericRenderer(RenderBackend* renderbackend, int position, ImagePool* imagepool, AnimationPool* animpool);
114 ~GeometricRenderer(); 120 ~GeometricRenderer();