9 #ifndef GlobeEngine_MultiPolygonObject_h
10 #define GlobeEngine_MultiPolygonObject_h
12 #include <vmmlib/vmmlib.hpp>
15 #include "OpenGL_Includes.h"
17 #include "PLYObject.h"
40 void draw(std::shared_ptr<ge::Camera> _cam);
42 void drawTextured(std::shared_ptr<ge::Camera> _cam, std::vector< GLuint > _texHandles);
47 int addPolygon(std::shared_ptr<PolyLine> _polyline);
52 void updatePolygon(
int _id, std::shared_ptr<PolyLine> _polyline);
62 void insertPolygon(
int _id, std::shared_ptr<PolyLine> _polyline);
63 const std::shared_ptr<PolyLine>
getPolygon(
int _idx)
const;
86 void copyColorInformationToGPU(vmml::Vector3d _pickcolor = vmml::Vector3d(0.0, 0.0, 0.0),
int _picked = -1,
const std::shared_ptr<geData::ColorisationTable>& _colorTable = NULL);
92 void setColorBuffer(
int _bufferID,
const vmml::Vector3f* _color=NULL);
100 void createTriangulation(std::shared_ptr<geData::MultiLineObject> _multilineGeometry, std::vector<int> _entityAssociation);
104 return this->triangulated;
108 std::vector< std::shared_ptr<PolyLine> > entities;
109 std::vector<double> weights;
110 std::vector<vmml::Vector3f> weightColors;
119 GLsizei* lineStripLenght;
128 std::vector< vmml::Vector3d > points;
129 std::vector< vmml::Vector2d > minboundPerPolygon;
130 std::vector< vmml::Vector2d > maxboundPerPolygon;
131 std::vector<int> polygonStartIdx;
132 std::vector<int> polygonIndexCount;
133 std::vector<int> polygonEntityAssociation;
void setWheightedColorBuffer(int _bufferID)
Definition: MultiPolygonObject.cpp:368
Definition: DrawableComponent.h:25
void drawTextured(std::shared_ptr< ge::Camera > _cam, std::vector< GLuint > _texHandles)
Definition: MultiPolygonObject.cpp:143
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: MultiPolygonObject.cpp:127
Definition: MultiPolygonObject.h:33
enum GEOMETRYMODE getDrawMode() const
Definition: MultiPolygonObject.h:79
const std::shared_ptr< PolyLine > getPolygon(int _idx) const
Definition: MultiPolygonObject.cpp:514
void addToPolygonWeight(int _idx, double _value)
Definition: MultiPolygonObject.cpp:503
void updatePolygon(int _id, std::shared_ptr< PolyLine > _polyline)
Definition: MultiPolygonObject.cpp:450
void clear()
Definition: MultiPolygonObject.cpp:19
Definition: AvalancheTrainingSimulationEngine.h:39
void clearGeometryMemory()
Definition: MultiPolygonObject.cpp:33
void loadPolygonsFromPLY(std::string _nameurl)
Definition: MultiPolygonObject.cpp:526
Definition: MultiPolygonObject.h:33
Definition: MultiPolygonObject.h:22
void drawWithStandardShader(std::shared_ptr< ge::Camera > _cam)
Definition: MultiPolygonObject.h:30
int addPolygon(std::shared_ptr< PolyLine > _polyline)
Definition: MultiPolygonObject.cpp:411
void copyColorInformationToGPU(vmml::Vector3d _pickcolor=vmml::Vector3d(0.0, 0.0, 0.0), int _picked=-1, const std::shared_ptr< geData::ColorisationTable > &_colorTable=NULL)
Definition: MultiPolygonObject.cpp:239
void removePolygon(int _id)
Definition: MultiPolygonObject.cpp:434
void setPolygonWeightAndColor(int _idx, double _wheight, vmml::Vector3f _color)
Definition: MultiPolygonObject.cpp:467
void createTriangleIndices()
Definition: MultiPolygonObject.cpp:347
void setExtrusionY(double _input)
Definition: MultiPolygonObject.cpp:571
bool isTriangulated()
Definition: MultiPolygonObject.h:103
double getPolygonWeight(int _idx)
Definition: MultiPolygonObject.cpp:479
vmml::Vector3f getPolygonWeightColor(int _idx)
Definition: MultiPolygonObject.cpp:491
void setTextureCoordBuffer(int _bufferID)
Definition: MultiPolygonObject.cpp:329
void setPolygonWeight(int _lineIdx, double _wheight)
Definition: MultiPolygonObject.cpp:456
void setPickIDBuffer(int _bufferID)
Definition: MultiPolygonObject.cpp:387
void updateColorBuffer(vmml::Vector3f _color)
Definition: MultiPolygonObject.cpp:210
Definition: MultiPolygonObject.h:31
~MultiPolygonObject()
Definition: MultiPolygonObject.cpp:14
void insertPolygon(int _id, std::shared_ptr< PolyLine > _polyline)
Definition: MultiPolygonObject.cpp:417
void update()
Definition: MultiPolygonObject.cpp:46
Definition: MultiPolygonObject.h:32
int getPolygonCount()
Definition: MultiPolygonObject.cpp:519
void savePolygonsToPLY(std::string _path)
Definition: MultiPolygonObject.cpp:551
MultiPolygonObject()
Definition: MultiPolygonObject.cpp:8
void setGeometryBuffer(int _bufferID)
Definition: MultiPolygonObject.cpp:305
void loadTriangulatedMesh(std::string _nameurl)
void setColorBuffer(int _bufferID, const vmml::Vector3f *_color=NULL)
Definition: MultiPolygonObject.cpp:214
void create()
Definition: MultiPolygonObject.cpp:41
void createVAO(enum GEOMETRYMODE _mode=LINES)
Definition: MultiPolygonObject.cpp:180
GEOMETRYMODE
Definition: MultiPolygonObject.h:30
void createTriangulation(std::shared_ptr< geData::MultiLineObject > _multilineGeometry, std::vector< int > _entityAssociation)
Definition: MultiPolygonObject.cpp:51