OpenStudio:gltf
 All Classes Namespaces Functions Typedefs Pages
Public Member Functions | Related Functions | List of all members
openstudio::gltf::GltfMaterialData Class Reference

#include <GltfMaterialData.hpp>

Public Member Functions

 GltfMaterialData (std::string_view materialName, const model::RenderingColor &color, bool isDoubleSided=false)
 
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 Functions

(Note that these are not member functions.)

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

Interface with Model and ModelObjects

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

Protected

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

Detailed Description

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

Constructor & Destructor Documentation

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

Standard constructor.

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

Member Function Documentation

double openstudio::gltf::GltfMaterialData::a ( ) const
int openstudio::gltf::GltfMaterialData::b ( ) const
static std::vector<GltfMaterialData> openstudio::gltf::GltfMaterialData::buildMaterials ( const model::Model &  model)
static
int openstudio::gltf::GltfMaterialData::g ( ) const
bool openstudio::gltf::GltfMaterialData::isDoubleSided ( ) const
std::string openstudio::gltf::GltfMaterialData::materialName ( ) const
int openstudio::gltf::GltfMaterialData::r ( ) const
void openstudio::gltf::GltfMaterialData::setA ( double  a)
void openstudio::gltf::GltfMaterialData::setB ( int  b)
void openstudio::gltf::GltfMaterialData::setG ( int  g)
void openstudio::gltf::GltfMaterialData::setIsDoubleSided ( bool  isDoubleSided)
void openstudio::gltf::GltfMaterialData::setMaterialName ( const std::string &  materialName)
void openstudio::gltf::GltfMaterialData::setR ( int  r)
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 Function Documentation

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