Commit Graph

33 Commits

Author SHA1 Message Date
NAThompson
0f0c465c1b Deprecate Camera::Activate() and Camera::Finish() 2020-06-14 11:04:06 -04:00
NAThompson
0dccfb7d74 Rough semicolon. 2020-06-05 15:28:51 -04:00
NAThompson
db8f3c9fc9 Remove Initialize() boilerplate. 2020-06-05 13:38:18 -04:00
Kenneth Moreland
1e91b32ace Update image readers to style and library
Updated the image reader classes to better follow VTK-m naming
convention (i.e. use `ImageReaderPNG` instead of `PNGReader`).
The structure of the image reader class now also better matches
the interface for the VTK reader.

Also put the implementation of the image readers into the `vtkm_io`
library so that it only has to be compiled once.
2020-06-01 10:00:18 -06:00
Kenneth Moreland
0be50c119d Update VTK-m code to use new Vec aliases
Should make the code easier to read.
2019-07-31 12:55:40 -06:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
944bc3c0d6 Introduce vtkm::cont::ColorTable replacing vtkm::rendering::ColorTable
The new and improved vtkm::cont::ColorTable provides a more feature complete
color table implementation that is modeled after
vtkDiscretizableColorTransferFunction. This class therefore supports different
color spaces ( rgb, lab, hsv, diverging ) and supports execution across all
device adapters.
2018-03-28 16:11:23 -04:00
Matt Larsen
c6565cdecb correcting compile error with CanvasGL 2018-01-29 13:41:06 -08:00
Matt Larsen
c57fad48ee Depth no considered with annotations. Fix for volume renderer. Consistent color blending. 2018-01-29 11:39:21 -08:00
Matt Larsen
6d61630928 let there be foreground color 2017-12-04 20:46:38 -08:00
Manish Mathai
e6c204ac67 Fix copyright header merge issues 2017-09-22 15:31:27 -07:00
Manish Mathai
495adacc38 Merge branch 'master' into concrete-canvas 2017-09-22 09:32:21 -07:00
Kenneth Moreland
c3a3184d51 Update copyright for Sandia
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.
2017-09-20 15:33:44 -06:00
Manish Mathai
7a39002522 Removes font management from WorldAnnotator and relies on Canvas 2017-09-18 14:41:28 -07:00
Manish Mathai
6a3229779f Move the Canvas state to an internals class
This is to maintain compability with future minor releases
2017-09-17 20:40:24 -07:00
Manish Mathai
8b88a043e4 Adds text rendering and line rendering to WorldAnnotator 2017-09-17 15:10:40 -07:00
Manish Mathai
3e5878394e Extract canvas's line rendering to LineRenderer
This allows for the line rendering to be shared for other use cases like
`WorldAnnotator`
2017-09-14 09:40:23 -07:00
Manish Mathai
3051d88de0 Adds text rendering to Canvas. 2017-09-13 13:42:11 -07:00
Manish Mathai
7f18d17d24 Converts Canvas to a concrete implementation.
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.
2017-08-31 10:40:30 -07:00
James
6b59b01e14 Adding color lines, view annotations, line color labels. 2017-07-28 13:31:19 -04:00
Robert Maynard
5dd346007b Respect VTK-m convention of parameters all or nothing on a line
clang-format BinPack settings have been disabled to make sure that the
VTK-m style guideline is obeyed.
2017-05-26 13:53:28 -04:00
Kitware Robot
4ade5f5770 clang-format: apply to the entire tree 2017-05-25 07:51:37 -04:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Robert Maynard
7d295de8c9 Refactor vtk-m symbol visibility macros to be on the classes.
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.
2016-10-19 15:01:32 -04:00
Kenneth Moreland
22c6741152 Add View to rendering library
To get rid of some templates, I added the ability to create new
instances of mappers and canvases without knowing their type.
2016-09-07 16:48:04 -06:00
Kenneth Moreland
1073fdede1 Move Canvas classes to rendering library 2016-09-07 16:47:46 -06:00
Kenneth Moreland
72b43d7151 Consolidate background color in rendering classes
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.
2016-06-11 12:09:51 -06:00
Kenneth Moreland
9b34f9eccc Perform missing updates to OSMesa code
I do not have OSMesa on my main development platform, so I missed updating
some of the code when I changed the interface.

Also removed some inline statements on pure virtual functions that GCC
was complaining about.
2016-06-09 12:35:59 -06:00
Kenneth Moreland
ca87b5f736 Make defining WorldAnnotator for View optional
Most of the time, you just match the WorldAnnotator with the canvas of
the same type. Rather than make the user specify it every time, add a
method to the canvas that creates a "good" WorldAnnotator to use with
it. Then, if a WorldAnnotator is not given to the View constructor, one
is automatically created from the Canvas.
2016-06-09 12:08:03 -06:00
Kenneth Moreland
2be7a8e032 Remove templating from View
The template parameters on vtkm::rendering::View are unnecessary. All
three of the templated classes are polymorphic (with virtual functions).
Thus, you just have to specify them at the constructor. Removing the
template parameters makes the syntax a bit cleaner and removes some
unnecessary duplication in the executable.

Removing the template does mean we cannot optimize in the future.
However, I expect us to start using more virtual methods rather than
less, so I think this is a move in the right direction.
2016-06-09 12:08:01 -06:00
Kenneth Moreland
5af7c6ff4c Hide internal parts of Canvas 2016-06-09 12:07:59 -06:00
Kenneth Moreland
b01e8391b4 Consolidate functionality in Canvas classes
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.
2016-06-09 12:07:55 -06:00
Kenneth Moreland
fa3e43fbaa Change vtkm::rendering::RenderSurface to Canvas
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.
2016-06-02 16:04:13 -06:00