The material (each optional): ambient, diffuse, specular and emission colors and shininess.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Sphere), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out), | optional | :: | ambient(4) |
[r, g, b, a] |
|
| real(kind=wp), | intent(out), | optional | :: | diffuse(4) |
[r, g, b, a] |
|
| real(kind=wp), | intent(out), | optional | :: | specular(4) |
[r, g, b, a] |
|
| real(kind=wp), | intent(out), | optional | :: | emission(4) |
[r, g, b, a] |
|
| real(kind=wp), | intent(out), | optional | :: | shininess |
0 to 128 |
pure subroutine material(self, ambient, diffuse, specular, emission, shininess) class(Sphere), intent(in) :: self real(wp), intent(out), optional :: ambient(4), diffuse(4), specular(4), emission(4) !! [r, g, b, a] real(wp), intent(out), optional :: shininess !! 0 to 128 if (present(ambient)) ambient = self%ambient_ if (present(diffuse)) diffuse = self%diffuse_ if (present(specular)) specular = self%specular_ if (present(emission)) emission = self%emission_ if (present(shininess)) shininess = self%shininess_ end subroutine material