nr-filter-diffuselighting.cpp revision 6bf828abd4ba1c9b4c5a9ca8690758158e9a7174
/*
* feDiffuseLighting renderer
*
* Authors:
* Niko Kiirala <niko@kiirala.com>
* Jean-Rene Reinhard <jr@komite.net>
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
* Copyright (C) 2007-2010 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <glib/gmessages.h>
#include "display/cairo-templates.h"
#include "display/cairo-utils.h"
#include "display/nr-3dutils.h"
#include "display/nr-arena-item.h"
#include "display/nr-filter-diffuselighting.h"
#include "display/nr-filter-slot.h"
#include "display/nr-filter-units.h"
#include "display/nr-filter-utils.h"
#include "display/nr-light.h"
#include "libnr/nr-rect-l.h"
namespace Inkscape {
namespace Filters {
{
diffuseConstant = 1;
surfaceScale = 1;
lighting_color = 0xffffffff;
}
return new FilterDiffuseLighting();
}
{}
struct DiffuseLight : public SurfaceSynth {
{}
protected:
guint32 diffuseLighting(int x, int y, NR::Fvector const &light, NR::Fvector const &light_components) {
return pxout;
}
};
struct DiffuseDistantLight : public DiffuseLight {
double scale, double diffuse_constant)
{
}
guint32 operator()(int x, int y) {
}
private:
};
struct DiffusePointLight : public DiffuseLight {
{
}
guint32 operator()(int x, int y) {
}
private:
};
struct DiffuseSpotLight : public DiffuseLight {
{}
guint32 operator()(int x, int y) {
}
private:
};
{
switch (light_type) {
case DISTANT_LIGHT:
break;
case POINT_LIGHT:
break;
case SPOT_LIGHT:
break;
default: {
} break;
}
}
{
// TODO: support kernelUnitLength
// We expand the area by 1 in every direction to avoid artifacts on tile edges.
// However, it means that edge pixels will be incorrect.
}
} /* namespace Filters */
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :