21 SpecularMaterialProperties::SpecularMaterialProperties()
46 if (this->diffuseTexture !=
nullptr) this->diffuseTexture->
releaseReference();
89 auto diffuseTextureMaskedTransparencyTest =
true;
93 auto alpha = textureData.
get(i * 4 + 3);
95 if (alpha > 5 || alpha < 250) diffuseTextureMaskedTransparencyTest =
false;
103 if (this->specularTexture !=
nullptr) this->specularTexture->
releaseReference();
120 if (this->normalTexture !=
nullptr) this->normalTexture->
releaseReference();
Color 4 definition class.
void set(float r, float g, float b, float a)
Sets this color by its components.
ByteBuffer getRGBTextureData()
uint8_t getRGBDepthBitsPerPixel() const
const string & getId() const
uint16_t getTextureHeight() const
uint16_t getTextureWidth() const
void setAtlasSize(uint16_t atlasSize)
Set atlas size.
Represents specular material properties.
string diffuseTransparencyTextureFileName
string normalTexturePathName
float diffuseTextureMaskedTransparencyThreshold
string diffuseTextureFileName
void checkDiffuseTextureTransparency()
Checks and set ups diffuse texture transparency.
bool diffuseTextureTransparency
string specularTexturePathName
~SpecularMaterialProperties()
Destructor.
string specularTextureFileName
Texture * specularTexture
string diffuseTexturePathName
void setSpecularTexture(Texture *specularTexture)
Set up a specular texture by the texture itself.
string normalTextureFileName
void setDiffuseTexture(Texture *diffuseTexture)
Set up a diffuse texture by the texture itself.
bool diffuseTextureMaskedTransparency
void setNormalTexture(Texture *normalTexture)
Set up a normal texture by the texture itself.
string diffuseTransparencyTexturePathName
uint8_t get(int64_t position) const
virtual void releaseReference()
Releases a reference, thus decrementing the counter and delete it if reference counter is zero.