public Spot buildSpot()
{
if (this.color == null)
throw new IllegalStateException("color must be set");
final Spot spot = new Spot(this.color);
spot.setConstantAttenuation(this.constantAttenuation);
spot.setLinearAttenuation(this.linearAttenuation);
spot.setQuadraticAttenuation(this.quadraticAttenuation);
spot.setFalloffAngle(this.falloffAngle);
spot.setFalloffExponent(this.falloffExponent);
return spot;
}