Documentation ¶
Overview ¶
Package material represents a material on the surface of an object.
Index ¶
Constants ¶
View Source
const ( // DefaultAmbient is the ambient reflection factor of a default material. DefaultAmbient = 0.1 // DefaultDiffuse is the diffuse reflection factor of a default material. DefaultDiffuse = 0.9 // DefaultSpecular is the specular reflection factor of a default material. DefaultSpecular = 0.9 // DefaultShininess is the shininess factor of a default material. DefaultShininess = 200.0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Material ¶
type Material struct { // The Color of the material. Default: white Color color.Color // The Ambient reflection of the material. Range is [0, 1]. Default is 0.1. Ambient float64 // The Diffuse reflection of the material. Range is [0, 1]. Default is 0.9 Diffuse float64 // The Specular reflection of the material. Range is [0, 1]. Default is 0.9 Specular float64 // The Shininess of the material. Range is [10, 200]. Default is 200.0 Shininess float64 }
Material represents a material on the surface of an object. It uses the Phong reflection model to simulate the reflection of light.
func NewDefaultMaterial ¶
func NewDefaultMaterial() *Material
NewDefaultMaterial returns a new Material with default values.
Click to show internal directories.
Click to hide internal directories.