Commit Graph

38 Commits

Author SHA1 Message Date
dpugmire
cabaf3e269 Add option to enable/disable world annotations. 2020-07-09 14:38:39 -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
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Haocheng LIU
d195240165 Refactor View class and fix its memory leak 2019-02-11 16:32:27 -05:00
Matt Larsen
6d61630928 let there be foreground color 2017-12-04 20:46:38 -08: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
James
1eb585121c Adding ability to modify axis color as well as legend label color. 2017-08-02 12:32:19 -04: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
5455608c69 Remove boost::shared_ptr from rendering library
The remove boost::shared_ptr and the rendering library branches where
developed simultaneously, and thus some of the rendering library
implementation was using boost::shared_ptr like the old code. Bring up
to date with the rest of VTK-m by using std::shared_ptr instead.
2016-09-12 11:08:06 -06: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
d4afc12add Add Actor and Scene to rendering library
Also took away some unnecessary templates.
2016-09-07 16:47:56 -06:00
Kenneth Moreland
d4e5bb0aee Resolve conflicting merges
Merge request !445 (Camera enhancements) and merge request !448
(Consolidate background color) had conflicting changes in View.h.
Although git did not pick up on the conflict because each merge modified a
different portion of View.h, the final merge with both of these resulted
in a compile error.

Basically what happened was `Consolidate background color` changed all
the View constructors to reflect changes. `Camera enhancements` added a
new constructor to View using the old construction method. The new
constructor with the old construction method caused an error.
2016-06-13 09:57:19 -06:00
Kenneth Moreland
e50d91199c Merge branch 'consolidate-background-color' into 'master'
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.

See merge request !448
2016-06-13 11:46:18 -04: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
ebfb1e7389 Make giving Camera to View optional
It is now optional to give a Camera object when constructing a View. If
a Camera is not specified, one is automatically set up by calling
ResetToBounds on the spatial bounds of the scene.

This makes it even easier to set up a view.
2016-06-09 13:34:29 -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
55af901f60 Hide Camera private parts
With only a few exceptions for simple structures, we do not expose the
members of classes. Instead, we provide accessor methods. Do this for
Camera as well as add some helper methods.
2016-06-09 12:07:58 -06:00
Kenneth Moreland
0769b96bf3 Remove Width and Height from Camera
The width and height are maintained out of necessity by the canvas. A
second copy was maintained by the camera, which was only used for
computing the aspect ratio and similar metrics for projections.

Having to maintain the width/height in two places is a bit of a hassle
and provides the opportunity for bugs if they get out of sync. Instead,
have the width/height managed in one place (the canvas) and pass them as
parameters as necessary.
2016-06-09 12:07:56 -06:00
Kenneth Moreland
e30607f134 Hide internal std::vector in Scene
Generally we try not to expose the implementation details of how things
are stored in objects.

Also changed some arguments that should have been declared const to
actually be const.
2016-06-09 12:07:53 -06:00
Kenneth Moreland
eb9288cb1a Change vtkm::rendering::Window to View
The rendering classes do not actually manage windows, and window was not
descriptive of what this class was doing. We decided that the class was
mostly analogous to what we call a "view" in ParaView.
2016-06-02 15:43:40 -06:00
Kenneth Moreland
1934049df9 Change vtkm::rendering::View to Camera 2016-06-02 13:04:01 -06:00
Jeremy Meredith
b158ac2c11 removing debug code 2016-05-23 14:02:11 -04:00
Jeremy Meredith
dbdd670ba8 adding billboard text support and cleaning up. 2016-05-23 13:52:47 -04:00
Kenneth Moreland
732a45ff3b Fix shadowed variable warnings and style for View.h
Several of the methods in View.h were giving me warnings about shadowed
variables because the name of the arguments were the same as some class
member variables. I fixed this by changing the variable names to match
the VTK-m coding convention of using capitalized words for class member
variables and starting lower case letter for method arguments and local
variables.

Since this ended up changing over half of the lines of View.h and
Camera.h anyway, I also made some other modifications to the style to put
it in alignment with VTK-m coding conventions including 2-space
indentation and more descriptive variable names.
2016-05-19 16:37:37 -06:00
Dave Pugmire
5f9403b881 Add trackball rotation, translate and zoom ot examples/rendering, and to the view classes. 2016-05-18 10:32:02 -04:00
Dave Pugmire
72673ed952 Add glut-based rendering example.
Added a GL-based render surface.
2016-05-05 13:26:39 -04:00
Dave Pugmire
1af37d0102 Support for 2D rendering. And some general clean up. 2016-04-18 16:42:59 -04:00
Robert Maynard
af2ae8e6e2 Correct issue in matrix mult in View. 2016-03-30 11:35:01 -04:00
Robert Maynard
76b6179abf Add missing copyright headers. 2016-03-28 11:16:35 -04:00
Matt Larsen
9883773557 Corrected error in projection matrix that was causing mismatches with ray tracing image and depth buffers. 2016-03-28 08:51:36 -04:00
Dave Pugmire
f84401243a Initial checkin for rendering infrastructure.
This largely follows things from EAVL. This is going to change going forward.
Most of the stuff is inside Window.h right now for convenience.
2016-03-28 08:51:35 -04:00
mclarsen
03a95c44b1 adding rendering from other branch 2016-03-28 08:50:04 -04:00