OpenStudio:gltf
Loading...
Searching...
No Matches
openstudio::gltf::GltfMaterialData Class Reference

#include <GltfMaterialData.hpp>

Public Member Functions

Getters and Setters
std::string materialName () const
 
void setMaterialName (const std::string &materialName)
 
int r () const
 
void setR (int r)
 
int g () const
 
void setG (int g)
 
int b () const
 
void setB (int b)
 
double a () const
 
void setA (double a)
 
bool isDoubleSided () const
 
void setIsDoubleSided (bool isDoubleSided)
 

Related Symbols

(Note that these are not member symbols.)

GLTF_API std::ostream & operator<< (std::ostream &out, const GltfMaterialData &gltfMaterialData)
 

Protected

tinygltf::Material toGltf () const
 Creates a GLTF material on the basis of raw Material Values, i.e, R, G, B, A & isDoubleSided.
 

Interface with Model and ModelObjects

constexpr GltfMaterialData (std::string_view materialName, int r, int g, int b, double a, bool isDoubleSided=false)
 Standard constructor.
 
 GltfMaterialData (std::string_view materialName, const model::RenderingColor &color, bool isDoubleSided=false)
 
static std::vector< GltfMaterialDatabuildMaterials (const model::Model &model)
 

Detailed Description

GltfMaterialData is an Interface class between a RenderingColor and a tinygltf::Material

Constructor & Destructor Documentation

◆ GltfMaterialData() [1/2]

openstudio::gltf::GltfMaterialData::GltfMaterialData ( std::string_view materialName,
int r,
int g,
int b,
double a,
bool isDoubleSided = false )
inlineconstexpr

Standard constructor.

◆ GltfMaterialData() [2/2]

openstudio::gltf::GltfMaterialData::GltfMaterialData ( std::string_view materialName,
const model::RenderingColor & color,
bool isDoubleSided = false )

Member Function Documentation

◆ a()

double openstudio::gltf::GltfMaterialData::a ( ) const

◆ b()

int openstudio::gltf::GltfMaterialData::b ( ) const

◆ buildMaterials()

static std::vector< GltfMaterialData > openstudio::gltf::GltfMaterialData::buildMaterials ( const model::Model & model)
static

◆ g()

int openstudio::gltf::GltfMaterialData::g ( ) const

◆ isDoubleSided()

bool openstudio::gltf::GltfMaterialData::isDoubleSided ( ) const

◆ materialName()

std::string openstudio::gltf::GltfMaterialData::materialName ( ) const

◆ r()

int openstudio::gltf::GltfMaterialData::r ( ) const

◆ setA()

void openstudio::gltf::GltfMaterialData::setA ( double a)

◆ setB()

void openstudio::gltf::GltfMaterialData::setB ( int b)

◆ setG()

void openstudio::gltf::GltfMaterialData::setG ( int g)

◆ setIsDoubleSided()

void openstudio::gltf::GltfMaterialData::setIsDoubleSided ( bool isDoubleSided)

◆ setMaterialName()

void openstudio::gltf::GltfMaterialData::setMaterialName ( const std::string & materialName)

◆ setR()

void openstudio::gltf::GltfMaterialData::setR ( int r)

◆ toGltf()

tinygltf::Material openstudio::gltf::GltfMaterialData::toGltf ( ) const
protected

Creates a GLTF material on the basis of raw Material Values, i.e, R, G, B, A & isDoubleSided.

Friends And Related Symbol Documentation

◆ operator<<()

GLTF_API std::ostream & operator<< ( std::ostream & out,
const GltfMaterialData & gltfMaterialData )
related