NewPoint creates and returns a point light with the specified color and intensity
(color *math32.Color, intensity float32)
| 27 | |
| 28 | // NewPoint creates and returns a point light with the specified color and intensity |
| 29 | func NewPoint(color *math32.Color, intensity float32) *Point { |
| 30 | |
| 31 | lp := new(Point) |
| 32 | lp.Node.Init(lp) |
| 33 | lp.color = *color |
| 34 | lp.intensity = intensity |
| 35 | |
| 36 | // Creates uniform and sets initial values |
| 37 | lp.uni.Init("PointLight") |
| 38 | lp.SetColor(color) |
| 39 | lp.SetIntensity(intensity) |
| 40 | lp.SetLinearDecay(1.0) |
| 41 | lp.SetQuadraticDecay(1.0) |
| 42 | return lp |
| 43 | } |
| 44 | |
| 45 | // SetColor sets the color of this light |
| 46 | func (lp *Point) SetColor(color *math32.Color) { |
nothing calls this directly
no test coverage detected