~ubuntu-branches/ubuntu/lucid/structure-synth/lucid

« back to all changes in this revision

Viewing changes to StructureSynth/Model/Rendering/POVRenderer.h

  • Committer: Bazaar Package Importer
  • Author(s): Miriam Ruiz
  • Date: 2009-04-13 13:28:45 UTC
  • Revision ID: james.westby@ubuntu.com-20090413132845-d7d42t4llxjxq0ez
Tags: upstream-0.9
ImportĀ upstreamĀ versionĀ 0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/// OBSOLETE CLASS. WILL BE REMOVED AT SOME POINT.
 
2
 
 
3
#pragma once
 
4
 
 
5
#include <QString>
 
6
#include "Renderer.h"
 
7
 
 
8
#include "../../../SyntopiaCore/Math/Vector3.h"
 
9
#include "SyntopiaCore/Math/Vector3.h"
 
10
#include "SyntopiaCore/Math/Matrix4.h"
 
11
 
 
12
namespace StructureSynth {
 
13
        namespace Model {       
 
14
                namespace Rendering {
 
15
 
 
16
                        /// A renderer implementation based on the SyntopiaCore POV widget.
 
17
                        class POVRenderer : public Renderer {
 
18
                        public:
 
19
                                POVRenderer(QString& output) : output(output) {};
 
20
                                virtual ~POVRenderer() {};
 
21
 
 
22
                                /// The primitives
 
23
                                virtual void drawBox(SyntopiaCore::Math::Vector3f base, 
 
24
                                                  SyntopiaCore::Math::Vector3f dir1 , 
 
25
                                                          SyntopiaCore::Math::Vector3f dir2, 
 
26
                                                          SyntopiaCore::Math::Vector3f dir3,
 
27
                                                                const QString& classID);
 
28
 
 
29
                                
 
30
                                virtual void drawMesh(  SyntopiaCore::Math::Vector3f /*startBase*/, 
 
31
                                                                                SyntopiaCore::Math::Vector3f /*startDir1*/, 
 
32
                                                                                SyntopiaCore::Math::Vector3f /*startDir2*/, 
 
33
                                                                                SyntopiaCore::Math::Vector3f /*endBase*/, 
 
34
                                                                                SyntopiaCore::Math::Vector3f /*endDir1*/, 
 
35
                                                                                SyntopiaCore::Math::Vector3f /*endDir2*/, 
 
36
                                                                                const QString& /*classID*/) {};
 
37
 
 
38
                                virtual void drawSphere(SyntopiaCore::Math::Vector3f center, float radius,
 
39
                                                                const QString& classID);
 
40
 
 
41
                                virtual void drawGrid(SyntopiaCore::Math::Vector3f base, 
 
42
                                                                SyntopiaCore::Math::Vector3f dir1, 
 
43
                                                                SyntopiaCore::Math::Vector3f dir2, 
 
44
                                                                SyntopiaCore::Math::Vector3f dir3,
 
45
                                                                const QString& classID);
 
46
 
 
47
                                virtual void drawLine(SyntopiaCore::Math::Vector3f from, 
 
48
                                                                                SyntopiaCore::Math::Vector3f to,
 
49
                                                                const QString& classID);
 
50
 
 
51
                                virtual void drawDot(SyntopiaCore::Math::Vector3f pos,
 
52
                                                                const QString& classID);
 
53
 
 
54
                                virtual void drawTriangle(SyntopiaCore::Math::Vector3f /*p1*/,
 
55
                                                                                 SyntopiaCore::Math::Vector3f /*p2*/,
 
56
                                                                             SyntopiaCore::Math::Vector3f /*p3*/,
 
57
                                                                                 const QString& /*classID*/) {};
 
58
 
 
59
                                virtual void begin();
 
60
                                virtual void end();
 
61
                                
 
62
                                virtual void setColor(SyntopiaCore::Math::Vector3f rgb) { this->rgb = rgb; }
 
63
                                virtual void setBackgroundColor(SyntopiaCore::Math::Vector3f rgb);
 
64
                                virtual void setAlpha(double alpha) { this->alpha = alpha; }
 
65
                        private:
 
66
                                void operator=(const POVRenderer&) {}; 
 
67
                                void writeline(QString text) const;
 
68
                                void write(QString text) const;
 
69
 
 
70
                                QString& output;
 
71
                                SyntopiaCore::Math::Vector3f rgb;
 
72
                                double alpha;
 
73
                        };
 
74
 
 
75
                }
 
76
        }
 
77
}
 
78