![]() |
Copperfield Engine 0.1
C++ Game Engine
|
Component used to render an object. More...
#include <default_components.hpp>
Public Member Functions | |
RenderCmp (const Mesh *mesh, const Texture *texture, const coma::Vec3 &color={1.0f, 1.0f, 1.0f}, bool castShadows=true, float roughness=0.5f, float shininess=32.0f) | |
Creates a RenderCmp allowing setting its parameters. More... | |
Public Attributes | |
Mesh const * | mesh_ = nullptr |
Mesh of the object you want to render. Must have a value. | |
Texture const * | texture_ = nullptr |
Texture of the object. Must have a value. | |
coma::Vec3 | color_ = {1.0f,1.0f,1.0f} |
Color of the object; it will get mixed with the texture. | |
float | roughness_ = 0.5f |
Affects the intensity of the reflections it receives. | |
float | shininess_ = 32.0f |
Affects the size and definition of the reflections it receives. | |
bool | cast_shadows_ = true |
Defines if the object projects shadows. | |
Component used to render an object.
mesh_ and texture_ must have a value. If you don't want to use a texture and prefer a simple color, you can set a white texture with ResourceManager::getEmptyTexture.
|
inline |
Creates a RenderCmp allowing setting its parameters.
mesh | mesh_ |
texture | texture_ |
color | color_ |
castShadows | cast_shadows_ |
roughness | roughness_ |
shininess | shininess_ |