Texture part settings. More...
Public Member Functions | |
Image * | image () const |
Returns the texture image. More... | |
void | setImage (Image *image) |
Sets an image used for texturing. More... | |
bool | environmentMapping () const |
Returns true if environment mapping is enabled. More... | |
void | setEnvironmentMapping (bool useEnvironmentMapping) |
Enables/disables use of environment mapping. More... | |
float | repeatFactor () const |
Returns the repeat factor of the texture. More... | |
void | setRepeatFactor (float repeatFactor) |
Sets the repeat factor of the texture. More... | |
bool | autoScaling () const |
Returns true if auto scaling is enabled. More... | |
void | setAutoScaling (bool autoScaling) |
Enables/disables auto scaling. More... | |
bool | modulate () const |
Returns true if the texture modulate is enabled. More... | |
void | setModulate (bool modulate) |
Sets if the texture lookup should be modulated with the part color or not. More... | |
bool | filterNearest () const |
Returns true if filter texture sampler should be set to NEAREST. More... | |
void | setFilterNearest (bool filterNearest) |
Sets the min and mag filter of the texture sampler. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Texture part settings.
These settings are accessed through the part settings. Specify a texture image with setImage() and adjust various texture attributes.
bool cee::ug::PartSettingsTexture::autoScaling | ( | ) | const |
Returns true if auto scaling is enabled.
bool cee::ug::PartSettingsTexture::environmentMapping | ( | ) | const |
Returns true if environment mapping is enabled.
bool cee::ug::PartSettingsTexture::filterNearest | ( | ) | const |
Returns true if filter texture sampler should be set to NEAREST.
cee::Image * cee::ug::PartSettingsTexture::image | ( | ) | const |
Returns the texture image.
bool cee::ug::PartSettingsTexture::modulate | ( | ) | const |
Returns true if the texture modulate is enabled.
float cee::ug::PartSettingsTexture::repeatFactor | ( | ) | const |
Returns the repeat factor of the texture.
void cee::ug::PartSettingsTexture::setAutoScaling | ( | bool | autoScaling | ) |
Enables/disables auto scaling.
void cee::ug::PartSettingsTexture::setEnvironmentMapping | ( | bool | useEnvironmentMapping | ) |
Enables/disables use of environment mapping.
void cee::ug::PartSettingsTexture::setFilterNearest | ( | bool | filterNearest | ) |
Sets the min and mag filter of the texture sampler.
If true, NEAREST will be used for both min and mag. This will result in a "blocky" texture as just the closest texel (pixel) will be used and no interpolation. If false, LINEAR will be used for both min and mag. This will result in a more smooth texture as a linear interpolation will be done between the pixels in the texture.
void cee::ug::PartSettingsTexture::setImage | ( | cee::Image * | image | ) |
Sets an image used for texturing.
void cee::ug::PartSettingsTexture::setModulate | ( | bool | modulate | ) |
Sets if the texture lookup should be modulated with the part color or not.
If true, the resulting color of each fragment is the multiplication of the texture texel and the part color. If false, the part color is ignored.
void cee::ug::PartSettingsTexture::setRepeatFactor | ( | float | repeatFactor | ) |
Sets the repeat factor of the texture.