PhongMaterialData class
Phong material data.
Contents
Base classes
- class AbstractMaterialData
 - Base for material data.
 
Public types
- enum (anonymous): UnsignedInt { AmbientTextureID = 0, DiffuseTextureID = 1, SpecularTextureID = 3 }
 - enum class Flag: UnsignedByte { AmbientTexture = 1 << 0, DiffuseTexture = 1 << 1, SpecularTexture = 1 << 2 }
 - Material flag.
 - 
              using Flags = Containers::
EnumSet<Flag>  - Material flags.
 
Constructors, destructors, conversion operators
- PhongMaterialData(Flags flags, Float shininess, const void* importerState = nullptr) explicit noexcept
 - Constructor.
 - PhongMaterialData(const PhongMaterialData&) deleted
 - Copying is not allowed.
 - PhongMaterialData(PhongMaterialData&& other) noexcept
 - Move constructor.
 
Public functions
- auto operator=(const PhongMaterialData&) -> PhongMaterialData& deleted
 - Copying is not allowed.
 - auto operator=(PhongMaterialData&& other) -> PhongMaterialData& noexcept
 - Move assignment.
 - auto flags() const -> Flags
 - Material flags.
 - auto ambientColor() -> Color3&
 - Ambient color.
 - auto ambientColor() const -> Color3
 - auto ambientTexture() -> UnsignedInt&
 - Ambient texture ID.
 - auto ambientTexture() const -> UnsignedInt
 - auto diffuseColor() -> Color3&
 - Diffuse color.
 - auto diffuseColor() const -> Color3
 - auto diffuseTexture() -> UnsignedInt&
 - Diffuse texture ID.
 - auto diffuseTexture() const -> UnsignedInt
 - auto specularColor() -> Color3&
 - Specular color.
 - auto specularColor() const -> Color3
 - auto specularTexture() -> UnsignedInt&
 - Specular texture ID.
 - auto specularTexture() const -> UnsignedInt
 - auto shininess() const -> Float
 - Shininess.
 
Enum documentation
              enum Magnum:: Trade:: PhongMaterialData:: (anonymous): UnsignedInt
            
            | Enumerators | |
|---|---|
| AmbientTextureID | 
 Ambient texture ID for mapping with texture coordinates  | 
                
| DiffuseTextureID | 
 Diffuse texture ID for mapping with texture coordinates  | 
                
| SpecularTextureID | 
 Specular texture ID for mapping with texture coordinates  | 
                
              enum class Magnum:: Trade:: PhongMaterialData:: Flag: UnsignedByte
            
            Material flag.
| Enumerators | |
|---|---|
| AmbientTexture | 
 The material has ambient texture instead of color  | 
                
| DiffuseTexture | 
 The material has diffuse texture instead of color  | 
                
| SpecularTexture | 
 The material has specular texture instead of color  | 
                
Typedef documentation
              typedef Containers:: EnumSet<Flag> Magnum:: Trade:: PhongMaterialData:: Flags
            
            Material flags.
Function documentation
               Magnum:: Trade:: PhongMaterialData:: PhongMaterialData(Flags flags,
              Float shininess,
              const void* importerState = nullptr) explicit  noexcept
            
            Constructor.
| Parameters | |
|---|---|
| flags | Material flags | 
| shininess | Shininess | 
| importerState | Importer-specific state | 
Colors and textures should be specified using member functions based on what flags are set.
              Color3& Magnum:: Trade:: PhongMaterialData:: ambientColor()
            
            Ambient color.
Available only if the material doesn't have Flag::
              Color3 Magnum:: Trade:: PhongMaterialData:: ambientColor() const
            
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              UnsignedInt& Magnum:: Trade:: PhongMaterialData:: ambientTexture()
            
            Ambient texture ID.
Available only if the material has Flag::
              UnsignedInt Magnum:: Trade:: PhongMaterialData:: ambientTexture() const
            
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              Color3& Magnum:: Trade:: PhongMaterialData:: diffuseColor()
            
            Diffuse color.
Available only if the material doesn't have Flag::
              Color3 Magnum:: Trade:: PhongMaterialData:: diffuseColor() const
            
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              UnsignedInt& Magnum:: Trade:: PhongMaterialData:: diffuseTexture()
            
            Diffuse texture ID.
Available only if the material has Flag::
              UnsignedInt Magnum:: Trade:: PhongMaterialData:: diffuseTexture() const
            
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              Color3& Magnum:: Trade:: PhongMaterialData:: specularColor()
            
            Specular color.
Available only if the material doesn't have Flag::
              Color3 Magnum:: Trade:: PhongMaterialData:: specularColor() const
            
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              UnsignedInt& Magnum:: Trade:: PhongMaterialData:: specularTexture()
            
            Specular texture ID.
Available only if the material has Flag::
              UnsignedInt Magnum:: Trade:: PhongMaterialData:: specularTexture() const
            
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              Debug& operator<<(Debug& debug,
              PhongMaterialData:: Flag value)
            
            Debug output operator.
              Debug& operator<<(Debug& debug,
              PhongMaterialData:: Flags value)
            
            Debug output operator.