9 #ifndef GlobeEngine_DouglasPeuckerDrawablePath_h
10 #define GlobeEngine_DouglasPeuckerDrawablePath_h
14 #include "OpenGL_Includes.h"
23 this->distance = -1.0f;
24 this->splitHeight = -1.0;
25 this->enabled =
false;
36 this->splitHeight = _in;
39 return this->splitHeight;
44 std::cout <<
this <<
" ";
45 std::cout << this->enabled <<
" ";
46 std::cout << this->distance <<
" ";
47 std::cout << this->splitHeight <<
" ";
97 return this->drawMode;
101 void draw(std::shared_ptr<ge::Camera> _cam);
117 unsigned int connectTree(
unsigned int _min,
unsigned int _max,
118 unsigned int _parent,
short _childIdx,
unsigned int _treeIdx);
119 void inOrderTraversal(
unsigned int _id,
unsigned int _treeIdx,
unsigned int _activePointIdx);
132 return occlusionQueriesEnabled;
143 void genenerateOcclusionQueries();
144 void beginOcclusionQueries(
int idx);
145 void endOcclusionQueries();
146 void readOcclusionQueryResult(GLuint* _ids, GLuint* _results);
149 void allocateOcclusionMemory();
150 void deleteOcclusionMemory();
151 void generateControlPointArray();
152 void removeSlopesAtStartAndEnd();
153 void evaluateLineQuery();
157 DrawableComponent::RENDERSTATE renderState;
164 unsigned int* dptreeSize;
166 unsigned int visibleSegmentCount;
174 GLuint* occlusionQueryIDs;
175 GLuint* occlusionQueryGTIDs;
179 GLuint* occlusionGroundTruths;
180 GLuint* renderPixelInLastFrames;
181 GLuint checkForOcclusionResult;
185 std::vector<unsigned int> ids;
186 std::queue<unsigned int> uids;
189 bool occlusionQueriesEnabled;
191 bool initialScanningOn;
void createVAO(GEOMETRYDRAWMODE _in)
Definition: DouglasPeuckerDrawablePath.cpp:414
Definition: DrawableComponent.h:25
Definition: DouglasPeuckerDrawablePath.h:78
void printDPTree(int _idx)
Definition: DouglasPeuckerDrawablePath.cpp:1066
enum GEOMETRYDRAWMODE getDrawMode() const
Definition: DouglasPeuckerDrawablePath.h:96
void disable()
Definition: DouglasPeuckerDrawablePath.h:54
void setDistance(double _in)
Definition: DouglasPeuckerDrawablePath.h:29
unsigned int connectTree(unsigned int _min, unsigned int _max, unsigned int _parent, short _childIdx, unsigned int _treeIdx)
Definition: DouglasPeuckerDrawablePath.cpp:796
void setupGeometryBuffersWithLineStripInformation()
Definition: DouglasPeuckerDrawablePath.cpp:458
void inOrderTraversal(unsigned int _id, unsigned int _treeIdx, unsigned int _activePointIdx)
Definition: DouglasPeuckerDrawablePath.cpp:887
double getDistance() const
Definition: DouglasPeuckerDrawablePath.h:32
void setLineThickness(double _thickness)
Definition: DouglasPeuckerDrawablePath.cpp:1093
Definition: AvalancheTrainingSimulationEngine.h:39
void enableOcclusionQueries(bool _in)
Definition: DouglasPeuckerDrawablePath.cpp:990
DouglasPeuckerPathNode()
Definition: DouglasPeuckerDrawablePath.h:22
void enable()
Definition: DouglasPeuckerDrawablePath.h:50
bool IsOcclusionQueriesEnabled()
Definition: DouglasPeuckerDrawablePath.h:131
void setDouglasPeuckerIndices()
Definition: DouglasPeuckerDrawablePath.cpp:723
bool enableHeightNeighborRecursive(short _child, unsigned int _id, unsigned int _treeIdx)
bool enableNeighborRecursive(short _child, unsigned int _id, unsigned int _treeIdx)
Definition: DouglasPeuckerDrawablePath.cpp:392
void disableInitialScan()
Definition: DouglasPeuckerDrawablePath.cpp:1112
bool IsRefined()
Definition: DouglasPeuckerDrawablePath.cpp:1103
~DouglasPeuckerDrawablePath()
Definition: DouglasPeuckerDrawablePath.cpp:20
Definition: DouglasPeuckerDrawablePath.h:79
Definition: DouglasPeuckerDrawablePath.h:69
Definition: DouglasPeuckerDrawablePath.h:19
double getSplitHeight() const
Definition: DouglasPeuckerDrawablePath.h:38
bool IsEnabled()
Definition: DouglasPeuckerDrawablePath.h:58
DouglasPeuckerDrawablePath()
Definition: DouglasPeuckerDrawablePath.cpp:5
void printAllDPTrees()
Definition: DouglasPeuckerDrawablePath.cpp:1076
void drawWithOcclusionQueries(DrawableComponent::RENDERSTATE _state, std::shared_ptr< ge::Camera > _cam)
Definition: DouglasPeuckerDrawablePath.cpp:689
void setRefined(bool _in)
Definition: DouglasPeuckerDrawablePath.cpp:1098
Definition: ArrayTreeNode.h:14
void update()
Definition: DouglasPeuckerDrawablePath.cpp:101
void enableInitialScan()
Definition: DouglasPeuckerDrawablePath.cpp:1108
void createTriangleIndices()
Definition: DouglasPeuckerDrawablePath.cpp:594
bool nodeAccessPossible(unsigned int _id, unsigned int _treeIdx)
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: DouglasPeuckerDrawablePath.cpp:621
unsigned int inOrderHeightUpdateTraversal(unsigned int _id, unsigned int _treeIdx, unsigned int _alloverID)
Definition: DouglasPeuckerDrawablePath.cpp:205
void createRibbonIndices()
Definition: DouglasPeuckerDrawablePath.cpp:610
Definition: PolyLine.h:24
GEOMETRYDRAWMODE
Definition: DouglasPeuckerDrawablePath.h:78
void setRefinementLevel()
Definition: DouglasPeuckerDrawablePath.cpp:826
void printValue() const
Definition: DouglasPeuckerDrawablePath.h:42
Definition: DouglasPeuckerDrawablePath.h:80
void create()
Definition: DouglasPeuckerDrawablePath.h:86
Definition: DouglasPeuckerDrawablePath.h:81
~DouglasPeuckerPathNode()
Definition: DouglasPeuckerDrawablePath.h:27
void setupGeometryBuffersAsRibbons()
Definition: DouglasPeuckerDrawablePath.cpp:481
bool isInitialScanningOn()
Definition: DouglasPeuckerDrawablePath.cpp:1117
void updateSingleScanning()
Definition: DouglasPeuckerDrawablePath.cpp:278
unsigned int inOrderUpdateTraversal(unsigned int _id, unsigned int _treeIdx, unsigned int _alloverID)
Definition: DouglasPeuckerDrawablePath.cpp:359
void clear()
Definition: DouglasPeuckerDrawablePath.cpp:44
void setSplitHeight(double _in)
Definition: DouglasPeuckerDrawablePath.h:35
void updateInitialScanning()
Definition: DouglasPeuckerDrawablePath.cpp:127
void inOrderHeightTraversal(unsigned int _id, unsigned int _treeIdx, unsigned int _activePointIdx)
Definition: DouglasPeuckerDrawablePath.cpp:908