![]() |
AireEngine
A 3D Open-World Game Engine
|
Class for billboard rendering. More...
#include <billboard.h>
Public Member Functions | |
| Billboard (glm::vec3 p, Texture *diffuse, Texture *alpha) | |
| void | render (ShaderProgram &shader, Camera &camera) |
| void | renderInstanced (ShaderProgram &shader, Camera &camera, glm::mat4 transform) |
| glm::vec3 | getPosition () const |
| void | setPosition (float x, float y, float z) |
| void | setPosition (glm::vec3 pos) |
| void | setTexture (Texture *ptr) |
| void | setScale (float s) |
Class for billboard rendering.
Create a new billboard object
| p | The position in world space to place the billboard |
| diffuse | The diffuse texture to attach to the billboard |
| alpha | The a;pha texture to attach to the billboard |

| glm::vec3 Billboard::getPosition | ( | ) | const |
Get the position of the billboard.
| void Billboard::render | ( | ShaderProgram & | shader, |
| Camera & | camera ) |
Render the billboard
| shader | The shader program to use for rendering the billboard |
| camera | The current player camera |

Set the world-space billboard position
| x | X-coordinate in world space |
| y | Y-coordinate in world space |
| z | Z-coordinate in world space |


| void Billboard::setPosition | ( | glm::vec3 | pos | ) |
Set the world-space billboard position
| pos | World-space position |

Scale the billboard.
| s | Scale parameter |
