Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 6441bbedac
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (24 sloc) 0.837 kb
// -- Primitive surface
// Copyright (C) 2010 Miles Bader <>
// This source code is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 3, or (at
// your option) any later version. See the file COPYING for more details.
// Written by Miles Bader <>
#include "surface-light.h"
#include "primitive.h"
using namespace snogray;
// Add a single area light, using this primitive's shape, to LIGHTS,
// with with intensity INTENSITY. An error will be signaled if this
// primitive does not support lighting.
Primitive::add_light (const TexVal<Color> &intens, std::vector<Light *> &lights)
lights.push_back (new SurfaceLight (*this, intens));
Jump to Line
Something went wrong with that request. Please try again.