File: State.h

package info (click to toggle)
structure-synth 1.0.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,072 kB
  • ctags: 1,176
  • sloc: cpp: 7,070; python: 167; makefile: 66; lisp: 25
file content (34 lines) | stat: -rw-r--r-- 960 bytes parent folder | download
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
33
34
#pragma once

#include <QString>
#include <QMap>
#include "../../SyntopiaCore/Math/Matrix4.h"

namespace StructureSynth {
	namespace Model {	

		class Rule; // Forward

		/// A state represent the current rendering projection matrix and other rendering settings.
		struct State {
			State();
			State(const State& rhs);
			~State();

			State& operator=(const State& rhs);

			void setPrevMatrix(SyntopiaCore::Math::Matrix4f matrix);

			SyntopiaCore::Math::Matrix4f matrix; // Transformation matrix (4x4 homogenous representation)			
			SyntopiaCore::Math::Vector3f hsv;    // Hue, Saturation, Value colorspace state
			float alpha;						 // Transparency 
			QMap<const Rule*, int> maxDepths;    // Rules may have a max. recursion depth before they are retired. 
												 // We need to keep track of this in the state.
			SyntopiaCore::Math::Matrix4f* prevMatrix; // previous matrix (if stored)
			int seed;
		};


	}
}