|
| Mesh (std::vector< glm::vec3 > &v, std::vector< glm::vec3 > &n, std::vector< Face * > &f, std::vector< glm::vec2 > &uv, Shader *shader, glm::mat4 &model_m) |
|
virtual void | update (float delta_t) |
|
void | rotateLocally (float delta_t, glm::vec3 axis) |
|
void | rotateAroundCenter (glm::vec3 &world_center, float angle, glm::vec3 axis) |
|
std::vector< glm::vec3 > | getNormals () |
|
std::vector< glm::vec3 > | getVertices () |
|
std::vector< GLuint > | getIndices () |
|
void | zBufferPass (ZBufferShader *z, glm::mat4 &vp) |
|
void | setUniformsForZBufferPass (ZBufferShader *z, glm::mat4 &vp) |
|
void | renderToZBuffer () |
|
void | renderPass (const CutawaySurface *c, glm::mat4 &vp, glm::vec3 cam, float clip) |
|
void | setUniformsForRenderPass (glm::mat4 &vp, glm::vec3 cam, float clip) |
|
virtual void | draw () |
|
void | setLighting (std::vector< std::shared_ptr< PointLight >> *allLights) |
|
void | setCutawayDimension (glm::vec2 dim) |
|
void | setShader (Shader *s) |
|
BoundingBox * | calcBoundingBoxWithApplying () |
|
BoundingBox * | calcBoundingBoxWithOutApplying () |
|
glm::vec3 | getRelativePosition (glm::vec3 p) |
|
|
glm::mat4 | model_matrix |
|
GLuint | f_count |
|
Draw mesh triangles in current OpenGL context.
void Mesh::renderPass |
( |
const CutawaySurface * |
c, |
|
|
glm::mat4 & |
vp, |
|
|
glm::vec3 |
cam, |
|
|
float |
clip |
|
) |
| |
Render the given mesh (on screen). Clip against cutaway surface if wished.
- Parameters
-
c | cutaway surface |
vp | view projection matrix |
cam | camera position |
clip | true to clip mesh against cutaway surface |
void Mesh::renderToZBuffer |
( |
| ) |
|
Actual OpenGL render call to draw elements to z buffer.
void Mesh::setUniformsForRenderPass |
( |
glm::mat4 & |
vp, |
|
|
glm::vec3 |
cam, |
|
|
float |
clip |
|
) |
| |
Set model matrix, view projection matrix, camera position and clipping against cutaway surface in shader.
- Parameters
-
vp | view projection matrix |
cam | camera position |
clip | true to clip mesh against cutaway surface |
void Mesh::setUniformsForZBufferPass |
( |
ZBufferShader * |
z, |
|
|
glm::mat4 & |
vp |
|
) |
| |
Set model and view projection matrix in z buffer shader.
- Parameters
-
z | z buffer shader |
vp | view projection matrix |
void Mesh::update |
( |
float |
delta_t | ) |
|
|
virtual |
Update mesh according to time passed.
- Parameters
-
delta_t | time passed since last update |
Render depth values to z buffer.
- Parameters
-
z | z buffer shader |
vp | view projection matrix |
The documentation for this class was generated from the following files: