(start xml.StartElement, li *Light)
| 284 | } |
| 285 | |
| 286 | func (d *Decoder) decPoint(start xml.StartElement, li *Light) error { |
| 287 | |
| 288 | pl := new(Point) |
| 289 | li.TechniqueCommon.Type = pl |
| 290 | |
| 291 | for { |
| 292 | child, cdata, err := d.decNextChild(start) |
| 293 | if err != nil || child.Name.Local == "" { |
| 294 | return err |
| 295 | } |
| 296 | if child.Name.Local == "color" { |
| 297 | err := d.decLightColor(child, cdata, &pl.Color) |
| 298 | if err != nil { |
| 299 | return err |
| 300 | } |
| 301 | continue |
| 302 | } |
| 303 | if child.Name.Local == "constant_attenuation" { |
| 304 | fv, err := d.decFloatValue(child, cdata) |
| 305 | if err != nil { |
| 306 | return err |
| 307 | } |
| 308 | pl.ConstantAttenuation = fv |
| 309 | continue |
| 310 | } |
| 311 | if child.Name.Local == "linear_attenuation" { |
| 312 | fv, err := d.decFloatValue(child, cdata) |
| 313 | if err != nil { |
| 314 | return err |
| 315 | } |
| 316 | pl.LinearAttenuation = fv |
| 317 | continue |
| 318 | } |
| 319 | if child.Name.Local == "quadratic_attenuation" { |
| 320 | fv, err := d.decFloatValue(child, cdata) |
| 321 | if err != nil { |
| 322 | return err |
| 323 | } |
| 324 | pl.QuadraticAttenuation = fv |
| 325 | continue |
| 326 | } |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | func (d *Decoder) decSpot(start xml.StartElement, li *Light) error { |
| 331 |
no test coverage detected