Material type (generic)
More...
#include <Material.hpp>
|
| | Material () |
| | Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps) More...
|
| |
| | Material (const ::Material &material) |
| |
|
| Material (const Material &)=delete |
| |
| | Material (Material &&other) noexcept |
| |
| void | DrawMesh (const ::Mesh &mesh, ::Matrix *transforms, int instances) const |
| | Draw multiple mesh instances with material and different transforms. More...
|
| |
| void | DrawMesh (const ::Mesh &mesh, ::Matrix transform) const |
| | Draw a 3d mesh with material and transform. More...
|
| |
| void | DrawMesh (const ::Mesh &mesh, std::span<::Matrix > transforms) const |
| | Draw multiple mesh instances with material and different transforms. More...
|
| |
| ::MaterialMap * | GetMaps () const |
| | Retrieves the maps value for the object. More...
|
| |
| ::Shader | GetShader () const |
| | Retrieves the shader value for the object. More...
|
| |
| bool | IsValid () const |
| | Check if material is ready. More...
|
| |
| Material & | operator= (const ::Material &material) |
| |
|
Material & | operator= (const Material &)=delete |
| |
| Material & | operator= (Material &&other) noexcept |
| |
| void | SetMaps (::MaterialMap *value) |
| | Sets the maps value for the object. More...
|
| |
| void | SetShader (::Shader value) |
| | Sets the shader value for the object. More...
|
| |
| Material & | SetTexture (int mapType, const ::Texture2D &texture) |
| | Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...) More...
|
| |
| void | Unload () |
| | Unload material from memory. More...
|
| |
|
| static std::vector< Material > | Load (const std::string_view fileName) |
| | Load materials from model file. More...
|
| |
|
| void | set (const ::Material &material) |
| |
Material type (generic)
Definition at line 16 of file Material.hpp.
◆ Material() [1/3]
| raylib::Material::Material |
( |
const ::Material & |
material | ) |
|
|
inline |
◆ Material() [2/3]
| raylib::Material::Material |
( |
| ) |
|
|
inline |
Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
Definition at line 23 of file Material.hpp.
Referenced by Load().
◆ Material() [3/3]
| raylib::Material::Material |
( |
Material && |
other | ) |
|
|
inlinenoexcept |
◆ ~Material()
| raylib::Material::~Material |
( |
| ) |
|
|
inline |
◆ DrawMesh() [1/3]
| void raylib::Material::DrawMesh |
( |
const ::Mesh & |
mesh, |
|
|
::Matrix * |
transforms, |
|
|
int |
instances |
|
) |
| const |
|
inline |
Draw multiple mesh instances with material and different transforms.
Definition at line 102 of file Material.hpp.
◆ DrawMesh() [2/3]
| void raylib::Material::DrawMesh |
( |
const ::Mesh & |
mesh, |
|
|
::Matrix |
transform |
|
) |
| const |
|
inline |
◆ DrawMesh() [3/3]
| void raylib::Material::DrawMesh |
( |
const ::Mesh & |
mesh, |
|
|
std::span<::Matrix > |
transforms |
|
) |
| const |
|
inline |
Draw multiple mesh instances with material and different transforms.
Definition at line 109 of file Material.hpp.
◆ GetMaps()
| ::MaterialMap * raylib::Material::GetMaps |
( |
| ) |
const |
|
inline |
Retrieves the maps value for the object.
- Returns
- The maps value of the object.
Definition at line 51 of file Material.hpp.
◆ GetShader()
| ::Shader raylib::Material::GetShader |
( |
| ) |
const |
|
inline |
Retrieves the shader value for the object.
- Returns
- The shader value of the object.
Definition at line 50 of file Material.hpp.
◆ IsValid()
| bool raylib::Material::IsValid |
( |
| ) |
const |
|
inline |
◆ Load()
| static std::vector< Material > raylib::Material::Load |
( |
const std::string_view |
fileName | ) |
|
|
inlinestatic |
◆ operator=() [1/2]
| Material & raylib::Material::operator= |
( |
const ::Material & |
material | ) |
|
|
inline |
◆ operator=() [2/2]
◆ set()
| void raylib::Material::set |
( |
const ::Material & |
material | ) |
|
|
inlineprotected |
◆ SetMaps()
| void raylib::Material::SetMaps |
( |
::MaterialMap * |
value | ) |
|
|
inline |
Sets the maps value for the object.
- Parameters
-
| value | The value of which to set maps to. |
Definition at line 51 of file Material.hpp.
◆ SetShader()
| void raylib::Material::SetShader |
( |
::Shader |
value | ) |
|
|
inline |
Sets the shader value for the object.
- Parameters
-
| value | The value of which to set shader to. |
Definition at line 50 of file Material.hpp.
◆ SetTexture()
| Material & raylib::Material::SetTexture |
( |
int |
mapType, |
|
|
const ::Texture2D & |
texture |
|
) |
| |
|
inline |
Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)
Definition at line 89 of file Material.hpp.
◆ Unload()
| void raylib::Material::Unload |
( |
| ) |
|
|
inline |
Unload material from memory.
Definition at line 79 of file Material.hpp.