GlobeEngine
PointCloudExampleEngine.h
Go to the documentation of this file.
1 
9 #ifndef GlobeEngine_PCExampleEngine_h
10 #define GlobeEngine_PCExampleEngine_h
11 
12 #include <math.h>
13 #include <ctime>
14 #include <iostream>
15 #include <stdio.h>
16 #include <vector>
17 #include "OpenGL_Includes.h"
18 #include "Engine.h"
19 #include "Shader.h"
20 #include "FlightCamera.h"
21 #include "Common.h"
22 #include "CoordinateSystem.h"
23 #include "SceneStateSet.h"
24 #include "DrawableComponent.h"
25 #include "Plane.h"
26 #include "DebugMap.h"
27 #include "PointCloud.h"
28 #include "MultiLineObject.h"
30 #include "PLYObject.h"
31 #include "Mesh.h"
32 
33 namespace gePointCloudExample {
35  {
36  public:
39 
40  void clear();
41  void destroy();
42  void create();
43 
44  // overrides from ge::Engine
45  void initializeScene(std::string _projectsrcPath=0);
46  void drawScene();
47  void resize(int _w, int _h);
48  void update();
50 
51  void loadExamplePointCloud();
52  void loadRoomPointCloud(std::string _url);
53  void loadRoomMesh();
54 
55  void setPointsColoredPerVertex(bool _in);
56  void setNormalsVisible(bool _in);
57 
58  private:
59  std::shared_ptr<ge::Shader> programForUtilities;
60  std::shared_ptr<ge::Shader> programForPlanes;
61  std::shared_ptr<ge::Shader> programForDebug;
62  std::shared_ptr<ge::Shader> programForPointClouds;
63  std::shared_ptr<ge::Shader> programForNormals;
64  std::shared_ptr<ge::Shader> programForMeshes;
65 
66  // CoordinateCross
67  ge::CoordinateSystem coordinateSystem;
68  // Basic scene state
69  ge::SceneStateSet sceneStates[1];
70 
71  std::shared_ptr<ge::Plane> plane;
72 
73  float rotationAmount;
74 
75  // Debugger functionality
76  geUtil::DebugMap debugmap;
77 
78  std::shared_ptr<geData::PointCloud> examplePointcloud;
79  std::shared_ptr<geData::MultiLineObject> normalcloud;
80 
81  std::shared_ptr<geData::PointCloud> roomPointcloud;
82  std::shared_ptr<geData::Mesh> roomMesh;
83 
84  PointCloudExampleComposition uiComposition;
85  ge::FrameBufferObject gBuffer;
86 
87  int screenWidth;
88  int screenHeight;
89 
90  std::shared_ptr<ge::Texture2Drgba> spheretex;
91 
92  bool loadFromPLY;
93 
94  PLYObject roomPointCloudPLY;
95 
96  };
97 }
98 #endif
Definition: PointCloudExampleEngine.h:34
void create()
Definition: PointCloudExampleEngine.cpp:31
Definition: DebugMap.h:18
void setNormalsVisible(bool _in)
Definition: PointCloudExampleEngine.cpp:306
Definition: FrameBufferObject.h:20
void destroy()
Definition: PointCloudExampleEngine.cpp:26
Definition: PointCloudExampleComposition.h:13
void initializeScene(std::string _projectsrcPath=0)
Definition: PointCloudExampleEngine.cpp:36
void loadExamplePointCloud()
Definition: PointCloudExampleEngine.cpp:228
Definition: PointCloudExampleComposition.h:15
~PointCloudExampleEngine()
Definition: PointCloudExampleEngine.cpp:9
PointCloudExampleEngine()
Definition: PointCloudExampleEngine.cpp:4
Definition: Engine.h:20
void resize(int _w, int _h)
Definition: PointCloudExampleEngine.cpp:212
void update()
Definition: PointCloudExampleEngine.cpp:142
Definition: SceneStateSet.h:41
void updateFramebufferStandardID()
Definition: PointCloudExampleEngine.cpp:294
void drawScene()
Definition: PointCloudExampleEngine.cpp:156
void setPointsColoredPerVertex(bool _in)
Definition: PointCloudExampleEngine.cpp:302
Definition: CoordinateSystem.h:17
void loadRoomPointCloud(std::string _url)
Definition: PointCloudExampleEngine.cpp:255
void clear()
Definition: PointCloudExampleEngine.cpp:14