Project

General

Profile

SO3Engine
SO3Lines.h
Go to the documentation of this file.
1
2#ifndef __SO3_LINES_H__
3#define __SO3_LINES_H__
4
6#include <Ogre.h>
7
8namespace SO3
9{
10
13class SLines : public Ogre::SimpleRenderable
14{
15public:
16protected:
17private:
18 bool _drawn;
19 std::vector<Ogre::Vector3> _points;
20 Ogre::ColourValue colour;
21 static bool _material_created;
22 bool mDashed;
23
24public:
27 SLines(const Ogre::ColourValue& defaultColour = Ogre::ColourValue::White, bool dashed = false, bool disableDepth = false);
28
31 ~SLines();
32
36 Ogre::ColourValue GetColour();
37
41 void SetColour(const Ogre::ColourValue& newColour);
42
45 void AddLine(const Ogre::Vector3& start, const Ogre::Vector3& end);
46
49 void AddLine(const Ogre::Real& start_x, const Ogre::Real& start_y, const Ogre::Real& start_z, const Ogre::Real& end_x, const Ogre::Real& end_y, const Ogre::Real& end_z);
50
53 void AddPoint(const size_t& pointIndex, const Ogre::Vector3& pt);
54
57 void AddPoint(const size_t& pointIndex, const Ogre::Real& x, const Ogre::Real& y, const Ogre::Real& z);
58
61 void AddPoint(const Ogre::Vector3& pt);
62
65 void RemovePoint(const size_t& pointIndex);
66
69 void AddPoint(const Ogre::Real& x, const Ogre::Real& y, const Ogre::Real& z);
70
73 size_t GetNumberOfPoints() const;
74
77 Ogre::Vector3 GetPoint(const size_t& pointIndex);
78
81 void SetPoint(const size_t& pointIndex, const Ogre::Vector3& pt);
82
85 void SetPoint(const size_t& pointIndex, const Ogre::Real& x, const Ogre::Real& y, const Ogre::Real& z);
86
90 void Draw();
91
95 void DrawDash();
96
97 void SetDashed(bool dashed);
98
99 bool GetDashed();
100
104 void Clear();
105
109 virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera* cam) const;
110
114 virtual Ogre::Real getBoundingRadius() const;
115protected:
116private:
120 void ClearDraw();
121};
122
123}
124
125#endif
126
librairies include
void SetColour(const Ogre::ColourValue &newColour)
Definition SO3Lines.cpp:77
void SetPoint(const size_t &pointIndex, const Ogre::Vector3 &pt)
Definition SO3Lines.cpp:155
void SetDashed(bool dashed)
Definition SO3Lines.cpp:171
Ogre::ColourValue GetColour()
Definition SO3Lines.cpp:72
void AddLine(const Ogre::Vector3 &start, const Ogre::Vector3 &end)
Definition SO3Lines.cpp:83
void RemovePoint(const size_t &pointIndex)
Definition SO3Lines.cpp:126
void Draw()
Definition SO3Lines.cpp:181
bool GetDashed()
Definition SO3Lines.cpp:176
void AddPoint(const size_t &pointIndex, const Ogre::Vector3 &pt)
Definition SO3Lines.cpp:96
size_t GetNumberOfPoints() const
Definition SO3Lines.cpp:137
void Clear()
Definition SO3Lines.cpp:57
virtual Ogre::Real getBoundingRadius() const
Definition SO3Lines.cpp:318
void DrawDash()
Definition SO3Lines.cpp:262
Ogre::Vector3 GetPoint(const size_t &pointIndex)
Definition SO3Lines.cpp:142
virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera *cam) const
Definition SO3Lines.cpp:307