Inkscape
Vector Graphics Editor
|
#include <nr-light.h>
Public Member Functions | |
PointLight (PointLightData const &light, guint32 lighting_color, const Geom::Affine &trans, int device_scale=1) | |
Constructor. | |
virtual | ~PointLight () |
void | light_vector (NR::Fvector &v, double x, double y, double z) |
Computes the light vector of the distant light at point (x,y,z). | |
void | light_components (NR::Fvector &lc) |
Computes the light components of the distant light. | |
Private Attributes | |
guint32 | color |
double | l_x |
double | l_y |
double | l_z |
Definition at line 71 of file nr-light.h.
Inkscape::Filters::PointLight::PointLight | ( | PointLightData const & | light, |
guint32 | lighting_color, | ||
const Geom::Affine & | trans, | ||
int | device_scale = 1 |
||
) |
Constructor.
light | the sp light object |
lighting_color | the lighting_color used |
trans | the transformation between absolute coordinate (those employed in the sp light object) and current coordinate (those employed in the rendering) |
device_scale | for high DPI monitors. |
Definition at line 46 of file nr-light.cpp.
References color, NR::convert_coord(), l_x, l_y, l_z, Inkscape::Filters::PointLightData::x, Inkscape::Filters::PointLightData::y, and Inkscape::Filters::PointLightData::z.
|
virtualdefault |
void Inkscape::Filters::PointLight::light_components | ( | NR::Fvector & | lc | ) |
Computes the light components of the distant light.
lc | a Fvector reference where we store the result, X=R, Y=G, Z=B |
Definition at line 63 of file nr-light.cpp.
References color, Inkscape::Filters::LIGHT_BLUE, Inkscape::Filters::LIGHT_GREEN, Inkscape::Filters::LIGHT_RED, SP_RGBA32_B_U(), SP_RGBA32_G_U(), and SP_RGBA32_R_U().
void Inkscape::Filters::PointLight::light_vector | ( | NR::Fvector & | v, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Computes the light vector of the distant light at point (x,y,z).
x, y and z are given in the arena_item coordinate, they are used as is
v | a Fvector reference where we store the result |
x | x coordinate of the current point |
y | y coordinate of the current point |
z | z coordinate of the current point |
Definition at line 56 of file nr-light.cpp.
References l_x, l_y, l_z, and NR::normalize_vector().
|
private |
Definition at line 105 of file nr-light.h.
Referenced by light_components(), and PointLight().
|
private |
Definition at line 107 of file nr-light.h.
Referenced by light_vector(), and PointLight().
|
private |
Definition at line 108 of file nr-light.h.
Referenced by light_vector(), and PointLight().
|
private |
Definition at line 109 of file nr-light.h.
Referenced by light_vector(), and PointLight().