Loading...
Searching...
No Matches
STLRenderer.h
Go to the documentation of this file.
//STLRenderer: Version 1.0 (2008.09.12) Annette Treichel
#ifndef BALL_VIEW_RENDERING_RENDERERS_STLRENDERER_H
#define BALL_VIEW_RENDERING_RENDERERS_STLRENDERER_H
#ifndef BALL_VIEW_RENDERING_RENDERERS_RENDERER_H
# include <BALL/VIEW/RENDERING/RENDERERS/renderer.h>
#endif
#ifndef BALL_SYSTEM_FILE_H
# include <BALL/SYSTEM/file.h>
#endif
#ifndef BALL_MATHS_VECTOR3_H
# include <BALL/MATHS/vector3.h>
#endif
#ifndef BALL_MATHS_MATRIX44_H
# include <BALL/MATHS/matrix44.h>
#endif
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT STLRenderer
: public Renderer
{
public:
STLRenderer();
STLRenderer(const String& name);
virtual ~STLRenderer();
virtual void clear();
void setFileName(const String& name);
String VRMLVector3(Vector3 input);
virtual bool init(const Stage& stage);
virtual bool finish();
void renderSphere_(const Sphere& sphere);
void renderMesh_(const Mesh& mesh);
void renderTube_(const Tube& tube);
void renderTwoColoredTube_(const TwoColoredTube& tube);
void renderLine_(const Line& tube);
void renderTwoColoredLine_(const TwoColoredLine& tube);
void out_(const String& data);
void outheader_(const String& data)
{out_(data); current_indent_ += 1;}
void outfinish_(const String& data)
{out_(data); current_indent_ -= 1;}
Size width, height;
protected:
void header_(const Vector3& translation, const ColorRGBA& color,
const String& rotation = "");
void footer_();
File outfile_;
Vector3 origin_;
Matrix4x4 rotation_;
Index current_indent_;
String endingName_;
};
} } // namespaces
#endif // BALL_VIEW_RENDERING_STLRENDERER_H
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::File
Definition file.h:136
BALL::String
Definition string.h:57
BALL::VIEW::ColorRGBA
Definition colorRGBA.h:32
BALL::VIEW::Line
Definition line.h:38
BALL::VIEW::Mesh
Definition mesh.h:42
BALL::VIEW::Renderer::Renderer
Renderer()
BALL::VIEW::STLRenderer::renderTwoColoredTube_
void renderTwoColoredTube_(const TwoColoredTube &tube)
Render a tube with two colors.
BALL::VIEW::STLRenderer::out_
void out_(const String &data)
BALL::VIEW::STLRenderer::outfinish_
void outfinish_(const String &data)
Definition STLRenderer.h:109
BALL::VIEW::STLRenderer::header_
void header_(const Vector3 &translation, const ColorRGBA &color, const String &rotation="")
BALL::VIEW::STLRenderer::origin_
Vector3 origin_
Definition STLRenderer.h:123
BALL::VIEW::STLRenderer::VRMLVector3
String VRMLVector3(Vector3 input)
BALL::VIEW::STLRenderer::current_indent_
Index current_indent_
Definition STLRenderer.h:125
BALL::VIEW::STLRenderer::renderLine_
void renderLine_(const Line &tube)
Render a line.
BALL::VIEW::STLRenderer::clear
virtual void clear()
Clear method.
BALL::VIEW::STLRenderer::init
virtual bool init(const Stage &stage)
BALL::VIEW::STLRenderer::rotation_
Matrix4x4 rotation_
Definition STLRenderer.h:124
BALL::VIEW::STLRenderer::renderSphere_
void renderSphere_(const Sphere &sphere)
Render a sphere.
BALL::VIEW::STLRenderer::outfile_
File outfile_
Definition STLRenderer.h:121
BALL::VIEW::STLRenderer::endingName_
String endingName_
Definition STLRenderer.h:126
BALL::VIEW::STLRenderer::width
Size width
Definition STLRenderer.h:112
BALL::VIEW::STLRenderer::renderTube_
void renderTube_(const Tube &tube)
Render a tube.
BALL::VIEW::STLRenderer::STLRenderer
STLRenderer(const String &name)
BALL::VIEW::STLRenderer::renderTwoColoredLine_
void renderTwoColoredLine_(const TwoColoredLine &tube)
Render a line with two colors.
BALL::VIEW::STLRenderer::~STLRenderer
virtual ~STLRenderer()
Destructor.
BALL::VIEW::STLRenderer::outheader_
void outheader_(const String &data)
Definition STLRenderer.h:106
BALL::VIEW::STLRenderer::height
Size height
Definition STLRenderer.h:112
BALL::VIEW::STLRenderer::setFileName
void setFileName(const String &name)
BALL::VIEW::STLRenderer::footer_
void footer_()
BALL::VIEW::STLRenderer::renderMesh_
void renderMesh_(const Mesh &mesh)
Render a surface mesh.
BALL::VIEW::STLRenderer::STLRenderer
STLRenderer()
Default constructor.
BALL::VIEW::STLRenderer::finish
virtual bool finish()
BALL::VIEW::Sphere
Definition sphere.h:33
BALL::VIEW::Stage
Definition stage.h:239
BALL::VIEW::Tube
Definition tube.h:40
BALL::VIEW::TwoColoredLine
Definition twoColoredLine.h:49
BALL::VIEW::TwoColoredTube
Definition twoColoredTube.h:49
file.h
BALL::Matrix4x4
TMatrix4x4< float > Matrix4x4
Definition matrix44.h:2184
matrix44.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
BALL::Index
BALL_INDEX_TYPE Index
Definition COMMON/global.h:105
renderer.h
vector3.h