BALL 1.5.0
Loading...
Searching...
No Matches
STLRenderer.h
Go to the documentation of this file.
1//STLRenderer: Version 1.0 (2008.09.12) Annette Treichel
2
3#ifndef BALL_VIEW_RENDERING_RENDERERS_STLRENDERER_H
4#define BALL_VIEW_RENDERING_RENDERERS_STLRENDERER_H
5
6#ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
8#endif
9
10#ifndef BALL_SYSTEM_FILE_H
11# include <BALL/SYSTEM/file.h>
12#endif
13
14#ifndef BALL_MATHS_VECTOR3_H
15# include <BALL/MATHS/vector3.h>
16#endif
17
18#ifndef BALL_MATHS_MATRIX44_H
19# include <BALL/MATHS/matrix44.h>
20#endif
21
22namespace BALL
23{
24 namespace VIEW
25 {
26
36 : public Renderer
37{
38 public:
39
43
46
51 STLRenderer(const String& name);
52
54 virtual ~STLRenderer();
55
57 virtual void clear();
58
60
63
68 void setFileName(const String& name);
69
70
74
76
79
83 virtual bool init(const Stage& stage);
84
88 virtual bool finish();
89
91
92 void renderSphere_(const Sphere& sphere);
93
94 void renderMesh_(const Mesh& mesh);
95
96 void renderTube_(const Tube& tube);
97
99
100 void renderLine_(const Line& tube);
101
103
104 void out_(const String& data);
105
106 void outheader_(const String& data)
107 {out_(data); current_indent_ += 1;}
108
109 void outfinish_(const String& data)
110 {out_(data); current_indent_ -= 1;}
111
112 Size width, height;
113
114 protected:
115
116 void header_(const Vector3& translation, const ColorRGBA& color,
117 const String& rotation = "");
118
119 void footer_();
120
122
127};
128
129} } // namespaces
130
131#endif // BALL_VIEW_RENDERING_STLRENDERER_H
132
void renderTwoColoredTube_(const TwoColoredTube &tube)
Render a tube with two colors.
void out_(const String &data)
void outfinish_(const String &data)
void header_(const Vector3 &translation, const ColorRGBA &color, const String &rotation="")
String VRMLVector3(Vector3 input)
void renderLine_(const Line &tube)
Render a line.
virtual void clear()
Clear method.
virtual bool init(const Stage &stage)
void renderSphere_(const Sphere &sphere)
Render a sphere.
void renderTube_(const Tube &tube)
Render a tube.
STLRenderer(const String &name)
void renderTwoColoredLine_(const TwoColoredLine &tube)
Render a line with two colors.
virtual ~STLRenderer()
Destructor.
void outheader_(const String &data)
void setFileName(const String &name)
void renderMesh_(const Mesh &mesh)
Render a surface mesh.
STLRenderer()
Default constructor.
virtual bool finish()
#define BALL_VIEW_EXPORT