Commit Graph

1783 Commits

Author SHA1 Message Date
Samuel Li
0164d38e91 use a worklet to perform array extension 2016-08-03 16:34:02 -04:00
Sujin Philip
746d6fc7b2 Fix configuration of vectorization
1. Re-enable vectorization setup in cmake
2. Set vectorization flags to empty when "none" is specified.
2016-08-03 16:07:21 -04:00
T.J. Corona
927387b1a2 Add vtkm::cont::Field,CoordinateSystem as Invokable parameters.
Originally, only array handles could be passed to the dispatcher.
This update extends the list to Field and CoordinateSystem as
dynamic objects.
2016-08-03 15:46:30 -04:00
Robert Maynard
a6609311fa Silence auto_ptr deprecation warnings with older boosts ( < 1.61 ) 2016-08-03 15:38:38 -04:00
Robert Maynard
6d38f44d6c Update ListTag and DispatcherBase to leverage C++11 features. 2016-08-03 15:38:38 -04:00
Robert Maynard
ea0d84a810 Remove VTK-m Variadic defines and replace them with a single CXX11 define 2016-08-03 15:38:38 -04:00
Samuel Li
433f89ae12 add worklet to copy a portion of array 2016-08-03 11:34:04 -04:00
Robert Maynard
2b011c621c Merge topic 'add-device-to-filter-policy'
e177e5a9 Add device list to filter policy.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !491
2016-08-03 10:34:47 -04:00
T.J. Corona
e177e5a9ff Add device list to filter policy. 2016-08-03 10:17:20 -04:00
Kenneth Moreland
dcb032fc00 Merge branch 'expose-storage' into 'master'
Expose storage in ArrayHandle, and Expose data array in StorageBasic.



See merge request !487
2016-08-03 08:51:12 -04:00
Robert Maynard
b50e18b374 Merge topic 'cellsetexplicit-addcell-indexable-type'
62fa852e In CellSetExplicit::AddCell, change vtkm::Vec to template parameter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !490
2016-08-03 08:21:49 -04:00
Samuel Li
b96d65550f extend1D returns ArrayHandlePermut 2016-08-02 23:41:46 -04:00
Christopher Sewell
2caf81a4af First commit for ArrayHandleStreaming 2016-08-02 16:54:12 -06:00
Samuel Li
a4461e0e9e IDWT worklet uses WholeArrayOut now 2016-08-02 18:14:03 -04:00
Samuel Li
2114f557e6 another memcpy is avoided 2016-08-02 16:35:00 -04:00
Samuel Li
b8c09693a3 saves another memcpy operation 2016-08-02 16:09:29 -04:00
Samuel Li
fc609eddd2 fix IDWT worklet... An error was introduced in previous commit 2016-08-02 15:06:20 -04:00
Samuel Li
1f2f88430c small fix on idwt worklet 2016-08-02 14:50:54 -04:00
T.J. Corona
3461f5c940 Merge topic 'division-op-for-vec'
3463db3b Add division operator for Vec/scalar operations.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brent Lessley <blessley@cs.uoregon.edu>
Merge-request: !489
2016-08-02 14:44:43 -04:00
T.J. Corona
62fa852e12 In CellSetExplicit::AddCell, change vtkm::Vec to template parameter.
This commit is in reference to Issue #40.
2016-08-02 14:40:59 -04:00
T.J. Corona
e07e4aeda7 Merge topic 'expose-cellarray-api'
8ad8eeda In DynamicCellSet, expose CellSet API.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !488
2016-08-02 14:25:15 -04:00
T.J. Corona
3463db3b28 Add division operator for Vec/scalar operations. 2016-08-02 14:21:19 -04:00
Samuel Li
d88bdff94c DWT worklet uses WholeArrayOut to avoid a memory copy 2016-08-02 14:09:34 -04:00
T.J. Corona
2ade3ba8d8 Expose storage in ArrayHandle, and Expose data array in StorageBasic. 2016-08-02 14:05:05 -04:00
T.J. Corona
8ad8eeda77 In DynamicCellSet, expose CellSet API.
Also changes GetCellSet() to CastToBase().
2016-08-02 13:39:25 -04:00
T.J. Corona
2e33f8830f Collapse exec and cont portals into one class. 2016-08-02 11:26:29 -04:00
Kenneth Moreland
8863769ea7 Fix an infinite recursion where the wrong overload was called
The intension was that if Camera::Zoom was called with a Float64, it
would call the Float32 version. However, I made a type where it called
itself. The latest version of XCode called me out on this infinite
recursion.

I think this is the equivalent of the compiler calling me a dumb-ass.
2016-07-31 11:47:30 -06:00
Samuel Li
448e9be5a8 small tweaks, ready for pull request 2016-07-29 14:16:10 -07:00
Samuel Li
dd1ef8e47d include all objects in the cmake file 2016-07-29 13:19:28 -07:00
Samuel Li
3cc6385426 remove unnecessary files 2016-07-29 13:05:53 -07:00
Samuel Li
ec46fd58a0 fixed bugs, ready for Chris to review 2016-07-29 11:27:37 -07:00
Matt Larsen
a4012c1667 Rmoving throw from worklet that prevents rendering from compiling with CUDA 2016-07-29 07:50:14 -07:00
Samuel Li
ff620d0ab5 fixed a bug, identified another bug 2016-07-28 21:33:47 -07:00
Samuel Li
7f9fd0d66d finish all the statics 2016-07-28 21:07:05 -06:00
Samuel Li
fa1198bb85 summation algorithm function is ready 2016-07-28 19:12:57 -06:00
Samuel Li
1a7bae0335 with a hack on ArrayHandlePermutation.h, wavelet works on CUDA device as well 2016-07-28 17:55:38 -06:00
Samuel Li
60d2428100 finishing squash function 2016-07-28 16:40:37 -06:00
Samuel Li
951d9fce2c move device copy to a function of itself; other small changes 2016-07-28 14:55:10 -07:00
Robert Maynard
063a4248b3 Merge topic 'unify_contour'
73440ccb vtkm::filter::MarchingCubes now uses vtkm::worklet
33d7ad8f Unify the contour MarchingCubes implementations.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !476
2016-07-28 11:45:38 -04:00
Robert Maynard
73440ccb4e vtkm::filter::MarchingCubes now uses vtkm::worklet
Instead of having two separate implementations of MarchingCubes, we have
a single implementation in worklet, and filter uses that.

That does mean that the version in worklet has been updated to support
merging of duplicate point coordinates.
2016-07-28 08:52:34 -04:00
Samuel Li
7dc59d80d7 trying to figure out how to use deviceAdapterAlgorithms 2016-07-27 16:23:26 -07:00
Samuel Li
ab021ce6f0 Chris helped to eliminate all compiling errors 2016-07-27 15:42:29 -07:00
Samuel Li
b2d15bbbde move wavelet stuff back to worklet folder 2016-07-27 14:28:38 -06:00
Samuel Li
cf1299bd75 in the progress of squashing coefficients 2016-07-27 11:32:25 -06:00
Samuel Li
feaa605d21 Add vtkm_exec_cont_export tags 2016-07-27 10:29:18 -06:00
Samuel Li
86ddb8d89a add timer for verification 2016-07-27 08:44:12 -07:00
Samuel Li
289c857b87 fix a bug in UnitTestWaveletCompressor, and a few cleanups 2016-07-27 08:26:31 -07:00
Samuel Li
c3dd581b49 About to add function to squash coefficients, but seems to have bugs running on CUDA 2016-07-26 19:00:23 -06:00
Samuel Li
148d96d3c4 UnitTestWaveletCompressorFilter performs tests on the output values 2016-07-26 17:46:53 -06:00
Samuel Li
06a68b55ab small changes 2016-07-25 16:32:02 -07:00
Samuel Li
da7e58d26a WaveDecompose and WaveReconstruct both work 2016-07-25 17:14:53 -06:00
Samuel Li
95a8797c1f WaveletDWT now uses simple array handle for extensions in all functions 2016-07-25 12:49:53 -06:00
Samuel Li
c54ad2fd13 successfully test the Extend1D function to return a regular array handle 2016-07-25 01:08:19 -06:00
Samuel Li
acc0b694ce delete debug info 2016-07-22 19:07:10 -06:00
Samuel Li
fb83b61d5a ready to test wavedecompose, but still need to debug... 2016-07-22 17:51:50 -06:00
Samuel Li
8e7bb4789b more properly use this pointer and domain name of classes 2016-07-22 16:11:11 -06:00
Samuel Li
de21336039 create WaveletCompressor class 2016-07-21 17:12:19 -06:00
Samuel Li
e35e4b47eb CDF5/3 kernel seems to be working correctly 2016-07-21 16:39:53 -06:00
Samuel Li
69044fed3b remove old files 2016-07-21 14:37:39 -06:00
Samuel Li
3ea8ad6d5b IDWT test correct now 2016-07-21 14:18:05 -06:00
Samuel Li
a8d47c4bf1 IDWT1D finishes, but still has bugs. 2016-07-20 18:05:14 -06:00
Samuel Li
132a4dfe33 Extend1D uses more templates 2016-07-20 13:55:23 -06:00
Robert Maynard
45ada6b55a Rework ArrayHandleCuda to make it stop generate warnings 2016-07-20 12:41:13 -04:00
Robert Maynard
33d7ad8f86 Unify the contour MarchingCubes implementations. 2016-07-20 12:40:03 -04:00
Samuel Li
9e706d91ab test concatenating empty arrays 2016-07-20 10:04:53 -06:00
Samuel Li
184e66fae6 keep working on idwt 2016-07-19 18:03:40 -06:00
Samuel Li
4f2df9d518 DWT interface change 2016-07-19 14:09:14 -06:00
Samuel Li
5e3a5058ac InverseTransformOdd worklet finished 2016-07-19 13:40:46 -06:00
Robert Maynard
4ca6ce2ad6 nvcc doesn't have troubles with boost shared_ptr optimizations 2016-07-19 13:26:23 -04:00
Samuel Li
16528df5ba remove redundent files 2016-07-19 10:06:48 -06:00
Samuel Li
6bfb1deb94 DWT1D seems working OK now 2016-07-18 17:45:17 -06:00
Samuel Li
4b380a3d78 Fix a bug in ArrayHandleConcatenate 2016-07-18 13:21:52 -07:00
Samuel Li
7345737491 Fix a bug in wavelet filter to return ArrayHandles 2016-07-18 13:39:42 -06:00
Samuel Li
3c2aa8aa98 Testing filters, TestDWT1D() throws error 2016-07-18 10:56:45 -06:00
Samuel Li
6d81f261d5 Re-organize files, adding functions to filters. The worklet of WaveletTransform passes tests. 2016-07-18 09:23:20 -06:00
Samuel Li
4ac822acad implement DWT1D function. Thinking to move non-worklet stuff to filter foler. 2016-07-17 17:49:00 -06:00
Samuel Li
cb7a5d6f17 put Wavelets class under wavelet namespace 2016-07-17 15:19:07 -06:00
Samuel Li
ba1ea292db Merge branch 'wavelets' of gitlab.kitware.com:samuelli/vtk-m into wavelets 2016-07-17 15:03:44 -06:00
Samuel Li
7fab26f87b working on dwt 2016-07-17 15:03:41 -06:00
Samuel Li
5a712427f0 Merge branch 'wavelets' of gitlab.kitware.com:samuelli/vtk-m into wavelets 2016-07-17 13:29:29 -07:00
Samuel Li
1f2bb02f77 add comment line 2016-07-17 14:07:31 -06:00
Samuel Li
75f2dea59b Add SYMH handling of boundary 2016-07-17 13:27:18 -06:00
Samuel Li
bf0fd05b2a removed an abuse of templates 2016-07-15 21:06:03 -07:00
Samuel Li
1d4070c3ad Extend1D test succeed 2016-07-15 20:33:50 -06:00
Samuel Li
9ef986da83 add make handle function to ArrayHandleConcatenate 2016-07-15 18:10:20 -06:00
Samuel Li
06ee72cc9a Update the unit test for ArrayHandleConcatenate 2016-07-15 13:54:32 -06:00
Samuel Li
e2e8133f41 add an array handle: ArrayHandleConcatenate 2016-07-14 18:16:57 -06:00
Samuel Li
02a4610444 unit test module is capatable of taking in user input as problem size, as well as including data transfer into the timing. 2016-07-12 11:41:47 -07:00
Samuel Li
f1111c6333 Merge branch 'wavelets' of gitlab.kitware.com:samuelli/vtk-m into wavelets 2016-07-12 10:35:43 -06:00
Samuel Li
f8371d0754 add timer 2016-07-12 10:35:35 -06:00
Samuel Li
4cb21ee809 eliminate a warning 2016-07-12 09:51:05 -06:00
Samuel Li
8fb53f4b72 WaveletBase class finished. Now to add timing 2016-07-11 18:22:12 -06:00
Samuel Li
53ab1eb8c4 create a folder for wavelets 2016-07-11 17:54:41 -06:00
Samuel Li
8b20f8b8dc change tabs to spaces 2016-07-11 17:21:38 -06:00
Samuel Li
b16c766192 need to test GetDetailLength, GetApproxLength, WaveLengthValidate 2016-07-11 15:28:51 -06:00
Samuel Li
c510f5762a bug fixes; ForwardTransform agrees with its counterpart in vapor now. 2016-07-10 16:32:39 -06:00
Samuel Li
a26fa39c40 Filter is moved out of Wavelets 2016-07-10 14:08:39 -06:00
Samuel Li
c15633d66e Filter class finished 2016-07-10 13:46:40 -06:00
Samuel Li
b7402f9af4 working on the wavelet Filter class 2016-07-08 13:15:03 -06:00
Samuel Li
72eb2fff70 put wavelet filter banks into a separate file 2016-07-08 11:18:00 -06:00
Samuel Li
632a5946e1 add test files that uses vapor functions 2016-07-07 18:46:00 -06:00
Samuel Li
a94ff7fbe4 trying to work out boundary situations 2016-07-07 18:44:38 -06:00
Samuel Li
7e9de6706a finish coding ForwardTransform, need to test now 2016-07-07 16:14:43 -06:00
Samuel Li
68bd1d023b ForwardTransform interface works. Maybe to give filters a class? 2016-07-06 21:39:29 -06:00
Samuel Li
765192e4e0 doesn't compile, try on Alaska 2016-07-06 21:15:39 -06:00
Samuel Li
f785fcb18f work in progress for filter tables 2016-07-06 18:37:11 -06:00
Samuel Li
9c1e9574fa ForwardTransform worklet now have the correct interface 2016-07-06 15:21:12 -06:00
Samuel Li
1f4e847c56 wavelets worklet works as a doulber 2016-07-05 17:38:24 -06:00
Samuel Li
7879f32806 add files for testing Wavelets 2016-07-05 10:24:29 -06:00
Samuel Li
5e0d0c2d5a create wavelet worklet (a copy of PointElevation) 2016-07-05 10:19:54 -06:00
Robert Maynard
76cd2ac4da More corrections needed to suppress false positive host / device warnings. 2016-06-30 16:04:37 -04:00
Kenneth Moreland
6dbff1b778 Fix template issue with IteratorFromArrayPortal
I don't know why, but under some circumstances when compiling with CUDA
and Visual Studio, the compiler was giving syntax errors when the
IteratorFromArrayPortal was using the typename keyword to reference a
type in its superclass. Get around the problem by looking directly in
the superclass.
2016-06-27 14:30:02 -06:00
Kenneth Moreland
d7ed37cd1e Fix incorrect export macro in FieldStatistics worklet 2016-06-27 13:39:03 -06:00
Kenneth Moreland
acf28962d6 Make sure Configure.h included with Assume.h
The VTKM_ASSUME macro uses some of the definitions defined in
Configure.h, but it never included that file. So unless that file
happened to be included before Assume.h, VTKM_ASSUME could be declared
incorrectly.

Actually added the include to Assert.h, which Assume.h includes.
2016-06-27 13:26:39 -06:00
Kenneth Moreland
eb8ca27932 VTKM_SUPPRESS_EXEC_WARNINGS was in the wrong place
The VTKM_SUPPRESS_EXEC_WARNINGS should go before the template keyword,
but on a couple of methods in FunctionInterfaceDetailPre.h.in it was
after the template keyword.
2016-06-27 13:08:35 -06:00
Kenneth Moreland
4c272b5b43 Remove thrust warnings about type conversion
Add pragmas to disable warnings 4244 and 4800 on Visual Studio when
compiling third party libraries. This gets around some warnings inside
the thrust library.
2016-06-27 07:50:17 -06:00
Kenneth Moreland
51a35cb4fe Fix warnings about type conversions 2016-06-27 07:50:15 -06:00
Kenneth Moreland
fd29c81bde Fix warnings about redefined macros
The build automatically sets some macros when building CUDA files. Some
of the CUDA sources were setting the same macros, which was causing
warnings. Change the code to be more careful about setting preprocessor
macros.
2016-06-27 07:50:13 -06:00
Kenneth Moreland
968e1b6008 Make sure tests for many devices are using requested devices
There are several tests in the cont directory that are in header files so
that they can be recompiled for different devices. Make sure that the
tests are exclusively using the device being tested by making the error
device adapter the default.

If any part of the test tries to use the default device (which could be
different than the one being tested), a compile error will occur. Several
of these compile errors are fixed in this commit.
2016-06-23 17:34:01 -06:00
Robert Maynard
a23a9397bb MarchingCubes now works on structured and unstructured cellsets.
Previously it was only working on structured cellsets.
2016-06-23 10:05:07 -04:00
Kenneth Moreland
1f5a74fb30 Merge branch 'cmake-package-update' into 'master'
Update the CMake package

These commits update how the CMake configuration sets up the
find_package information (accessed in VTKmConfig.cmake). It 
establishes a bunch of components that can be used in the
find_package command to load various aspects like CUDA and
TBB.

See merge request !460
2016-06-22 17:04:49 -04:00
Kenneth Moreland
9b82518836 Fix warning about using wrong type in pointer addition
Just use the ArrayPortalToIterator functions. That's what they are there
for.
2016-06-22 13:47:59 -06:00
Kenneth Moreland
7ff20c9230 Fix includes for CUDA builds
The CMake CUDA build targets do not respect the
target_include_directories (yet?). Instead, add the necessary includes
to cuda_include_directories().
2016-06-22 12:53:23 -06:00
Robert Maynard
5f16d4920d Merge topic 'reduce_filter_marching_cubes_size'
65a3de9d Only generate code paths for Hexahedron input cells.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !447
2016-06-22 13:36:15 -04:00
Kenneth Moreland
53da35ecc2 Fix some warnings on Visual Studio 2016-06-21 18:03:33 -06:00
Kenneth Moreland
13ee8bc190 Fix several issues with making sure all includes are set
Make everything consistent with new builds.
2016-06-21 18:03:29 -06:00
Kenneth Moreland
1d0eac6301 Update some configuration to new components 2016-06-21 18:03:25 -06:00
Kenneth Moreland
a8384d6b7a Unify configuration for VTK-m build and packages
Have VTK-m eat its own dog food when it comes to its configuration. Load
the same configuration for building VTK-m as would be loaded (more or
less) when using find_package(VTKm) in an external project.

This includes adding lots more components to the packages so that all the
setup (e.g. OpenGL, TBB, etc.) can be set up correctly. It is also a
significant change to how these components are declared. The component
configuration is simplified a bit and unified in a single file.
2016-06-21 18:03:23 -06:00
Kenneth Moreland
5d67b918dc Use CMakePackageConfigHelpers to make config files
This is a little tricky since they don't seem to have considered that
you will have files in both the source and build directory or that the
file locations will not match exactly with the install locations.
2016-06-21 18:03:21 -06:00
Kenneth Moreland
952929a7d0 Merge branch 'msvc-rendering' into 'master'
Fix several issues concerning using rendering library with Visual Studio

Write a comment or drag your files here...

See merge request !457
2016-06-16 19:40:50 -04:00
Dave Pugmire
f427011002 Merge branch 'EGL2' into 'master'
Add support for offscreen rendering with EGL. Added new class CanvasEGL, and a test.



See merge request !455
2016-06-16 14:48:00 -04:00
Robert Maynard
8f2ec46d9c Merge topic 'DeviceAdapterCopyCheck'
bafee5dd Add a Copy benchmark
208b1ddd Add a DeviceAdapter Copy test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !456
2016-06-16 14:29:31 -04:00
Kenneth Moreland
7751e2eeb8 Merge branch 'camera-corrections' into 'master'
Camera corrections



See merge request !454
2016-06-16 12:37:39 -04:00
John Biddiscombe
bafee5dd71 Add a Copy benchmark 2016-06-16 09:18:26 -04:00
Kenneth Moreland
42cc4a0c10 Remove warning about loss of precision
Remove the ever fun loss of precision warning.
2016-06-15 18:03:20 -06:00
Kenneth Moreland
1d158346db Get raw pointer from checked iterators
In some cases on windows pointers used as iterators are wrapped in
checked iterators. This is fine for most uses, but you cannot pass them
to a C function as a pointer (as we were doing for OpenGL). This change
converts the checked iterator back to a raw pointer in this case.
2016-06-15 18:02:52 -06:00
Kenneth Moreland
dc15a6bedb Get around issue with min/max macros defined
There were a few places in the source code where
std::numeric_limits::min and max were used. There is an issue with these
methods on windows because the standard libraries there define macros
with the same name. Get around this problem by either places parentheses
so that they do not look like macros or use the vtkm::Infinity methods
instead.
2016-06-15 17:44:45 -06:00
Kenneth Moreland
a4d3dfe4a1 Include windows.h before gl.h
This is a requirement when compiling for windows.
2016-06-15 16:11:41 -06:00
Kenneth Moreland
05388ebfdf Do not use snprintf
This function is not portable to all MSVC compilers. Instead, use the
standard C++ stringstream that should be in every C++ compiler.
2016-06-15 16:06:50 -06:00
Kenneth Moreland
15d7132a2f Do not use "near" and "far" as variable names
Microsoft visual studio treats these as keywords. These keywords were
used for pointers on 16-bit architectures. That makes them pretty much
obsolete for any software written in the last 20 years, but happily they
stick around to give us confusing compile errors.
2016-06-15 14:37:18 -06:00
John Biddiscombe
208b1ddda3 Add a DeviceAdapter Copy test 2016-06-15 16:27:06 -04:00
Robert Maynard
1e19101eee Obey VisualStudio checked iterator levels, and NULL checked iterators
When compiling under VisualStudio we need to first determine if checked
iterators are enabled ( _ITERATOR_DEBUG_LEVEL ). We don't want to use the
NDEBUG key, as we could be inside a project that is in Debug mode with
disabled checked iterators.

Secondly if they are enabled we need to handle the use case of NULL iterators
that get advanced by length zero. This last case is valid, but isn't supported
by the checked iterators so we need to work around it
2016-06-15 13:13:02 -04:00
Dave Pugmire
af1daf2f66 Add support for offscreen rendering with EGL. Added new class CanvasEGL, and a test. 2016-06-15 09:48:45 -04:00
Kenneth Moreland
d861c1ec60 Reset Camera pan and zoom when setting range
It is odd to set the Camera range based on bounds and still have pan and
zoom activitated. This change resets the pan and zoom in these cases.
2016-06-14 17:44:16 -06:00
Kenneth Moreland
303b4da4c8 Remove BackgroundColor from Mapper
This was supposed to be removed in an earlier commit where the
background color was consolidated to Canvas, but I missed this one.
2016-06-14 14:18:21 -06:00
Kenneth Moreland
45a73baab1 Use degrees instead of radians for rotation transforms
It is more common to use degrees when specifying a transform (thanks to
the classic OpenGL interface). Also, camera specifies the field of view in
degrees, which made rotations inconsistent. This change unifies all that.
2016-06-14 13:52:55 -06:00
Kenneth Moreland
a2fee371b3 Add vtkm::Float64 versions of Camera methods
All of the Camera math (currently) uses 32-bit floats. However, to make
it easier to use the Camera class, I've duplicated the accessor methods
to also accept 64-bit floats.
2016-06-14 13:08:10 -06:00
Kenneth Moreland
123a3da8e6 Correct near clipping plane in ResetToBounds
Make it proportional to the size of the geometry.
2016-06-14 12:50:17 -06:00
Kenneth Moreland
dfc160a155 Merge branch 'resolve-conflicting-merges' into 'master'
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.

See merge request !451
2016-06-13 13:03:03 -04:00
Kenneth Moreland
fb68755924 Merge branch 'type-conversion' into 'master'
Fix warning about type conversion

C has a feature where if you perform arithmetic on small integers (like
char and short), it will automatically promote the result to a 32 bit
integer. If you then store that back in the same type you started with
GCC will warn you that you are loosing the precision (that you didn't ask
for in the first place). This is particularly annoying in templated
code.

Anyway, fixed yet another instance of that happening.

See merge request !450
2016-06-13 12:38:46 -04: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
b656baeeb6 Merge branch 'parameteric-coord-precision' into 'master'
Loosen threshold on test of parametric coordinates

The UnitTestParametricCoordinates test uses a pseudorandom number
generator to create some random set of parametric coordinates, convert
to world coordinates, and then back to parametric coordinates.

This has been working fine except that the world coordinate to parametric
coordinate conversion is not extremely precise for some cell shapes. (It
would not be cost effective to make it more precise.) Because of this,
the test_equal for this comparison has a pretty high threshold.

While looking at a dashboard I happened across a failure for this test.
It turns out that one of the parametric coordinates created for the
pyramid test for seed 1465529014 was just outside of this threshold, but
otherwise correct. I raised the threshold a little to try to prevent
this error.

See merge request !449
2016-06-13 11:36:04 -04:00
Kenneth Moreland
5a473b0012 Fix warning about type conversion
C has a feature where if you perform arithmetic on small integers (like
char and short), it will automatically promote the result to a 32 bit
integer. If you then store that back in the same type you started with
GCC will warn you that you are loosing the precision (that you didn't ask
for in the first place). This is particularly annoying in templated
code.

Anyway, fixed yet another instance of that happening.
2016-06-13 09:31:48 -06:00
Kenneth Moreland
9110214e7c Update OSMesa test
In the previous commit, I removed the background color arguments from
all the constructors from the Canvas class. I had missed the fact that
this was used in UnitTestMapperOSMesa.
2016-06-13 09:23:49 -06:00
Kenneth Moreland
f1e54ab568 Merge branch 'camera-enhancements' into 'master'
Camera enhancements



See merge request !445
2016-06-13 11:02:36 -04:00
Kenneth Moreland
a778d373f1 Loosen threshold on test of parametric coordinates
The UnitTestParametricCoordinates test uses a pseudorandom number
generator to create some random set of parametric coordinates, convert
to world coordinates, and then back to parametric coordinates.

This has been working fine except that the world coordinate to parametric
coordinate conversion is not extremely precise for some cell shapes. (It
would not be cost effective to make it more precise.) Because of this,
the test_equal for this comparison has a pretty high threshold.

While looking at a dashboard I happened across a failure for this test.
It turns out that one of the parametric coordinates created for the
pyramid test for seed 1465529014 was just outside of this threshold, but
otherwise correct. I raised the threshold a little to try to prevent
this error.
2016-06-13 08:56:40 -06:00
Kenneth Moreland
5dbcb33259 Modify implementation of Transform3DPoint
The new implementation assumes that the fourth component of the
homogeneous coordinate is not changed, which is true for all common
transforms except perspective projections. This should save several math
instructions to compute the fourth component and then divide the others
by it. If needed we can make a second method that does the complete
transform.

I am hoping that this will also solve what appears to be an optimization
bug on one of the dashboards.
2016-06-11 12:27:35 -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
Robert Maynard
65a3de9df8 Only generate code paths for Hexahedron input cells.
We currently only support Hex cells as our input cell type, so no reason
to compile in other cell type support currently.
2016-06-10 17:06:39 -04:00
Robert Maynard
6a395f06a4 Merge topic 'disable_vtkmAssume_windows_nvcc'
a2f5278f Disable VTKM_ASSUME when inside CUDA code compiled with VisualStudio.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !444
2016-06-09 15:43:31 -04:00
Kenneth Moreland
e47db6f610 Add dolly for 3D cameras
I forgot this one when adding roll, elevation, and azimuth.
2016-06-09 13:34:29 -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
9f3e0e5952 Implement roll, elevation, and azimuth for 3D cameras
Also implement pan and zoom for 2D cameras.

Update the rendering tests to do these camera rotations. This matches
better the viewpoint used before the previous camera changes.
2016-06-09 13:34:29 -06:00
Kenneth Moreland
cdeeda67bb Make a shared header of 3D transformations
Affine transformations of homogeneous coordinates using 4x4 matrices are
quite common in visualization. Create a new math header file in the base
vtkm namespace that has common functions for such coordinates.

Much of this implementation was taken from the rendering matrix helpers.
2016-06-09 13:34:29 -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
6e6177e2a8 Restore camera view diagnostics 2016-06-09 12:08:02 -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
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
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
c613145706 Add cool2warm color map as default
Make default color map automatic when creating a Plot.
2016-06-09 12:07:54 -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
Robert Maynard
a2f5278f12 Disable VTKM_ASSUME when inside CUDA code compiled with VisualStudio.
We have found a bug inside NVCC/VS where it will generate bad PTX code when
it encounters __assume.
2016-06-09 13:29:14 -04:00
Kenneth Moreland
eaa5747527 Fix conversion warning
This warning happened on GCC 4.8.0.
2016-06-09 11:00:06 -06:00
Kenneth Moreland
8834458238 Fix use of uninitialized invSpacing value
The SamplerRect worklet had an error where it was possible that the
invSpacing stack-local values could be used uninitialized. On the first
iteration of the loop in the SamplerRect operation, it calls LocateCell,
which is supposed to set invSpacing. Under most conditions it does, but
if one of the ray directions is 0 (which can happen with axis-aligned
views), one of the invSpacing dimensions was skipped, leaving the value
to whatever garbage happened to be on the stack. Later, the invSpacing
value was used to interpolate a scalar, which under some circumstances
could cause an array index error when looking up a color in the color
map.

This fix changes the condition for when the ray direction is 0 to still
initialize invSpacing.
2016-06-07 09:36:56 -06:00
Kenneth Moreland
74f93807d9 Add OpenGL library to renering tests when applicable
It is necessary for the OSMesa test, and will probably be needed for
tests in the future.
2016-06-06 09:55:38 -06:00
Kenneth Moreland
7673c739d1 Link rendering tests to OSMesa library, not include dir
There was an error in the CMakeLists.txt in the rendering tests where
the include directory was linked in instead of the OSMesa library.
It was a simple mistake of typing the wrong CMake variable.
2016-06-06 09:48:37 -06:00
Robert Maynard
c792dd505c Merge topic 'build_rendering_without_mesa'
1d379db4 Allow people to build rendering without mesa.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !438
2016-06-03 14:19:11 -04:00
Kenneth Moreland
bbb42a014c Merge branch 'rename-rendering-classes' into 'master'
Rename rendering classes

Per our discussion in our last technical meeting, we are renaming several
of the rendering classes to be more clear and consistent with other
software products.

See merge request !437
2016-06-03 14:15:26 -04:00
Robert Maynard
1d379db417 Allow people to build rendering without mesa. 2016-06-03 10:20:25 -04: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
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
f4bf723cdf Change vtkm::rendering::Plot to Actor
This name was chosen to reflect the analogous name in VTK.
2016-06-02 13:49:49 -06:00
Kenneth Moreland
9fc86890eb Change vtkm::rendering::SceneRenderer* to Mapper*
This name was chosen to reflect the analogous name in VTK.
2016-06-02 13:41:14 -06:00
Kenneth Moreland
1934049df9 Change vtkm::rendering::View to Camera 2016-06-02 13:04:01 -06:00
Kenneth Moreland
fe8654d7eb Add export macros to splat kernel methods
Not having them could cause compiler issues.
2016-06-02 12:30:37 -06:00
Kenneth Moreland
caef882e9d List splatter worklet header files in build files 2016-06-02 10:24:21 -06:00
Kenneth Moreland
7f005562ac Make all benchmarking sources listed in build
The benchmarking header files were not listed. Not a huge deal since
these files do not need to be installed, but they should be listed
anyway. Changed the vtkm_save_benchmarks CMake macro to be able to list
headers.

Also moved everything from BenchmarkDeviceAdapter.h to
BenchmarkDeviceAdapter.cxx. Since this code shouldn't need to be
included by anything except this benchmark, there is no need to have it
in a header file. Plus, the build changes would mean that any change in
the header (where most of the source was) could cause all code in this
directory to recompile. I do not want to set that precedent.
2016-06-02 10:24:21 -06:00
Kenneth Moreland
4ae3a20dfc Add test to check that all source files are part of the build system
The test is a simple CMake script that finds all files in the build
directory with certain extensions (.h, .cxx, etc.) and makes sure that
the filename is listed somewhere in the CMakeLists.txt file of the same
directory. If the filename is listed in the CMakeLists.txt file, then
there is a good chance it is being addressed by the build.

This should help catch when header files are not being installed. It also
should help verify that test builds are being done on all files. It will
also highlight dead source files.
2016-06-02 10:23:37 -06:00
Kenneth Moreland
985cb971ea Merge branch 'install_missing_vtkm_filter_header' into 'master'
delete the vtkm::filter::FieldTypes header.



See merge request !434
2016-06-02 11:29:28 -04:00
Kenneth Moreland
a28432d737 Fix some compile warnings
These compile warnings include implicit conversion from signed to
unsigned, a shadowed variable, and an unused static function.
2016-06-01 15:16:13 -06:00
Kenneth Moreland
bc979013e0 Use VTK-m's OpenGLHeaders.h instead of GL/gl.h
Not all systems put their OpenGL headers in a directory named GL. (In
particular, OSX decides to be different.) The vtkm/rendering/internal/
OpenGLHeaders.h header takes care of including the OpenGL header on all
platforms.
2016-06-01 15:16:13 -06:00
Kenneth Moreland
7154ba2968 Add new rendering files to CMakeLists.txt
This is required for installing the files. It is also useful for
developers because it adds the files to IDEs and creates test builds for
the header files. Those test builds highlighted some missing includes.
2016-06-01 15:15:18 -06:00
Robert Maynard
e3e94d102e delete the vtkm::filter::FieldTypes header.
The header is used by nothing, and contains an old version of
the FieldMetadata class.
2016-06-01 16:45:09 -04:00
Jeremy Meredith
298b9d2e6c Merge branch 'annot6' into 'master'
Adding text annotations to rendering

This adds bitmap font support and two types of text annotations - screen space text and world-space billboard text - as well as enables the labels in the axes.

See merge request !423
2016-06-01 14:35:06 -04:00
Jeremy Meredith
6c8045bdc3 unifying 2d and 3d scenes 2016-06-01 13:51:37 -04:00
Jeremy Meredith
501f34c27a cleanup and style 2016-06-01 13:37:03 -04:00