libmx2 2.2.1
C++20 multimedia and game-engine library (SDL2 / OpenGL / Vulkan)
Loading...
Searching...
No Matches
mx::MXMaterial Struct Reference

Parsed Wavefront MTL material properties. More...

#include <model.hpp>

Collaboration diagram for mx::MXMaterial:
[legend]

Public Attributes

std::string name
 Material name (newmtl).
float ka [3] = {0.2f, 0.2f, 0.2f}
 Ambient colour.
float kd [3] = {0.8f, 0.8f, 0.8f}
 Diffuse colour.
float ks [3] = {0.0f, 0.0f, 0.0f}
 Specular colour.
float ns = 30.0f
 Specular exponent.
float d = 1.0f
 Opacity (dissolve).
int illum = 2
 Illumination model.
std::string map_kd
 Diffuse texture filename.

Detailed Description

Parsed Wavefront MTL material properties.

Definition at line 45 of file model.hpp.

Member Data Documentation

◆ d

float mx::MXMaterial::d = 1.0f

Opacity (dissolve).

Definition at line 51 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().

◆ illum

int mx::MXMaterial::illum = 2

Illumination model.

Definition at line 52 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().

◆ ka

float mx::MXMaterial::ka = {0.2f, 0.2f, 0.2f}

Ambient colour.

Definition at line 47 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().

◆ kd

float mx::MXMaterial::kd = {0.8f, 0.8f, 0.8f}

Diffuse colour.

Definition at line 48 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().

◆ ks

float mx::MXMaterial::ks = {0.0f, 0.0f, 0.0f}

Specular colour.

Definition at line 49 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().

◆ map_kd

std::string mx::MXMaterial::map_kd

Diffuse texture filename.

Definition at line 53 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().

◆ name

std::string mx::MXMaterial::name

Material name (newmtl).

Definition at line 46 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().

◆ ns

float mx::MXMaterial::ns = 30.0f

Specular exponent.

Definition at line 50 of file model.hpp.

Referenced by mx::Model::loadMTL(), and mx::MXModel::loadMTL().


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