class PartSettingsTexture : public RefCountedObject

Texture part settings.

These settings are accessed through the part settings. Specify a texture image with setImage() and adjust various texture attributes.

Public Functions

Image *image() const

Returns the texture image.

void setImage(Image *image)

Sets an image used for texturing.

bool environmentMapping() const

Returns true if environment mapping is enabled.

void setEnvironmentMapping(bool useEnvironmentMapping)

Enables/disables use of environment mapping.

float repeatFactor() const

Returns the repeat factor of the texture.

void setRepeatFactor(float repeatFactor)

Sets the repeat factor of the texture.

bool autoScaling() const

Returns true if auto scaling is enabled.

void setAutoScaling(bool autoScaling)

Enables/disables auto scaling.

bool modulate() const

Returns true if the texture modulate is enabled.

See also


void 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.

bool filterNearest() const

Returns true if filter texture sampler should be set to NEAREST.

void 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.