File: Dot.cpp

package info (click to toggle)
structure-synth 1.5.0-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,268 kB
  • ctags: 1,966
  • sloc: cpp: 10,209; python: 164; makefile: 71; sh: 15
file content (32 lines) | stat: -rw-r--r-- 517 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "Dot.h"

#include "SyntopiaCore/Math/Vector3.h"

using namespace SyntopiaCore::Math;

namespace SyntopiaCore {
	namespace GLEngine {

		Dot::Dot(SyntopiaCore::Math::Vector3f pos) : pos(pos)
		{
			/// Bounding box
			from = pos;
			to = pos;
		};

		Dot::~Dot() { };

		void Dot::draw() const {
			glDisable (GL_LIGHTING);
			glColor4fv(primaryColor);
			glBegin(GL_POINTS);
			glVertex3f(pos.x(), pos.y(), pos.z());
			glEnd();			
			
			glEnable (GL_LIGHTING);

		};

	}
}