19 return (_texture_index >= 0 && _header->has_texture(_texture_index));
28 return _header->get_texture(_texture_index);
37 if (texture ==
nullptr) {
40 _header->add_texture(texture);
41 _texture_index = texture->_pattern_index;
50 return (_material_index >= 0 && _header->has_material(_material_index));
59 return _header->get_material(_material_index);
68 if (material ==
nullptr) {
71 _header->add_material(material);
72 _material_index = material->_material_index;
84 return ((_flags & F_no_color) == 0 &&
85 (_color_index != -1 || ((_flags & F_packed_color) != 0)))
Represents a single material in the material palette.
FltMaterial * get_material() const
Returns the material applied to this face, or NULL if no material was applied.
bool has_material() const
Returns true if the face has a material applied, false otherwise.
bool has_color() const
Returns true if the face has a primary color indicated, false otherwise.
void set_material(FltMaterial *material)
Applies the indicated material to this face, or if the material is NULL, clears it.
Represents a single texture in the texture palette.
bool has_texture() const
Returns true if the face has a texture applied, false otherwise.
void set_texture(FltTexture *texture)
Applies the indicated texture to this face, or if the texture is NULL, clears it.
FltTexture * get_texture() const
Returns the texture applied to this face, or NULL if no texture was applied.