| TGX 1.1.4 A tiny 2D/3D graphics library optimized for 32 bits microcontrollers.

Loading...
Searching...
No Matches
Public Attributes | List of all members
tgx::MeshMaterial3Dv2< color_t > Struct Template Reference

Material definition for a Mesh3Dv2 object. More...

`#include <Mesh3Dv2.h>`

## Public Attributes
const Image< color_t > * | texture
| Optional texture image, or nullptr if the material is not textured.
RGBf | color
| Default color to use when texturing is disabled.
float | ambiant_strength
| Object ambient coefficient (how much it reflects the ambient light component). Typical value: 0.2f.
float | diffuse_strength
| Object diffuse coefficient (how much it reflects the diffuse light component). Typical value: 0.7f.
float | specular_strength
| Object specular coefficient (how much it reflects the specular light component). Typical value: 0.5f.
int | specular_exponent
| Specular exponent. 0 to disable specular lighting. Typical value between 4 and 64.

## Detailed Description

template<typename color_t>
struct tgx::MeshMaterial3Dv2< color_t >

Material definition for a Mesh3Dv2 object.

A Mesh3Dv2 object stores all its materials in a single array. Each meshlet references one material by index. This replaces the legacy Mesh3D linked-list convention that was mostly used to switch texture or material between sub-meshes.

The documentation for this struct was generated from the following file:

- src/Mesh3Dv2.h