Skip to content

HTTPS clone URL

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
// surface.cc -- Primitive surface
//
// Copyright (C) 2010 Miles Bader <miles@gnu.org>
//
// 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 <miles@gnu.org>
//
#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.
//
void
Primitive::add_light (const TexVal<Color> &intens, std::vector<Light *> &lights)
const
{
lights.push_back (new SurfaceLight (*this, intens));
}
Jump to Line
Something went wrong with that request. Please try again.