Sandia National Laboratories recently changed management from the
Sandia Corporation to the National Technology & Engineering Solutions
of Sandia, LLC (NTESS). The copyright statements need to be updated
accordingly.
This commit converts `Canvas` from an abstract class to a concrete
class by converting the pure virtual methods to empty/default
implementations. It provides an implementation for `Canvas::AddLine`
using Bresenham's line drawing algorithm.
2b5e8e9f Removing debug statements
0459913a Multi canvas rendering
35877cd9 Adding missing file
b1e3688b multi-canvas working for ray tracer + volume renderer
33af0fec composing ray tracer and volume renderer is successful. Still need a strategy for the background color.
8e5f309e adding support in rendering triangulator for cell set permutation
92fde35b fixing depth
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !862
Instead of labeling each method that needs to have visibility
we can label entire classes, this reduces the amount of noise and
potential for mistakes when writing classes.
The clang compiler was running into linker errors constructors of
classes with virtual methods that were inline and destructors that were
not declared at all. In this case, the compiler was not creating
everything needed by a virtual table and the link died.
Before this commit, there were three separate classes (Mapper, Canvas,
and View) that were all managing their own version of the background
color. As you can imagine, this could easily become out of sync, and in
fact if the user code did not specify the same background at least
twice, it would not work.
Fix this by consolidating the background color management to the Canvas.
This is the class most responsible for maintaining the background. All
other classes get or set the background from the Canvas.
That said, I also removed setting the background color from the
constructor in the Canvas. This background color is overridden by the
View anyway, so having it there was only confusing.
Move some of the management of the width, height, and buffers to the base
Canvas class. Also, when it makes sense, get the width and height from
the rendering system.
Also changed the color buffer to be a Vec so that you don't have to
manage array offsets by hand.
All of these changes snowballed from the observation that the glut
example did not properly enable the depth buffer.
The word surface is more often used for something like a polygonal mesh,
so this name is quite confusing. Canvas is consistent with a
conventional name in GUI widget APIs.