Module truster::texture [−][src]
Expand description
Holds the Texture trait, as well as some common textures which implement it.
Modules
Contains the SolidColor struct which implements Texture;
Traits
A basic texture implementation. There is no UV mapping or anything like that. The method
Texture::color_at should just map a point in 3D space to a color. Textures can be
transformed, so color_at_shape should return the color as if the texture were not transformed.
Texture::color_at_shape will perform the transformation, so it should not be overwritten.
Texture::transform should return the texture transform matrix,
Texture::transform_inverse should return it’s inverse. Texture::set_transform should set
the texture transform to be transform
.