Loading...
Searching...
No Matches
VRMLRenderer.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_VIEW_RENDERING_RENDERERS_VRMLRENDERER_H
#define BALL_VIEW_RENDERING_RENDERERS_VRMLRENDERER_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 ColorRGBA;
class BALL_DEPRECATED BALL_VIEW_EXPORT VRMLRenderer : public Renderer
{
public:
VRMLRenderer();
VRMLRenderer(const String& name);
virtual ~VRMLRenderer();
virtual void clear();
void setFileName(const String& name);
String VRMLColorRGBA(const ColorRGBA& input);
String VRMLVector3(Vector3 input);
void VRMLColor(const ColorRGBA& color);
virtual bool init(const Stage& stage);
virtual bool finish();
void renderSphere_(const Sphere& sphere);
void renderMesh_(const Mesh& mesh);
void renderLine_(const Line& miniTube);
void renderTwoColoredLine_(const TwoColoredLine& miniTube);
void renderTube_(const Tube& tube);
void renderTwoColoredTube_(const TwoColoredTube& 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_;
//size estimate for afterwards scaling for printing
float smallX, smallY, smallZ, bigX, bigY, bigZ;
//boolean showing if scaling is relevant afterall
bool scalingUsed;
};
} } // namespaces
#endif // BALL_VIEW_RENDERING_VRMLRENDERER_H
BALL_DEPRECATED
#define BALL_DEPRECATED
Definition COMMON/global.h:64
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::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
BALL::VIEW::VRMLRenderer::current_indent_
Index current_indent_
Definition VRMLRenderer.h:135
BALL::VIEW::VRMLRenderer::renderTube_
void renderTube_(const Tube &tube)
Render a tube.
BALL::VIEW::VRMLRenderer::outfile_
File outfile_
Definition VRMLRenderer.h:131
BALL::VIEW::VRMLRenderer::header_
void header_(const Vector3 &translation, const ColorRGBA &color, const String &rotation="")
BALL::VIEW::VRMLRenderer::out_
void out_(const String &data)
BALL::VIEW::VRMLRenderer::smallZ
float smallZ
Definition VRMLRenderer.h:138
BALL::VIEW::VRMLRenderer::VRMLVector3
String VRMLVector3(Vector3 input)
BALL::VIEW::VRMLRenderer::footer_
void footer_()
BALL::VIEW::VRMLRenderer::outfinish_
void outfinish_(const String &data)
Definition VRMLRenderer.h:119
BALL::VIEW::VRMLRenderer::renderLine_
void renderLine_(const Line &miniTube)
Render a line.
BALL::VIEW::VRMLRenderer::init
virtual bool init(const Stage &stage)
BALL::VIEW::VRMLRenderer::renderMesh_
void renderMesh_(const Mesh &mesh)
Render a surface mesh.
BALL::VIEW::VRMLRenderer::renderSphere_
void renderSphere_(const Sphere &sphere)
Render a sphere.
BALL::VIEW::VRMLRenderer::bigX
float bigX
Definition VRMLRenderer.h:138
BALL::VIEW::VRMLRenderer::scalingUsed
bool scalingUsed
Definition VRMLRenderer.h:141
BALL::VIEW::VRMLRenderer::outheader_
void outheader_(const String &data)
Definition VRMLRenderer.h:116
BALL::VIEW::VRMLRenderer::bigZ
float bigZ
Definition VRMLRenderer.h:138
BALL::VIEW::VRMLRenderer::rotation_
Matrix4x4 rotation_
Definition VRMLRenderer.h:134
BALL::VIEW::VRMLRenderer::height
Size height
Definition VRMLRenderer.h:122
BALL::VIEW::VRMLRenderer::finish
virtual bool finish()
BALL::VIEW::VRMLRenderer::smallY
float smallY
Definition VRMLRenderer.h:138
BALL::VIEW::VRMLRenderer::VRMLRenderer
VRMLRenderer(const String &name)
BALL::VIEW::VRMLRenderer::VRMLRenderer
VRMLRenderer()
Default constructor.
BALL::VIEW::VRMLRenderer::origin_
Vector3 origin_
Definition VRMLRenderer.h:133
BALL::VIEW::VRMLRenderer::width
Size width
Definition VRMLRenderer.h:122
BALL::VIEW::VRMLRenderer::VRMLColor
void VRMLColor(const ColorRGBA &color)
BALL::VIEW::VRMLRenderer::renderTwoColoredTube_
void renderTwoColoredTube_(const TwoColoredTube &tube)
Render a tube with two colors.
BALL::VIEW::VRMLRenderer::smallX
float smallX
Definition VRMLRenderer.h:138
BALL::VIEW::VRMLRenderer::setFileName
void setFileName(const String &name)
BALL::VIEW::VRMLRenderer::bigY
float bigY
Definition VRMLRenderer.h:138
BALL::VIEW::VRMLRenderer::renderTwoColoredLine_
void renderTwoColoredLine_(const TwoColoredLine &miniTube)
Render a line with two colors.
BALL::VIEW::VRMLRenderer::VRMLColorRGBA
String VRMLColorRGBA(const ColorRGBA &input)
BALL::VIEW::VRMLRenderer::clear
virtual void clear()
Clear method.
BALL::VIEW::VRMLRenderer::~VRMLRenderer
virtual ~VRMLRenderer()
Destructor.
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