Inkscape
Vector Graphics Editor
|
Classes | |
struct | Fvector |
a type of 3 gdouble components vectors More... | |
Functions | |
void | convert_coord (gdouble &x, gdouble &y, gdouble &z, Geom::Affine const &trans) |
gdouble | norm (const Fvector &v) |
returns the euclidean norm of the vector v | |
void | normalize_vector (Fvector &v) |
Normalizes a vector. | |
gdouble | scalar_product (const Fvector &a, const Fvector &b) |
Computes the scalar product between two Fvectors. | |
void | normalized_sum (Fvector &r, const Fvector &a, const Fvector &b) |
Computes the normalized sum of two Fvectors. | |
static const Fvector | EYE_VECTOR (0, 0, 1) |
The eye vector. | |
void | convert_coord (double &x, double &y, double &z, Geom::Affine const &trans) |
Applies the transformation matrix to (x, y, z). | |
void NR::convert_coord | ( | double & | x, |
double & | y, | ||
double & | z, | ||
Geom::Affine const & | trans | ||
) |
Applies the transformation matrix to (x, y, z).
This function assumes that trans[0] = trans[3]. x and y are transformed according to trans, z is multiplied by trans[0].
x | a reference to a x coordinate |
y | a reference to a y coordinate |
z | a reference to a z coordinate |
z | a reference to a transformation matrix |
void NR::convert_coord | ( | gdouble & | x, |
gdouble & | y, | ||
gdouble & | z, | ||
Geom::Affine const & | trans | ||
) |
Definition at line 22 of file nr-3dutils.cpp.
References Geom::X, and Geom::Y.
Referenced by Inkscape::Filters::PointLight::PointLight(), and Inkscape::Filters::SpotLight::SpotLight().
|
static |
The eye vector.
double NR::norm | ( | const Fvector & | v | ) |
returns the euclidean norm of the vector v
v | a reference to a vector with double components |
Definition at line 30 of file nr-3dutils.cpp.
Referenced by normalize_vector().
void NR::normalize_vector | ( | Fvector & | v | ) |
Normalizes a vector.
v | a reference to a vector to normalize |
Definition at line 34 of file nr-3dutils.cpp.
References norm().
Referenced by Inkscape::Filters::PointLight::light_vector(), Inkscape::Filters::SpotLight::light_vector(), normalized_sum(), Inkscape::Filters::SpotLight::SpotLight(), and SurfaceSynth::surfaceNormalAt().
Computes the normalized sum of two Fvectors.
Definition at line 48 of file nr-3dutils.cpp.
References normalize_vector().
Computes the scalar product between two Fvectors.
Definition at line 42 of file nr-3dutils.cpp.
Referenced by Inkscape::Filters::SpotLight::light_components().