aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h320
1 files changed, 160 insertions, 160 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h b/libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h
index 5c2e55e..50c2a36 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CTextSceneNode.h
@@ -1,160 +1,160 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_TEXT_SCENE_NODE_H_INCLUDED__ 5#ifndef __C_TEXT_SCENE_NODE_H_INCLUDED__
6#define __C_TEXT_SCENE_NODE_H_INCLUDED__ 6#define __C_TEXT_SCENE_NODE_H_INCLUDED__
7 7
8#include "ITextSceneNode.h" 8#include "ITextSceneNode.h"
9#include "IBillboardTextSceneNode.h" 9#include "IBillboardTextSceneNode.h"
10#include "IGUIFont.h" 10#include "IGUIFont.h"
11#include "IGUIFontBitmap.h" 11#include "IGUIFontBitmap.h"
12#include "ISceneCollisionManager.h" 12#include "ISceneCollisionManager.h"
13#include "SMesh.h" 13#include "SMesh.h"
14 14
15namespace irr 15namespace irr
16{ 16{
17namespace scene 17namespace scene
18{ 18{
19 19
20 20
21 class CTextSceneNode : public ITextSceneNode 21 class CTextSceneNode : public ITextSceneNode
22 { 22 {
23 public: 23 public:
24 24
25 //! constructor 25 //! constructor
26 CTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, 26 CTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
27 gui::IGUIFont* font, scene::ISceneCollisionManager* coll, 27 gui::IGUIFont* font, scene::ISceneCollisionManager* coll,
28 const core::vector3df& position = core::vector3df(0,0,0), const wchar_t* text=0, 28 const core::vector3df& position = core::vector3df(0,0,0), const wchar_t* text=0,
29 video::SColor color=video::SColor(100,0,0,0)); 29 video::SColor color=video::SColor(100,0,0,0));
30 30
31 //! destructor 31 //! destructor
32 virtual ~CTextSceneNode(); 32 virtual ~CTextSceneNode();
33 33
34 virtual void OnRegisterSceneNode(); 34 virtual void OnRegisterSceneNode();
35 35
36 //! renders the node. 36 //! renders the node.
37 virtual void render(); 37 virtual void render();
38 38
39 //! returns the axis aligned bounding box of this node 39 //! returns the axis aligned bounding box of this node
40 virtual const core::aabbox3d<f32>& getBoundingBox() const; 40 virtual const core::aabbox3d<f32>& getBoundingBox() const;
41 41
42 //! sets the text string 42 //! sets the text string
43 virtual void setText(const wchar_t* text); 43 virtual void setText(const wchar_t* text);
44 44
45 //! sets the color of the text 45 //! sets the color of the text
46 virtual void setTextColor(video::SColor color); 46 virtual void setTextColor(video::SColor color);
47 47
48 //! Returns type of the scene node 48 //! Returns type of the scene node
49 virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; } 49 virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; }
50 50
51 private: 51 private:
52 52
53 core::stringw Text; 53 core::stringw Text;
54 video::SColor Color; 54 video::SColor Color;
55 gui::IGUIFont* Font; 55 gui::IGUIFont* Font;
56 scene::ISceneCollisionManager* Coll; 56 scene::ISceneCollisionManager* Coll;
57 core::aabbox3d<f32> Box; 57 core::aabbox3d<f32> Box;
58 }; 58 };
59 59
60 class CBillboardTextSceneNode : public IBillboardTextSceneNode 60 class CBillboardTextSceneNode : public IBillboardTextSceneNode
61 { 61 {
62 public: 62 public:
63 63
64 CBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, 64 CBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
65 gui::IGUIFont* font,const wchar_t* text, 65 gui::IGUIFont* font,const wchar_t* text,
66 const core::vector3df& position, const core::dimension2d<f32>& size, 66 const core::vector3df& position, const core::dimension2d<f32>& size,
67 video::SColor colorTop, video::SColor shade_bottom); 67 video::SColor colorTop, video::SColor shade_bottom);
68 68
69 //! destructor 69 //! destructor
70 virtual ~CBillboardTextSceneNode(); 70 virtual ~CBillboardTextSceneNode();
71 71
72 //! sets the vertex positions etc 72 //! sets the vertex positions etc
73 virtual void OnAnimate(u32 timeMs); 73 virtual void OnAnimate(u32 timeMs);
74 74
75 //! registers the node into the transparent pass 75 //! registers the node into the transparent pass
76 virtual void OnRegisterSceneNode(); 76 virtual void OnRegisterSceneNode();
77 77
78 //! renders the node. 78 //! renders the node.
79 virtual void render(); 79 virtual void render();
80 80
81 //! returns the axis aligned bounding box of this node 81 //! returns the axis aligned bounding box of this node
82 virtual const core::aabbox3d<f32>& getBoundingBox() const; 82 virtual const core::aabbox3d<f32>& getBoundingBox() const;
83 83
84 //! sets the text string 84 //! sets the text string
85 virtual void setText(const wchar_t* text); 85 virtual void setText(const wchar_t* text);
86 86
87 //! sets the color of the text 87 //! sets the color of the text
88 virtual void setTextColor(video::SColor color); 88 virtual void setTextColor(video::SColor color);
89 89
90 //! sets the size of the billboard 90 //! sets the size of the billboard
91 virtual void setSize(const core::dimension2d<f32>& size); 91 virtual void setSize(const core::dimension2d<f32>& size);
92 92
93 //! gets the size of the billboard 93 //! gets the size of the billboard
94 virtual const core::dimension2d<f32>& getSize() const; 94 virtual const core::dimension2d<f32>& getSize() const;
95 95
96 virtual video::SMaterial& getMaterial(u32 i); 96 virtual video::SMaterial& getMaterial(u32 i);
97 97
98 //! returns amount of materials used by this scene node. 98 //! returns amount of materials used by this scene node.
99 virtual u32 getMaterialCount() const; 99 virtual u32 getMaterialCount() const;
100 100
101 //! Returns type of the scene node 101 //! Returns type of the scene node
102 virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; } 102 virtual ESCENE_NODE_TYPE getType() const { return ESNT_TEXT; }
103 103
104 //! Set the color of all vertices of the billboard 104 //! Set the color of all vertices of the billboard
105 //! \param overallColor: the color to set 105 //! \param overallColor: the color to set
106 virtual void setColor(const video::SColor & overallColor); 106 virtual void setColor(const video::SColor & overallColor);
107 107
108 //! Set the color of the top and bottom vertices of the billboard 108 //! Set the color of the top and bottom vertices of the billboard
109 //! \param topColor: the color to set the top vertices 109 //! \param topColor: the color to set the top vertices
110 //! \param bottomColor: the color to set the bottom vertices 110 //! \param bottomColor: the color to set the bottom vertices
111 virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor); 111 virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor);
112 112
113 //! Gets the color of the top and bottom vertices of the billboard 113 //! Gets the color of the top and bottom vertices of the billboard
114 //! \param topColor: stores the color of the top vertices 114 //! \param topColor: stores the color of the top vertices
115 //! \param bottomColor: stores the color of the bottom vertices 115 //! \param bottomColor: stores the color of the bottom vertices
116 virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const; 116 virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const;
117 117
118 virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth) 118 virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth)
119 { 119 {
120 setSize(core::dimension2df(bottomEdgeWidth, height)); 120 setSize(core::dimension2df(bottomEdgeWidth, height));
121 } 121 }
122 122
123 virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const 123 virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const
124 { 124 {
125 height = Size.Height; 125 height = Size.Height;
126 bottomEdgeWidth = Size.Width; 126 bottomEdgeWidth = Size.Width;
127 topEdgeWidth = Size.Width; 127 topEdgeWidth = Size.Width;
128 } 128 }
129 129
130 private: 130 private:
131 131
132 core::stringw Text; 132 core::stringw Text;
133 video::SColor Color; 133 video::SColor Color;
134 gui::IGUIFontBitmap* Font; 134 gui::IGUIFontBitmap* Font;
135 135
136 core::dimension2d<f32> Size; 136 core::dimension2d<f32> Size;
137 core::aabbox3d<f32> BBox; 137 core::aabbox3d<f32> BBox;
138 video::SMaterial Material; 138 video::SMaterial Material;
139 139
140 video::SColor ColorTop; 140 video::SColor ColorTop;
141 video::SColor ColorBottom; 141 video::SColor ColorBottom;
142 struct SSymbolInfo 142 struct SSymbolInfo
143 { 143 {
144 u32 bufNo; 144 u32 bufNo;
145 f32 Width; 145 f32 Width;
146 f32 Kerning; 146 f32 Kerning;
147 u32 firstInd; 147 u32 firstInd;
148 u32 firstVert; 148 u32 firstVert;
149 }; 149 };
150 150
151 core::array < SSymbolInfo > Symbol; 151 core::array < SSymbolInfo > Symbol;
152 152
153 SMesh *Mesh; 153 SMesh *Mesh;
154 }; 154 };
155 155
156} // end namespace scene 156} // end namespace scene
157} // end namespace irr 157} // end namespace irr
158 158
159#endif 159#endif
160 160