Panagiotis Christopoulos Charitos 13 лет назад
Родитель
Сommit
9bf9924f2c
3 измененных файлов с 45 добавлено и 0 удалено
  1. 9 0
      include/anki/scene/Sector.h
  2. 29 0
      include/anki/scene/Timestamp.h
  3. 7 0
      src/scene/Timestamp.cpp

+ 9 - 0
include/anki/scene/Sector.h

@@ -2,10 +2,19 @@
 #define ANKI_SCENE_SECTOR_H
 
 #include "anki/scene/Octree.h"
+#include <array>
 
 namespace anki {
 
 class SceneNode;
+class Sector;
+
+/// Portal
+class Portal
+{
+private:
+	std::array<Sector*, 2> sectors;
+};
 
 /// A sector
 class Sector

+ 29 - 0
include/anki/scene/Timestamp.h

@@ -0,0 +1,29 @@
+#ifndef ANKI_SCENE_TIMESTAMP_H
+#define ANKI_SCENE_TIMESTAMP_H
+
+namespace anki {
+
+/// Give the current timestamp. It actualy gives the current frame. Normaly it 
+/// should have been part of the Scene class but its a different class because 
+/// we don't want to include the whole Scene.h in those classes that just need 
+/// the timestamp
+class Timestamp
+{
+public:
+	static int increaseTimestamp()
+	{
+		++timestamp;
+	}
+
+	static int getTimestamp()
+	{
+		return timestamp;
+	}
+
+private:
+	static int timestamp;
+};
+
+} // end namespace anki
+
+#endif

+ 7 - 0
src/scene/Timestamp.cpp

@@ -0,0 +1,7 @@
+#include "anki/scene/Timestamp.h"
+
+namespace anki {
+
+int Timestamp::timestamp = 0;
+
+} // end namespace anki