Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
metrics.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include "property/property.h"
6 
7 
8 class Metrics {
9 public:
10  Metrics();
11 
12  static std::shared_ptr<Metrics> instance();
13 
14  float gameUnit();
15  void setGameUnit(float gameUnit);
16 
17  float toGameUnits(float metre);
18  float toMetres(float gameUnits);
19 
20 
21 protected:
22  static std::weak_ptr<Metrics> s_instance;
23 
24  Property<float> m_gameUnit;
25 };
26 
Definition: metrics.h:8