VisPro  1.0
Project of Visualisierung 2
Geometry.h
Go to the documentation of this file.
1 #pragma once
2 
7 #include "SceneObject.h"
8 #include "Mesh.h"
9 #include "../VisPro/CutawaySurface.h"
10 #include <vector>
11 #include <memory>
12 #include "../VisPro/ViewFrustum.h"
13 
14 class Geometry : public SceneObject{
15 public:
16  Geometry(glm::mat4& model_matrix, std::vector<Mesh*> m);
17  virtual ~Geometry();
18 
22  virtual void update(float deltaTime);
23 
33  int draw(const CutawaySurface* c, ViewFrustum& frust, glm::mat4& vp, glm::vec3 cam, bool useViewFrustumCulling, float clip);
34  void draw();
35  virtual void addChild(Geometry* g);
36  virtual void setShader(Shader* shader);
37  virtual void transformModelMatrix(glm::mat4& transform );
38  virtual void init(std::vector<std::shared_ptr<PointLight>> *allLights, glm::vec2 dim);
39  virtual void setViewProj(glm::mat4& vpm);
40  virtual void setCameraLoc(glm::vec3 loc);
45  virtual void renderToZBuffer(ZBufferShader* z, glm::mat4& vp);
46  std::vector<Mesh*> meshes;
47  std::vector<glm::vec3> relativeMeshPositions;
48  int faceCount =0; //number of faces in this Geometry
49 private:
50 
51  BoundingBox* b;
52 
53 
54 };
55 
virtual void update(float deltaTime)
Definition: Geometry.cpp:23
Definition: ViewFrustum.h:7
Definition: BoundingBox.h:4
Definition: Geometry.h:14
Definition: CutawaySurface.h:14
int draw(const CutawaySurface *c, ViewFrustum &frust, glm::mat4 &vp, glm::vec3 cam, bool useViewFrustumCulling, float clip)
Definition: Geometry.cpp:31
Mesh class file.
Definition: Shader.h:18
Definition: ZBufferShader.h:11
Definition: SceneObject.h:15
virtual void renderToZBuffer(ZBufferShader *z, glm::mat4 &vp)
Definition: Geometry.cpp:103