-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCText.h
More file actions
36 lines (27 loc) · 703 Bytes
/
CText.h
File metadata and controls
36 lines (27 loc) · 703 Bytes
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
/*
* CText.h
*
* Created on: Mar 7, 2011
* Author: enekochan
*/
#ifndef CTEXT_H_
#define CTEXT_H_
#include <osgViewer/Viewer>
#include <osgViewer/ViewerEventHandlers>
#include <osgDB/FileUtils>
#include <osgDB/ReadFile>
#include <osg/ImageStream>
#include <osg/TextureRectangle>
class CText : public osg::Group {
public:
CText(std::string textString);
void setText(std::string textString);
void setColor(float r, float g, float b, float a);
void setPosition(osg::Vec3 pos);
protected:
~CText();
private:
osgText::Text* text;
osg::Geode* createTextGeode(std::string textString, float r, float g, float b, float a);
};
#endif /* CTEXT_H_ */