AireEngine
A 3D Open-World Game Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Aire::Billboard Class Reference

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)
 

Detailed Description

Class for billboard rendering.

Constructor & Destructor Documentation

◆ Billboard()

Billboard::Billboard ( glm::vec3 p,
Texture * diffuse,
Texture * alpha )

Create a new billboard object

Parameters
pThe position in world space to place the billboard
diffuseThe diffuse texture to attach to the billboard
alphaThe a;pha texture to attach to the billboard
Here is the call graph for this function:

Member Function Documentation

◆ getPosition()

glm::vec3 Billboard::getPosition ( ) const

Get the position of the billboard.

Returns
The world-space billboard position

◆ render()

void Billboard::render ( ShaderProgram & shader,
Camera & camera )

Render the billboard

Parameters
shaderThe shader program to use for rendering the billboard
cameraThe current player camera
Here is the call graph for this function:

◆ setPosition() [1/2]

void Billboard::setPosition ( float x,
float y,
float z )

Set the world-space billboard position

Parameters
xX-coordinate in world space
yY-coordinate in world space
zZ-coordinate in world space
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPosition() [2/2]

void Billboard::setPosition ( glm::vec3 pos)

Set the world-space billboard position

Parameters
posWorld-space position
Here is the call graph for this function:

◆ setScale()

void Billboard::setScale ( float s)

Scale the billboard.

Parameters
sScale parameter
Here is the caller graph for this function:

The documentation for this class was generated from the following files: