Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Filters::PointLight Class Reference

#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
 

Detailed Description

Definition at line 71 of file nr-light.h.

Constructor & Destructor Documentation

◆ PointLight()

Inkscape::Filters::PointLight::PointLight ( PointLightData const &  light,
guint32  lighting_color,
const Geom::Affine trans,
int  device_scale = 1 
)

Constructor.

Parameters
lightthe sp light object
lighting_colorthe lighting_color used
transthe transformation between absolute coordinate (those employed in the sp light object) and current coordinate (those employed in the rendering)
device_scalefor 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.

◆ ~PointLight()

Inkscape::Filters::PointLight::~PointLight ( )
virtualdefault

Member Function Documentation

◆ light_components()

void Inkscape::Filters::PointLight::light_components ( NR::Fvector lc)

Computes the light components of the distant light.

Parameters
lca 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().

◆ light_vector()

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

Parameters
va Fvector reference where we store the result
xx coordinate of the current point
yy coordinate of the current point
zz 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().

Member Data Documentation

◆ color

guint32 Inkscape::Filters::PointLight::color
private

Definition at line 105 of file nr-light.h.

Referenced by light_components(), and PointLight().

◆ l_x

double Inkscape::Filters::PointLight::l_x
private

Definition at line 107 of file nr-light.h.

Referenced by light_vector(), and PointLight().

◆ l_y

double Inkscape::Filters::PointLight::l_y
private

Definition at line 108 of file nr-light.h.

Referenced by light_vector(), and PointLight().

◆ l_z

double Inkscape::Filters::PointLight::l_z
private

Definition at line 109 of file nr-light.h.

Referenced by light_vector(), and PointLight().


The documentation for this class was generated from the following files: