#include <FormItCoreTypes.h>
|
FORMIT_CORE_EXPORT | MaterialData (WSM::Color const &color=WSM::Color(255, 255, 255, 255), 1::vector< char > const &aTextureData={}, WSM::Vector2d const &scale={1.0, 1.0}, bool bUseBitmapAlpha=true, 1::string const &sMaterialName={}, 1::string const &sMaterialIdentifier={}, 1::string const &sTextureName={}, 1::vector< AdditionalMaterialAttibute > const &aAttributes={}, 1::vector< AdditionalMaterialTexture > const &aTextures={}) |
|
FORMIT_CORE_EXPORT | MaterialData (const MaterialData &) |
|
FORMIT_CORE_EXPORT float | GetAttribute (AttributeType attributeType) const |
| Get the value of an attribute in the additional attributes. More...
|
|
FORMIT_CORE_EXPORT bool | SetAttribute (AttributeType attributeType, float value) |
| Set the value of an attribute in the additional attributes. More...
|
|
FORMIT_CORE_EXPORT const ::vector< char > & | GetMap (MapType mapType) const |
| Get the map from the additional textures. More...
|
|
FORMIT_CORE_EXPORT void | SetMap (MapType mapType, const 1::vector< char > &map) |
| Set the map int the additional attributes. More...
|
|
FORMIT_CORE_EXPORT bool | GetPreviewImage (1::vector< unsigned char > &previewImage, size_t &res, bool jpg=false) |
| Create the material preview. More...
|
|
FORMIT_CORE_EXPORT FormIt::Materials::MaterialData::MaterialData |
( |
WSM::Color const & |
color = WSM::Color(255, 255, 255, 255) , |
|
|
1::vector< char > const & |
aTextureData = {} , |
|
|
WSM::Vector2d const & |
scale = {1.0, 1.0} , |
|
|
bool |
bUseBitmapAlpha = true , |
|
|
1::string const & |
sMaterialName = {} , |
|
|
1::string const & |
sMaterialIdentifier = {} , |
|
|
1::string const & |
sTextureName = {} , |
|
|
1::vector< AdditionalMaterialAttibute > const & |
aAttributes = {} , |
|
|
1::vector< AdditionalMaterialTexture > const & |
aTextures = {} |
|
) |
| |
Get the value of an attribute in the additional attributes.
The value returned is in the range 0.0 ... 1.0
Get the map from the additional textures.
Returns an empty vector if the map does not exist.
FORMIT_CORE_EXPORT bool FormIt::Materials::MaterialData::GetPreviewImage |
( |
1::vector< unsigned char > & |
previewImage, |
|
|
size_t & |
res, |
|
|
bool |
jpg = false |
|
) |
| |
Create the material preview.
The returned vector contains png or jpg formatted rgb pixel values. The preview image is square with a resolution of kMaterialPreviewSize, which is returned via the res argument. Returns true on success.
Set the value of an attribute in the additional attributes.
The value passed in must be in the range 0.0 ... 1.0 Returns false if an value is passed
Set the map int the additional attributes.
To delete the map, an empty vector is passed in.
::vector<char> FormIt::Materials::MaterialData::m_aTextureData |
bool FormIt::Materials::MaterialData::m_bUseBitmapAlpha = true |
WSM::Color FormIt::Materials::MaterialData::m_color |
::string FormIt::Materials::MaterialData::m_sMaterialIdentifier |
::string FormIt::Materials::MaterialData::m_sMaterialName |
::string FormIt::Materials::MaterialData::m_sTextureName |
The documentation for this struct was generated from the following file: