PassRefPtr<LightSource> SVGFESpotLightElement::lightSource() const { FloatPoint3D pos(x(), y(), z()); FloatPoint3D direction(pointsAtX(), pointsAtY(), pointsAtZ()); return SpotLightSource::create(pos, direction, specularExponent(), limitingConeAngle()); }
SVGLightSource* SVGFESpotLightElement::lightSource() const { FloatPoint3D pos(x(), y(), z()); // convert lookAt to a direction FloatPoint3D direction(pointsAtX() - pos.x(), pointsAtY() - pos.y(), pointsAtZ() - pos.z()); direction.normalize(); return new SVGSpotLightSource(pos, direction, specularExponent(), limitingConeAngle()); }
FloatPoint3D SVGFELightElement::pointsAt() const { return FloatPoint3D(pointsAtX()->currentValue()->value(), pointsAtY()->currentValue()->value(), pointsAtZ()->currentValue()->value()); }