Blender V5.0
blender::workbench::Material Struct Reference

#include <workbench_private.hh>

Public Member Functions

 Material ()=default
 Material (float3 color)
 Material (::Object &ob, bool random=false)
 Material (::Material &mat)
bool is_transparent ()

Static Public Member Functions

static uint32_t pack_data (float metallic, float roughness, float alpha)

Public Attributes

float3 base_color = float3(0)
uint packed_data = 0

Detailed Description

Definition at line 109 of file workbench_private.hh.

Constructor & Destructor Documentation

◆ Material() [1/4]

blender::workbench::Material::Material ( )
default

Referenced by Material(), and Material().

◆ Material() [2/4]

blender::workbench::Material::Material ( float3 color)
inline

Definition at line 115 of file workbench_private.hh.

References base_color, Material(), pack_data(), and packed_data.

◆ Material() [3/4]

◆ Material() [4/4]

blender::workbench::Material::Material ( ::Material & mat)
inline

Definition at line 118 of file workbench_private.hh.

References base_color, Material(), pack_data(), and packed_data.

Member Function Documentation

◆ is_transparent()

bool Material::is_transparent ( )
inline

Definition at line 128 of file workbench_private.hh.

References packed_data.

◆ pack_data()

uint32_t Material::pack_data ( float metallic,
float roughness,
float alpha )
inlinestatic

Definition at line 134 of file workbench_private.hh.

References sqrtf, and unit_float_to_uchar_clamp().

Referenced by Material(), and Material().

Member Data Documentation

◆ base_color

float3 blender::workbench::Material::base_color = float3(0)

Definition at line 110 of file workbench_private.hh.

Referenced by Material(), Material(), and Material().

◆ packed_data

uint blender::workbench::Material::packed_data = 0

Definition at line 112 of file workbench_private.hh.

Referenced by is_transparent(), Material(), Material(), and Material().


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