Commit Graph

790 Commits

Author SHA1 Message Date
Matthew Letter
6b9cb536a8 added new lines at the end of bot recommended files 2018-07-02 16:21:00 -06:00
Matthew Letter
3c9e7f049f updated Atomic array to use new excution object paradigm 2018-07-02 16:21:00 -06:00
luz.paz
940c891886 Misc. typos
Found via `codespell` and `grep`
more typos

includes source typo change and a typo that needs further review
follow-up typos


Follow-up typos


Revert a commit
2018-06-14 16:49:11 -04:00
mclarsen
2780bf4d37 removing extra ; 2018-06-06 15:17:25 -07:00
mclarsen
75f911cf77 Fixing default sample distance 2018-06-06 15:08:11 -07:00
Allison Vacanti
ec0791e941 Add a swap implementation that works on all backend.
Calling std::swap isn't legal from CUDA code, but the new vtkm::Swap
method is safe. It currently does a naive swap when compiling CUDA
code, and falls back to an ADL swap
2018-06-01 14:13:46 -04:00
Allison Vacanti
d833d9285f Merge topic 'openmp'
183bcf109 Add initial version of an OpenMP backend.
7b5ad3e80 Expand device scheduler test to check for overlap.
e621b6ba3 Generalize the TBB radix sort implementation.
d60278434 Specialize swap for ArrayPortalValueReference types.
761f8986f Cache inputs to SSI::Unique benchmark.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1099
2018-05-31 16:49:15 -04:00
Allison Vacanti
183bcf109a Add initial version of an OpenMP backend. 2018-05-31 16:47:48 -04:00
Haocheng LIU
3700897af6 Supress declaration warning in VolumeRendererStructured 2018-05-31 09:27:49 -04:00
Allison Vacanti
93506d25e2 Change function signatures to use 'using' aliases.
Also cleaned up some lingering type typedefs.
2018-05-25 17:18:41 -04:00
Allison Vacanti
cf358bdc84 Ensure that LinearBVH template codes are exported on all compilers. 2018-05-24 15:48:09 -04:00
Haocheng LIU
5c797169ec Use the strong typed enums for vtkm::cont::Field
Since Field association is used either when creating or working
with 'vtkm::cont::Field', it's put in the class itself.
2018-05-22 11:44:51 -04:00
Haocheng LIU
fae8409c9c Add float version operations for vtkm::Math Pi()
This commit also removes the old static_cast<vtkm::float32>vtkm::Pi() usages and
fix serveral conversion warnings.
2018-05-21 10:58:15 -04:00
David Thompson
1cf1ca7141 Merge topic 'cell-measure'
00c7905a Rename `vtkm::dot()` to `vtkm::Dot()`.
dd7c17f7 Compute cell measures (arc length, area, volume).

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1203
2018-05-17 11:02:34 -04:00
David Thompson
00c7905afb Rename vtkm::dot() to vtkm::Dot().
This keeps the old name around but prepares it for removal
in the next release.
2018-05-17 08:51:01 -04:00
Allison Vacanti
c3c8d0fd70 Refactor ArrayHandleCompositeVector to simplify usage and impl.
- Use tao::tuple instead of FunctionInterface to hold array/portal
  collections.
- Type signatures are simplified. Now just use:
  - ArrayHandleCompositeVector<ArrayT1, ArrayT2, ...>
  - make_ArrayHandleCompositeVector(array1, array2, ...)
  instead of relying on helper structs to determine types.
- No longer support component selection from an input array. All
  input arrays must have the same ValueType (See ArrayHandleSwizzle
  and ArrayHandleExtractComponent as the replacements for these
  usecases.
2018-05-16 11:45:12 -04:00
Kenneth Moreland
0753131a04 Replace ExecutionObjectFactoryBase with ExecutionObjectBase
While making changes to how execution objects work, we had agreed to
name the base object ExecutionObjectBase instead of its original name of
ExecutionObjectFactoryBase. Somehow that change did not make it through.
2018-05-10 17:53:39 -06:00
Kenneth Moreland
b71416606b Merge topic 'fix-aspect-projections'
0da55730 Fix scaling of x/y field of views
39b347db Fix raytrace using wrong fov with standard camera

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1185
2018-05-09 16:02:40 -04:00
Robert Maynard
62c7b745df VTK-m MortonCodes on GCC 7 was generating maybe-uninitialized warnings.
The id4 while always valid is constructed using a lookup table and the
compiler can't see if that will always be a valid vec 4.
2018-05-08 15:45:38 -04:00
Kenneth Moreland
0da5573085 Fix scaling of x/y field of views
Prevously, the x field of view was computed by scaling the y field of
view by the aspect ratio of the canvas. However, this is wrong because
the field of view angles do not scale linearly with the aspect ratio.
Fix this issue by using trig functions to convert the angle to distance,
scale the distance, and then convert back to angle.
2018-05-07 18:40:45 -06:00
Kenneth Moreland
39b347dbd0 Fix raytrace using wrong fov with standard camera
The raytracing code has its own version of camera that maintains two
field of view (fov) parameters: one for the x direction and one for the
y. The standard vtkm::rendering::Camera contains only one fov. As is
consistent with OpenGL's gluPerspective and VTK's camera, the fov is
specified in the y direction. However, the raytracing code was
incorrectly using it in the x direction. That caused it to do a weird
rescaling when the aspect ratio was not 1.
2018-05-07 18:03:03 -06:00
Robert Maynard
fb0da7f2de Allow vtkm_find_gl CMake function to be used no matter vtk-m settings
Previously vtkm_find_gl was only usable when rendering was enabled.
This is problematic as examples would use vtkm_find_gl even if
they didn't use vtkm rendering library.
2018-05-04 15:01:06 -04:00
Matthew Letter
5d1e8cccb4 corrected logical error in texture2d and cleaned up particles.h
cleaned up a logic error texture2d and cleaned how the constructor for execution object was being called. Also, went and cleaned up how the execution object was being created for particle to align it with the same method for creating the execution object.
2018-05-03 14:45:22 -06:00
Matthew Letter
7eb3556491 Created an execution object for Texture2D
abstracted out the execution object from the execution object factory and removed the device template from the factory.
2018-05-03 14:45:22 -06:00
Matthew Letter
af250acbfc added PrepareForExecution to compile code base
added prepare for execution function to all the execution object factories that did not have it implemented to compile the code base
2018-05-03 14:45:22 -06:00
Matthew Letter
7e5a55881b changes typechecks for execution objects
In order to make the change from the current way execution obejcts are utilized to the new proposed executionObjectFactory process type checks now has to look for the new execution object factory class to check against.
2018-05-03 14:45:21 -06:00
Kenneth Moreland
edc4c85fd9 Move Scatter from Worklet to Dispatcher
Previously, when a Worklet needed a scatter, the scatter object was
stored in the Worklet object. That was problematic because that means
the Scatter, which is a control object, was shoved into the execution
environment.

To prevent that, move the Scatter into the Dispatcher object. The
worklet still declares a ScatterType alias, but no longer has a
GetScatter method. Instead, the Dispatcher now takes a Scatter object in
its constructor. If using the default scatter (ScatterIdentity), the
default constructor is used. If using another type of Scatter that
requires data to set up its state, then the caller of the worklet needs
to provide that to the dispatcher. For convenience, worklets are
encouraged to have a MakeScatter method to help construct a proper
scatter object.
2018-04-27 00:43:51 -04:00
Robert Maynard
4b9a8143c8 Correct 'may be used uninitialized in this function' warnings in wavelets 2018-04-24 13:27:51 -04:00
Robert Maynard
ebf96077fd Correct casting warnings found inside vtkm_rendering 2018-04-24 13:00:33 -04:00
James
a79b4c2ff2 Removing move command to remove warnings. 2018-04-10 10:27:12 -04:00
James
02a67d64bf Merge remote-tracking branch 'upstream/master' into rendering-label-leak 2018-04-09 14:11:43 -04:00
James
3bab4087dc Adding delete and assignment oeprators to annotations. 2018-04-09 14:09:52 -04:00
James
e3ccd7f86c Adding previous cmake fix. 2018-04-09 14:04:52 -04:00
Robert Maynard
84311a2453 Merge branch 'master' into cmake_refactor 2018-04-05 10:18:36 -04:00
James
9f32bbe0a7 Merge branch 'rendering-label-leak' of https://gitlab.kitware.com/jameskress/vtk-m into rendering-label-leak 2018-04-03 09:26:53 -04:00
James
7906e89ed4 Updating leak fix to use uniq_ptr. 2018-04-03 09:26:00 -04:00
Kenneth Moreland
a3b2c3931d Remove default constructor for ColorTable
The problem is that there is no good "default" constructor for
ColorTable. The previous default constructor created an empty color
table, but that would be confusing if someone actually tried to use it.
We could set ot to the default preset, but the default preset uses the
diverging color map, which could foul people up if they actually want to
edit or create their own color map. Instead, force the declaration of
ColorTable to indicate what you plan to do with it.
2018-04-02 11:44:17 -06:00
James Kress
b92c4801c8 Update CMakeLists.txt 2018-04-02 09:43:39 -04:00
James
70c50f72e5 Fixing mem leak with rendering annotations. 2018-04-02 09:38:22 -04:00
James
12dd2be12b Updating to master 2018-04-02 09:24:50 -04:00
Robert Maynard
8808b41fbd Merge branch 'master' into vtk-m-cmake_refactor 2018-03-29 22:51:26 -04:00
Kenneth Moreland
90b925ba6d Fix off-by-one-overrun of color table map array
The display of a color bar in an OpenGL canvas had an array overrun.
This method first used ColorTable to create an array of colors. It then
used the array to look up values for polygons that make up the color
bar. However, each polygon used indices i and i+1, and on the last value
the i+1 looked pass the end of the array. This fixes the problem by
adding one more value to the color array generated.
2018-03-29 14:19:22 -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
Kenneth Moreland
1fe7869211 Resurrect function to get face indices
Due to recent changes to remove static arrays that are not supported on
some devices, the function to return all the local point indices on a
face was removed. That left no way to get the structure of cell faces
short of pulling an internal data structure.

This change resurrects a function to get point indices for a face. The
interface for this method has necessarily changed, so I also changed the
corresponding function for getting edge indices.
2018-03-22 22:37:33 -06:00
Kenneth Moreland
6a6ac7cd82 Change filter to pass all fields by default
You can still select independent fields with a FieldSelection object if
desired.
2018-03-21 12:43:11 -06:00
Utkarsh Ayachit
9cf5be2f8e Make Result constructor as explicit.
This avoid accidental conversions from DataSet to Result in return
values. This exposed several issues with filters and their tests. Fixed
those as well.
2018-03-13 13:54:21 -04:00
Robert Maynard
e35eec4a92 Merge topic 'virtual_coordinate_system_workarounds'
cbadd3e6 Make CoordinateSystem not fail on CUDA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1108
2018-03-13 08:31:53 -04:00
Robert Maynard
cbadd3e67e Make CoordinateSystem not fail on CUDA 2018-03-10 16:38:41 -05:00
Robert Maynard
7c54125b66 Switch over from static const to static constexpr where possible. 2018-03-10 11:39:58 -05:00
Robert Maynard
601a839d5d VTK-m uses static const/constexpr when supported ( so not on cuda 7.5 )
These changes now allow VTK-m to compile on CUDA 7.5 by using const arrays,
when compiling with CUDA 8+ support we upgrade to static const arrays, and
lastly when CUDA is disabled we fully elevate to static constexpr.
2018-02-26 16:41:29 -05:00
Robert Maynard
ee69c7a4b7 Remove VS2013 workarounds from VTK-m. 2018-02-23 15:39:39 -05:00
Robert Maynard
e630ac5aa4 Merge branch 'master' into vtk-m-cmake_refactor 2018-02-23 14:52:00 -05:00
luz.paz
9b4306187c Follow-up typo 2018-02-12 20:48:57 -05:00
luz.paz
366377ad64 fixed revision 2018-02-09 15:00:44 -05:00
luz.paz
1e69b1a053 Follow-up misc. typos
Found via `codespell -q 3`
2018-02-09 15:00:44 -05:00
Robert Maynard
022c987182 Correct warnings and errors found with MSVC2017+CUDA9 2018-01-31 15:58:45 -05:00
Matt Larsen
d476adf1f6 fixing issue with volume renderer where initial samples were outside the cell set 2018-01-30 14:46:34 -08:00
Robert Maynard
82dfc0e690 correct shadow warning in ConnectivityTracer 2018-01-30 08:49:49 -05:00
luz.paz
45239449a6 More typos
these need a little  more review.
2018-01-30 06:51:47 -05:00
luz.paz
80b11afa24 Misc. typos
Found via `codespell -q 3` via downstream VTK
2018-01-30 06:51:47 -05:00
Matt Larsen
cee6e243fb Merge topic 'annotations_enhancement'
c6565cde correcting compile error with CanvasGL
c57fad48 Depth no considered with annotations. Fix for volume renderer. Consistent color blending.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1068
2018-01-29 19:40:50 -05: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
Sujin Philip
b5f71644fe Add IsType to ArrayHandleVirtualCoordinates
Makes the interface compatible with DynamicArrayHandle.
2018-01-25 11:02:52 -05:00
Matt Larsen
dd3901094d Merge topic 'colorbar_enhancement'
b420a4b3 fixing typo
2bb64e65 fixing opacity for veritical bar
80081f2a adding finer grain control over color bar and scalar field label

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1063
2018-01-23 15:42:22 -05:00
Matt Larsen
b420a4b3d2 fixing typo 2018-01-18 15:01:15 -08:00
Matt Larsen
2bb64e6598 fixing opacity for veritical bar 2018-01-18 14:57:40 -08:00
Matt Larsen
80081f2a1b adding finer grain control over color bar and scalar field label 2018-01-18 13:21:39 -08:00
Ben Boeckel
9ce4bfe5af cmake: allow embedded vtk-m to not use cache variables
Projects might want to force these without giving users the indication
that their choices actually matter.
2018-01-17 10:23:15 -05:00
Robert Maynard
4f239ed3b9 Correct casting warnings found with new cmake code 2018-01-16 15:42:36 -05:00
Robert Maynard
0660c67fef Merge branch 'master' into vtk-m-cmake_refactor 2018-01-16 15:42:28 -05:00
Robert Maynard
5ecf2d1187 vtkm::rendering has more compilation units to help out 32bit compilers
Visual Studio default toolset uses 32bit executables for compiling which
means that if it uses more than 4GB of memory per instance it crashes.
By moving the ConnectivityTracer into a separate compilation unit we
can help out the compiler.

This also improved compilation times and library size:

Old:
build time (j8): 48.62 real
lib size: 6.2MB

New:
build time (j8): 41.31 real
lib size: 5.0MB
2018-01-16 10:20:15 -05:00
Sujin Philip
70fcd1d1cc Update CoordinateSystem to use the Virtual Array 2018-01-10 10:19:19 -05:00
Robert Maynard
5e1f7c60ad VTKm_INSTALL_ONLY_LIBRARIES allows installation of only vtk-m libs 2018-01-08 14:00:58 -05:00
Robert Maynard
37a2359c70 Refactor the rendering context flags to not be a combo box.
This way in the future it is easier to make currently mutually exclusive
compile options be all enabled at the same time.
2018-01-08 14:00:57 -05:00
Robert Maynard
a81919999a Merge topic 'vtkm_host_device_warnings'
93bc0198 Suppress false positive warnings about calling host device functions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1042
2018-01-02 14:10:54 -05:00
Robert Maynard
93bc0198fe Suppress false positive warnings about calling host device functions. 2018-01-02 10:40:49 -05:00
Sujin Philip
6b19031200 Cleanup includes of ExecutionWholeArray.h 2018-01-02 10:30:16 -05:00
Sujin Philip
3e10b504e6 Replace ExecutionWholeArray with WholeArray 2018-01-02 10:30:16 -05:00
Robert Maynard
24e57556e6 Merge branch 'master' into vtk-m-cmake_refactor
Includes updating to cleanup benchmark code and handle the new MPI option
2017-12-28 14:23:21 -05:00
Sujin Philip
96c22747d5 Merge topic 'fix-field-api'
334262db Fix Field constructors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1035
2017-12-21 14:51:52 -05:00
Sujin Philip
334262db16 Fix Field constructors
1. Add option to copy user supplied array in make_ArrayHandle.
2. Replace Field constructors that take user supplied arrays with make_Field.
3. Replace CoordinateSystem constructors that take user supplied arrays with
   make_CoordinateSystem.
2017-12-21 12:48:15 -05:00
Matt Larsen
83e51cf42e creating ray tracing benchmark 2017-12-20 14:22:52 -08:00
Matthew Letter
4b058229ce Merge branch 'master' into cmake_refactor 2017-12-08 09:51:48 -07:00
Sujin Philip
91f26844a6 Merge topic 'remove-VTKM_EXEC_CONSTANT'
e28309f0 Remove VTKM_EXEC_CONSTANT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1015
2017-12-06 11:50:55 -05:00
Matt Larsen
39abcb99c3 fixing compile errors 2017-12-05 13:26:45 -08:00
Sujin Philip
e28309f09b Remove VTKM_EXEC_CONSTANT
If a global static array is declared with VTKM_EXEC_CONSTANT and the code
is compiled by nvcc (for multibackend code) then the array is only accesible
on the GPU. If for some reason a worklet fails on the cuda backend and it is
re-executed on any of the CPU backends, it will continue to fail.

We couldn't find a simple way to declare the array once and have it available
on both CPU and GPU. The approach we are using here is to declare the arrays
as static inside some "Get" function which is marked as VTKM_EXEC_CONT.
2017-12-05 13:49:55 -05:00
Matt Larsen
655412fca3 adding support for log plots with the wireframer 2017-12-05 10:00:27 -08:00
Matt Larsen
1d58eeaa9e Merge topic 'annotation_color'
6d616309 let there be foreground color

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1013
2017-12-05 00:13:07 -05:00
Matt Larsen
6d61630928 let there be foreground color 2017-12-04 20:46:38 -08:00
Matt Larsen
17f4e1b51a avoiding zero directions 2017-12-03 09:38:53 -08:00
Matthew Letter
26b7951336 changing default beckend to None
this was discussed in our weekly meeting as the default backend
2017-11-29 16:04:43 -07:00
Matthew Letter
fac43bd812 Merge branch 'master' into cmake_refactor 2017-11-28 13:36:02 -07:00
Robert Maynard
2467411ecc Merge topic 'variadic_CastAndCall_and_TryExecute'
203205a1 TryExecute RuntimeDeviceTracker can't be a const ref anymore.
dfb9cc62 Allow users to pass multiple arguments to TryExecute
5384305d Update tests and a single worklet to verify new CastAndCall works
2ff14a81 Allow users to pass multiple arguments to CastAndCall

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1005
2017-11-13 17:56:20 -05:00
Matt Larsen
56f302d0a9 fixing axis ticks 2017-11-13 08:34:05 -08:00
Robert Maynard
203205a171 TryExecute RuntimeDeviceTracker can't be a const ref anymore.
Previously we allowed a const ref as we would make a copy, this only works
as it relies on  RuntimeDeviceTracker implementing state through a shared_ptr.
Instead if we require modifiable types only we can make TryExecute more
efficient and clearer on what it does.
2017-11-10 10:02:45 -05:00
Matt Larsen
a704e39989 Merge topic 'visit_changes'
f6ead29c Removing a debug variable that was causing cuda to crash
565e69c5 Merge branch 'master' into visit_changes
81afcb62 further removing debug statements
a3bf1b26 Merge branch 'master' of https://gitlab.kitware.com/mclarsen/vtk-m into visit_changes
fdd5d1c8 removing debug statements
e60e330c Merge branch 'connectivity_tracer_additions' into visit_changes
2cb26b2d something
0bea9ce9 tracking path lengths if present
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !992
2017-11-02 14:17:01 -04:00
mclarsen
f6ead29cea Removing a debug variable that was causing cuda to crash 2017-11-02 08:13:54 -07:00
Robert Maynard
e49f27a3ac Remove all uses of VTKM_OVERRIDE at instead just use override.
Since VTK-m now requires C++11 it is safe to remove our custom defines
and move to using the keyword directly.
2017-11-02 09:18:15 -04:00
Matt Larsen
565e69c578 Merge branch 'master' into visit_changes 2017-11-01 15:20:47 -07:00
Matt Larsen
81afcb62ba further removing debug statements 2017-11-01 14:41:51 -07:00
Matt Larsen
a3bf1b261e Merge branch 'master' of https://gitlab.kitware.com/mclarsen/vtk-m into visit_changes 2017-11-01 14:02:15 -07:00
Matt Larsen
fdd5d1c8e5 removing debug statements 2017-11-01 14:00:38 -07:00
Robert Maynard
ed8f4111ef Update all the code to work with CMake 3.3
Obviously this does mean that CUDA is not supported with 3.3.
2017-10-27 15:30:14 -04:00
Robert Maynard
3ded554831 Extend the CMake rewrite to include vtkm_rendering 2017-10-27 15:29:58 -04:00
mclarsen
f473974310 Fixing error with uninitialized variable 2017-10-26 14:17:49 -07:00
Matt Larsen
aeeb954fd0 correcting typo 2017-10-26 08:38:21 -07:00
Matt Larsen
46f58dffc6 fixing various warnings 2017-10-26 08:36:27 -07:00
Matt Larsen
14b7789fd6 fixing ambiguous min max call 2017-10-26 08:32:06 -07:00
Matt Larsen
450033110c Merge remote-tracking branch 'upstream/master' into support_2D_and_1D_plots 2017-10-26 08:10:50 -07:00
Matt Larsen
7325508093 removing debug statements 2017-10-26 08:01:00 -07:00
Matt Larsen
035814a4a7 adding 2d ortho support to ray tracing and updating WireFramer to support 2d lines and 1D line plots 2017-10-26 07:58:02 -07:00
Sujin Philip
d6ce8000f4 Workaround an Intel compiler bug
Fixes a linker error about not finding 'LinearBVH::ConstructOnDevice'
2017-10-16 12:17:04 -04:00
Sujin Philip
9e0650adf2 Update Newton's Method to return solution status 2017-10-10 14:01:41 -04:00
Matt Larsen
e60e330c57 Merge branch 'connectivity_tracer_additions' into visit_changes 2017-10-10 07:39:53 -07:00
mclarsen
2cb26b2de6 something 2017-10-10 07:32:32 -07:00
Matt Larsen
2326dca0a2 simplify triangulator 2017-10-06 16:08:29 -07:00
Kenneth Moreland
2625ae7866 Update VTK-m source to use new ArrayCopy functionality 2017-09-25 16:54:46 -06:00
Robert Maynard
fe8b75f7bf Consistenly use nullptr in vtk-m. 2017-09-25 09:57:23 -04:00
Matt Larsen
83165f0cde Merge topic 'concrete-canvas'
b5bfa1ed More copyright header fixes
e6c204ac Fix copyright header merge issues
495adacc Merge branch 'master' into concrete-canvas
dc0e3d51 Enhances colorbar with translucent indicator for alpha values
28c1bc65 Draws world annotations before scene render
53fb679e Adds explicit inline for `Texture2DSampler`
a32e46df Removes storage tag template parameter
30925774 Remove `typename` keyword from explicit specializations
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !934
2017-09-23 11:48:12 -04:00
Manish Mathai
b5bfa1edff More copyright header fixes 2017-09-22 16:10:33 -07:00
Manish Mathai
e6c204ac67 Fix copyright header merge issues 2017-09-22 15:31:27 -07:00
Robert Maynard
311618a15f Enable highest level of warnings(W4) under MSVC
This will make VTK-m warning level match the one used by VTK. This commit
also resolves the first round of warnings that W4 exposes.
2017-09-22 13:04:28 -04:00
Manish Mathai
495adacc38 Merge branch 'master' into concrete-canvas 2017-09-22 09:32:21 -07:00
Manish Mathai
dc0e3d51f6 Enhances colorbar with translucent indicator for alpha values 2017-09-21 16:20:54 -07:00
Manish Mathai
28c1bc65d7 Draws world annotations before scene render
This reordering of draw calls is to ensure that volume renderer does not
clobber the annotations.
2017-09-21 16:08:56 -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
53fb679e91 Adds explicit inline for Texture2DSampler 2017-09-20 13:55:18 -07:00
Manish Mathai
a32e46df7c Removes storage tag template parameter 2017-09-20 13:50:46 -07:00
Manish Mathai
3092577440 Remove typename keyword from explicit specializations 2017-09-19 14:31:35 -07:00
Manish Mathai
2f7988adc2 Merge branch 'master' into concrete-canvas 2017-09-19 10:01:38 -07:00
Manish Mathai
4058626e51 Fixes warnings 2017-09-18 15:18:33 -07: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
Matt Larsen
0bea9ce9d9 tracking path lengths if present 2017-09-08 13:22:54 -07:00
Matt Larsen
50956b8074 fixing triangulator and adding a fast path for 3D structured cell sets 2017-09-04 08:17:01 -07:00
Manish Mathai
e9c4e0056c Implements Canvas::AddColorBar 2017-08-31 15:12:08 -07:00
Manish Mathai
3440f74c45 Removes warnings about unsed parameters 2017-08-31 10:50:28 -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
Matt Larsen
107b2c487c Merge topic 'wireframe-fixes'
bbf84c11 Clear framebuffer to black instead of white.
3210e502 Adds an small Z offset to the wireframe edges to solve z-fights

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !907
2017-08-30 09:34:20 -04:00
Manish Mathai
bbf84c11d8 Clear framebuffer to black instead of white.
This change updates the framebuffer clear logic, relying on the canvas
to blend with the background instead of eagerly doing it at the start.
2017-08-29 15:03:00 -07:00
Manish Mathai
3210e50209 Adds an small Z offset to the wireframe edges to solve z-fights
This commit solved z-fighting issues with two changes:
- A small offset, proportional to distance between near and far planes, is
applied in camera space to the edges.
- The minimum screenspace offset is increased as well for the same reason.
A new test case is added for uniform grids.
Additionally, the line plotting algorithm is changed to round off the
edge endpoints to fill in empty pixels seen on uniform grids.
2017-08-29 14:55:24 -07:00
Matt Larsen
d55c9afd3e fixing cell indices for volume renderer cell locator 2017-08-29 08:54:52 -07:00
Matt Larsen
aba568768c adding conn fix 2017-08-27 12:16:20 -07:00
Matt Larsen
93aa64109f Merge topic 'line_rendering'
8e0a0308 Handles the case when the passed canvas has rendered data.
b727377f Refactoring
44357d51 Apply external faces filter on cellset before wireframing
7e95269c Refactoring wireframing code
5738e895 Wireframe rendering
657b0b94 Applies `clang-format` and minor refactoring
af2acc57 Implements a simple line renderer using Xialin Wu's algorithm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !895
2017-08-24 15:49:14 -04:00
Manish Mathai
8e0a0308f0 Handles the case when the passed canvas has rendered data.
This change adds a option via `SetIsOverlay` which causes the
`MapperWireframer` to use the existing depth buffer instead of
generating a new one.
This change refactors the line color blending to
retain the alpha value separately instead of pre-multiplying it.
2017-08-23 14:51:05 -07:00
Manish Mathai
b727377fd5 Refactoring 2017-08-21 18:21:44 -07:00
Manish Mathai
44357d5113 Apply external faces filter on cellset before wireframing 2017-08-21 18:21:44 -07:00
Manish Mathai
7e95269ce0 Refactoring wireframing code 2017-08-21 18:21:44 -07:00
Manish Mathai
5738e895ce Wireframe rendering 2017-08-21 18:21:37 -07:00
Matt Larsen
5782152485 Merge topic 'x_ray_add_emmission'
5429f120 fixed energy error and fix for ray camera
ac784330 Merge remote-tracking branch 'upstream/master' into x_ray_add_emmission
521e445b emission now functioning
52959d91 testing emission
5fc80517 initial version on absorption and emission integration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !893
2017-08-20 00:09:13 -04:00
Matt Larsen
5429f1200e fixed energy error and fix for ray camera 2017-08-19 17:19:03 -07:00
Robert Maynard
a487017fd1 Remove lines that only contain a semi-colon. 2017-08-16 14:31:17 -04:00
Manish Mathai
657b0b9432 Applies clang-format and minor refactoring 2017-08-16 11:02:42 -07:00
Manish Mathai
af2acc5736 Implements a simple line renderer using Xialin Wu's algorithm
The algorithm is parallelized using a custom Mapper and Canvas class.
It is parallelized over the expected pixels that will be colored,
blending with any previous color value. This does not use the depth buffer
and hence will naively overrwite all pixels while drawing a line segment.
2017-08-16 11:02:42 -07:00
Matt Larsen
ac78433085 Merge remote-tracking branch 'upstream/master' into x_ray_add_emmission 2017-08-15 07:27:17 -07:00
Matt Larsen
7ca8d1bd3a Merge topic 'mapper_fixes'
df185a67 removing background colors from tracers. Background color is now the responsiblitiy of the canvas.
28b1e6b1 initializing ray color buffer to 0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !881
2017-08-12 22:29:12 -04:00
Matt Larsen
df185a67aa removing background colors from tracers. Background color is now the responsiblitiy of the canvas. 2017-08-12 17:22:47 -07:00
Matt Larsen
28b1e6b13b initializing ray color buffer to 0 2017-08-12 15:42:26 -07:00
Dave Pugmire
b23564a526 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into pics_unittests 2017-08-10 16:18:18 -04:00
James Kress
23a56dd771 Merge topic 'Create-YAxis-Log-Scaling'
f3e455eb Adding 2D, 3D annotations, fixing GL color mapper.
7c0b15a5 Adding ability to have y-axis log scaling in 1D.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !863
2017-08-10 13:48:41 -04:00
James
f3e455ebf6 Adding 2D, 3D annotations, fixing GL color mapper. 2017-08-10 09:26:16 -04:00
Kenneth Moreland
2e875d4dfa Fix signed/unsigned conversion warnings in GLFW test 2017-08-08 16:14:55 -06:00
James
7c0b15a555 Adding ability to have y-axis log scaling in 1D. 2017-08-07 10:45:03 -04:00
Matt Larsen
dba99744ce Merge topic 'rendering_pipeline'
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
2017-08-06 17:02:51 -04:00
Matt Larsen
2b5e8e9f52 Removing debug statements 2017-08-06 12:18:30 -07:00
Matt Larsen
0459913aeb Multi canvas rendering 2017-08-06 11:59:19 -07:00
Matt Larsen
35877cd923 Adding missing file 2017-08-05 19:14:31 -07:00
Matt Larsen
b1e3688bfd multi-canvas working for ray tracer + volume renderer 2017-08-05 19:11:28 -07:00
Matt Larsen
33af0fec65 composing ray tracer and volume renderer is successful. Still need a strategy for the background color. 2017-08-04 09:24:05 -07:00
Kenneth Moreland
5b03e87fdf Merge topic 'glfw-test-fixes'
faa7815a Fix buffer overrun error
14b81a65 Fix compiler errors for UnitTestMapperGLFW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !859
2017-08-02 17:59:01 -04:00
James Kress
f1077fe601 Merge topic 'Adding-1DView-Line-Color'
6b53a01c Removing print.
1eb58512 Adding ability to modify axis color as well as legend label color.
bd561b1e Trying to fix color for mesa.
c9bd71f9 Trying to fix color in mesa.
14c69183 Adding color to RenderTest.
7674d2cc Adding color to mesa test.
686f9823 Updating rendering unit tests for 1D plots.
3b79e4d7 Updating way 1D test plots are made, adding title.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !854
2017-08-02 16:07:16 -04:00
Matt Larsen
77a9e53066 Merge topic 'export_color'
dd4efb51 Uses `Color` in the unit tests for basic sanity check
812f11d3 Moves class-wide visibility macro to just the static class members.
68648863 Exports Color class, adding visibility to static members

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !850
2017-08-02 15:59:08 -04:00
Kenneth Moreland
faa7815ac5 Fix buffer overrun error 2017-08-02 10:45:23 -06:00
Kenneth Moreland
14b81a65a6 Fix compiler errors for UnitTestMapperGLFW
This file was creating a C array using the size of an array handle.
Generally, you cannot create a C array of a static size with a
variable created at runtime. Apparently some compilers were able
to trace back to fact that the array handle was a given size and
used that, but not all compilers can do this. To get around the
problem, just use a std::vector, which allows the data to be
dynamically allocated.
2017-08-02 10:35:45 -06:00
James
6b53a01c03 Removing print. 2017-08-02 12:35:30 -04:00
James
1eb585121c Adding ability to modify axis color as well as legend label color. 2017-08-02 12:32:19 -04:00
Matt Larsen
8e5f309e5e adding support in rendering triangulator for cell set permutation 2017-08-02 08:46:33 -07:00
Matt Larsen
521e445b62 emission now functioning 2017-08-02 08:27:06 -07:00
Matt Larsen
92fde35bb4 fixing depth 2017-08-01 10:06:37 -07:00
Matt Larsen
52959d910d testing emission 2017-07-31 07:17:43 -07:00
James
bd561b1e50 Trying to fix color for mesa. 2017-07-28 16:38:38 -04:00
James
c9bd71f90f Trying to fix color in mesa. 2017-07-28 16:34:57 -04:00
James
14c69183af Adding color to RenderTest. 2017-07-28 16:16:03 -04:00
James
7674d2cc26 Adding color to mesa test. 2017-07-28 16:08:14 -04:00
James
686f982333 Updating rendering unit tests for 1D plots. 2017-07-28 16:01:06 -04:00
James
3b79e4d7c4 Updating way 1D test plots are made, adding title. 2017-07-28 15:45:36 -04:00
James
6106e24026 Fix CMake line. 2017-07-28 13:48:48 -04:00
James
c7ef96601b Commenting in rendering CMakeLists. 2017-07-28 13:40:39 -04:00
James
6b59b01e14 Adding color lines, view annotations, line color labels. 2017-07-28 13:31:19 -04:00
Dave Pugmire
90d0e0e966 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m 2017-07-28 10:08:58 -04:00
Dave Pugmire
3759887aed Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2017-07-28 10:07:37 -04:00
Manish Mathai
dd4efb511f Uses Color in the unit tests for basic sanity check
This commits acts as a basic sanity check for `Color` class and to
ensure the symbol visility fix.
2017-07-27 14:10:34 -07:00
Kenneth Moreland
dd2fec58e0 Fix conversion warning in GLFW unit test 2017-07-25 12:43:31 -06:00
Manish Mathai
812f11d362 Moves class-wide visibility macro to just the static class members.
`Color` class uses `VTKM_EXEC`* visibility macros on some member functions
and  VC++ raises an error if that is mixed with the class wide visibility
macro. This commit adds the macro to each individual static member instead.
2017-07-24 14:51:46 -07:00
Manish Mathai
68648863bc Exports Color class, adding visibility to static members
Color class contains predefined colors as static members and needs to be
exported for them to be accessible outside the library.
2017-07-24 11:59:19 -07:00
Matt Larsen
5fc8051712 initial version on absorption and emission integration 2017-07-20 07:30:42 -07:00
James
58deb3eb42 Fixing View1d and View2d x scaling. 2017-07-17 09:58:15 -04:00
Matt Larsen
c9ce558497 Merge topic 'fix_for_rt_lib'
adced368 Adding private targert link library to fix undefined symbols in ubuntu

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !830
2017-07-10 10:36:19 -04:00
Matt Larsen
adced36814 Adding private targert link library to fix undefined symbols in ubuntu 2017-07-10 07:34:51 -07:00
Matt Larsen
e783487f98 Adding ArrayHandleCast header 2017-07-08 14:03:33 -07:00
Matt Larsen
a2b3f80356 Cleaning up rendering headers and moving structured volume renderer into cxx file 2017-07-08 13:48:38 -07:00
David C. Lonie
fb2d36be1e Refactor VecRectilinearPointCoordinates.
See #163.
2017-07-07 13:49:35 -04:00
Mark Kim
8c5129fa68 Saving pnms with VS2015 converts LF into CRLF unless the file is opened as binary. 2017-07-06 18:56:16 -04:00
Matt Larsen
33ebf0aaa1 simpler method of scaling epsilon based on primitive AABB 2017-07-04 16:43:31 -07:00
Matt Larsen
c2ffa665d2 Adding scaled epsilon to bounding boxes to handle floating point edge cases 2017-07-04 15:10:17 -07:00
Matt Larsen
ce3814c266 bvh checking for a single triangle 2017-07-03 19:50:45 -07:00
Matt Larsen
95749ee223 connecting composite background from volume mapper to renderer 2017-07-03 11:00:54 -07:00
Matt Larsen
ce2c29105f removing debug variable 2017-07-02 17:02:39 -07:00
Matt Larsen
0498f48269 Fixing incorrect logic when sampling the upper edge of a cell that is on the data set boundry 2017-07-02 17:00:10 -07:00
Matt Larsen
630e871ea7 refactoring ray tracing and adding new renderer 2017-06-17 14:28:45 -07: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
Robert Maynard
5c12bf127e Fix OpenGL header order when testing GLFW 2017-05-24 11:04:59 -04:00
Kitware Robot
efbde1d54b clang-format: sort include directives 2017-05-18 12:59:33 -04:00
Robert Maynard
57ab48fe8e Replace occurrences of NULL with nullptr. 2017-05-04 10:50:57 -04:00
David Lonie
2a4e55770f Merge topic 'weak_vtable_warnings'
77baa8a2 Add test for exceptions thrown across library boundaries.
fd0e3e0e Remove vtable from WaveletFilter.
96bf0dac Give AxisAnnotation a virtual destructor.
4807b3c4 Silence warnings about unavoidable weak vtables.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !742
2017-04-14 08:56:03 -04:00
David C. Lonie
96bf0dac1b Give AxisAnnotation a virtual destructor.
This is necessary since the class has virtual methods, and also
instructs the compiler that the class's vtable is to be stored in the
vtk_rendering library.
2017-04-13 14:07:41 -04:00
Robert Maynard
23c4fe5fd8 Before calling glewInit we need to make sure glew can load all extensions 2017-04-05 14:18:37 -04:00
Dave Pugmire
ca93142512 Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2017-03-28 09:30:13 -04:00
Dave Pugmire
69f9125663 Experiment with speeding up the GetHexahedronClassification. 2017-03-28 09:28:03 -04:00
Matt Larsen
1d4cfc2a28 Fixing Min and Max calls not defined for non-floating point types 2017-03-13 21:12:02 -07:00
Matt Larsen
cfc252ad83 completed refactoring 2017-03-13 20:59:32 -07:00
mclarsen
2f9fb6eecb Almost finished refactoring 2017-03-13 17:03:37 -07:00
mclarsen
237df547ec Adding classes to reduce the ammount of redundant code 2017-03-13 11:49:29 -07:00
Kenneth Moreland
6fdc7eb8c0 Add Field::GetRange and CoordinateSystem::GetBounds to library
Following what was done with ArrayRangeCompute, the GetRange and
GetBounds methods are embedded into the vtkm_cont library for the most
common type lists.

Also, and probably more importantly, the device adapter is no longer one
of the arguments for either of these methods. It is no longer needed as
ArrayRangeCompute no longer needs it.
2017-03-09 13:18:36 -05:00
Sujin Philip
9eddce6c99 Rename StreamCompact to CopyIf
Plus, removes the version that uses one array as both input and stencil.
2017-03-06 11:08:27 -05:00
Robert Maynard
ae9a8fd0a4 Fix CellSet* typeid to consistent across dynamic libraries.
Since we don't have explicit template instantiations for CellSetExplicit
and CellSetSingleType we need to mark them as being exported from all
libraries.
2017-03-01 17:12:46 -05:00
Kenneth Moreland
3e77f4e18b Merge topic 'refactor-runtime-device-tracker'
18c4190d Update classes using RuntimeDeviceTracker
200928ef Add a global RuntimeDeviceTracker
a3573117 Compile RuntimeDeviceTracker.cxx with CUDA when appropriate
814b2db1 Add the implementation of RuntimeDeviceTracker to cont library
b9d3206e Move RuntimeDeviceTracker to vtkm::cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !707
2017-02-24 10:50:19 -05:00
Kenneth Moreland
18c4190d85 Update classes using RuntimeDeviceTracker
They now grab the global runtime device tracker. In some cases, I've
added the ability to set/get the tracker to change it from the global.
In others I just removed the local copy, since it was just hooked into
the global tracker.
2017-02-23 09:54:41 -07:00
Kenneth Moreland
a3573117de Compile RuntimeDeviceTracker.cxx with CUDA when appropriate
The RuntimeDeviceTracker.cxx contains a library method that queries the
CUDA device, which only works if compiled as a CUDA source file.

This set up will allow code that is not compiled with CUDA use a
RuntimeDeviceTracker with other code that does use CUDA.
2017-02-22 16:18:23 -07:00
Matt Larsen
a6bd88d2fe Removing unused timing code and headers 2017-02-22 14:45:33 -08:00
Kenneth Moreland
b9d3206ea6 Move RuntimeDeviceTracker to vtkm::cont
Before it was in the vtkm::cont::internal namespace. However, we expect
to be using this feature quite a bit more as we want VTK-m to handle
multiple devices effectively (as in, just figure it out and go).
2017-02-22 13:33:52 -07:00
Matt Larsen
7d4334b5e3 Had conditional backwards 2017-02-22 11:21:48 -08:00
Matt Larsen
50ccedf828 Fixing the default behavior of the volume renderer 2017-02-22 11:17:22 -08:00
Matt Larsen
87e53d6c00 Fixing error in volume renderer 2017-02-10 14:00:02 -08:00
Matt Larsen
30c5c3be4a Merge topic 'volume_mapper_fix'
1f6ef23b adding the ability to turn off background compositing for volume renderer
3fe918ce adding sample distance to the volume mapper

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !688
2017-02-10 00:08:26 -05:00
Matt Larsen
1f6ef23b98 adding the ability to turn off background compositing for volume renderer 2017-02-09 16:26:23 -08:00
Matt Larsen
3fe918ce4d adding sample distance to the volume mapper 2017-02-09 16:12:23 -08:00
Matt Larsen
6b534a438f Fixing a typo in Actor 2017-02-09 15:59:37 -08:00
Matt Larsen
c2f0dd5a64 Adding the ablitiy to set the scalar range of an Actor to get a consistent mapping of scalar values when running with MPI 2017-02-09 15:38:40 -08:00
Matt Larsen
bd845f01d6 Adding coordinate system include to the volume renderer 2017-02-09 13:00:08 -08:00
Matt Larsen
59020fe98f Adding several more includes to the volume renderer 2017-02-09 12:51:46 -08:00
Matt Larsen
9f074e4ad8 Removing typename from typdef declaration in the volume renderer 2017-02-09 12:47:02 -08:00
Matt Larsen
bee6868254 Fixing the include in the rendering library 2017-02-09 12:36:59 -08:00
David C. Lonie
f601e38ba8 Simplify exception hierarchy.
Remove the ErrorControl class such that all subclasses now inherit from
error. Renamed all exception classes via s/ErrorControl/Error/.

See issue #57.
2017-02-07 15:42:38 -05:00
Robert Maynard
8035b526a8 Update the CMake components to have the concept of backends.
Now components are labeled as devices, and therefore allow other components
to link to only backends. We also have done the same thing for rendering.
2017-01-27 10:03:53 -05:00
Robert Maynard
a6bd3a22e0 Make sure all custom storage containers are exported. 2017-01-16 09:17:38 -05:00
Robert Maynard
a16f9fedbe Reduce the amount of vtables that vtkm::rendering produce. 2017-01-16 09:17:38 -05:00
Kenneth Moreland
713cf4228a Make it not possible to create a cell set without specifying num points
The CellSetExplicit and CellSetSingleType classes have an ivar that
marks the number of points. There were several instances of code
creating cell sets without specifying the number of points. This can be
very bad if subsequent code needs that information.
2017-01-12 13:02:10 -07:00
Robert Maynard
7d0a6d1975 Resolve errors building on windows. 2016-12-12 09:32:46 -05:00
Ben Boeckel
e06a998e5b Merge topic 'render_1D'
8a93ecc4 code alignment tweaks.
6fa448b5 Remove the 1D camera. 1D plots will use a 2D camera.
52aa9b9a Fix some compile errors.
23d8d585 Add explicit 1D rendering. Also added some data model suport.
db522c4c Add GetCanvas calls to the mapper classes.
87b1cdca cleanup. Remove some compiler warnings.
d38e6270 Support for 1D rendering.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !616
2016-12-09 09:34:11 -05:00
Dave Pugmire
8a93ecc404 code alignment tweaks. 2016-12-06 10:36:28 -05:00
Dave Pugmire
6fa448b5a5 Remove the 1D camera. 1D plots will use a 2D camera. 2016-12-02 10:26:36 -05:00
Robert Maynard
295de14deb Merge topic 'consistently_guard_around_windows_h'
6b1094c7 Consistently include windows.h by making a wrapper header.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !620
2016-11-30 13:56:49 -05:00
Dave Pugmire
52aa9b9ad0 Fix some compile errors. 2016-11-29 09:33:46 -05:00
Dave Pugmire
23d8d585a0 Add explicit 1D rendering. Also added some data model suport. 2016-11-28 16:07:40 -05:00
Robert Maynard
6b1094c767 Consistently include windows.h by making a wrapper header.
We previously included windows.h in numerous locations using different
techniques to guard against bringing in parts of the file that are bad
(min/max macros, etc). This solves the problem by consistently using
vtkm/internal/Windows.h to setup everything.
2016-11-28 09:54:37 -05:00
Dave Pugmire
db522c4cd1 Add GetCanvas calls to the mapper classes. 2016-11-28 09:41:01 -05:00
Kenneth Moreland
767fc9c659 Do not declare OpenGLHeaders.h when there is no OpenGL 2016-11-23 13:17:33 -07:00
Kenneth Moreland
0772a157fd Revert "Don't build vtkm_rendering if we can't find opengl"
There are many rendering classes that do not rely on OpenGL. We really
want to be able to use this functionality on systems that do not have
OpenGL. That is a big part of the point.

This reverts commit c75feb74bb6add43e1be9a42a9bf4bf205b97c39.
2016-11-23 12:14:44 -07:00
Dave Pugmire
87b1cdcacf cleanup. Remove some compiler warnings. 2016-11-23 13:45:03 -05:00
Dave Pugmire
d38e627057 Support for 1D rendering. 2016-11-23 10:48:22 -05:00
Kenneth Moreland
02e37f4bc5 Fix an issue with casting a float to an int too soon
There was a case of bad casting where a Float32 that should be in the
range between 0 and 1 was cast to an Id and then multiplied by the size
of an array. The intention is to get a proportional index into the
array, but because the float was cast to an int first, you get either
the first or last index.

Instead, first cast the size of the array to a Float32, multiply it by
the fraction, and then cast back to an Id. That should give the desired
effect.
2016-11-22 15:34:56 -07: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
Dave Pugmire
80eb8621e2 more uninitialized compiler warnings... 2016-11-07 15:24:38 -05:00
Dave Pugmire
2975b03a53 Remove 'uninitialized variable' warning. 2016-11-07 15:07:03 -05:00
Dave Pugmire
f413bac78c Fix compiler warnings. 2016-11-04 11:43:30 -04:00
Dave Pugmire
5bd9b0ff5f minor fixes. 2016-11-03 16:57:30 -04:00
Robert Maynard
6d9dd7d233 Correct conversion warning in VolumeRendererStructured 2016-10-31 15:27:45 -04:00
Robert Maynard
cc8121d997 Fix uninitialized warnings from DecodePNG. 2016-10-31 15:26:05 -04:00
Robert Maynard
c75feb74bb Don't build vtkm_rendering if we can't find opengl. 2016-10-31 15:16:36 -04:00
Kenneth Moreland
797d30d7bb Remove unnecessary link from vtkm_rendering to glfw
There is no code in the rendering library that uses GLFW. (GLFW is
currently only used directly by tests and examples.) This adds
unnecessary link dependencies that can only hurt us later.
2016-10-22 16:03:16 -06:00
Robert Maynard
ca9233226e Merge topic 'refactor_vtkm_rendering_export_markup'
7d295de8 Refactor vtk-m symbol visibility macros to be on the classes.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !585
2016-10-19 20:02:04 -04: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
Mark Kim
4f835fb31d Need to continuously upload the camera for examples/Rendering. 2016-10-17 10:34:20 -04:00
Mark Kim
464da87d5a Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m 2016-10-12 14:40:32 -04:00
Dave Pugmire
b5007de0ab compile warnings. 2016-10-12 08:35:45 -04:00
Dave Pugmire
60b67fef71 code cleanup. 2016-10-05 09:33:47 -04:00
Dave Pugmire
c7da86f04c compiler warning. 2016-10-05 08:55:19 -04:00
Dave Pugmire
ebef07299e Remove some -Wreorder warnings. 2016-10-04 17:00:05 -04:00
Dave Pugmire
c25a028dcc compile warnings. 2016-10-04 15:29:42 -04:00
Dave Pugmire
a8feb67ad3 warnings.... 2016-10-04 15:10:20 -04:00
Dave Pugmire
31654c2545 fix compiler warning. 2016-10-04 14:38:35 -04:00
Dave Pugmire
fed8c7228c fix compiler warnings. 2016-10-04 13:31:52 -04:00
Dave Pugmire
827bf10795 compiler warnings. 2016-10-04 12:43:04 -04:00
Dave Pugmire
668e8115af Fix compiler warnings. 2016-10-04 11:59:00 -04:00
Dave Pugmire
c4bd8913c2 Use a new worklet to map vertex colors through a colormap. 2016-09-28 14:23:18 -04:00
Robert Maynard
0f58d6fc54 Add vtkm/cont/serial directory for the serial backend. 2016-09-28 14:22:53 -04:00
Mark Kim
0ace430746 Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2016-09-28 10:59:27 -04:00
Mark Kim
f2a6d8d5e3 Change the for loop that converts color to Worklet. 2016-09-28 10:57:05 -04:00
Dave Pugmire
c99fe8b65e Remove rendering tests that have been moved to subdirectories.
Fix a compile error in canvas constructor in the GLFW test.
2016-09-27 14:04:28 -04:00
Mark Kim
a41e0f28df Merge branch 'master' of gitlab.kitware.com:vtk/vtk-m 2016-09-26 16:12:19 -04:00
Mark Kim
2db35b0041 Removed extraneous debug output. 2016-09-26 15:09:41 -04:00
Mark Kim
5827473abb Merge branch 'master' of gitlab.kitware.com:dpugmire/vtk-m 2016-09-23 09:46:48 -04:00
Dave Pugmire
7a2874cf44 Add 1D support for uniform and rectilinear data. 2016-09-23 09:00:40 -04:00
Mark Kim
9100a58da4 glew undefs GLAPI and GLAPIENTRY. osmesa.h needs them. 2016-09-22 16:44:52 -04:00
Mark Kim
4076aef075 Ubuntu 16.04's OSMesa version 11.2.0 is compiled without gallium/llvmpipe, so it doesn't support GLSL 1.3 or higher. 2016-09-22 16:25:41 -04:00
Kenneth Moreland
4b83826345 Fix uninitialized variable warning in structured volume renderer
One of the dashboard was complaining that the bottomLeft variable might
have been used uninitialized because it got set in a condition above it.
In fact, that condition is always true the first during the first
iteration, but it is not worth fighting the compiler over it. Instead,
just initialize the value of bottomLeft when it is constructed.
2016-09-22 09:52:12 -06:00
Kenneth Moreland
1e819c335f Remove uninitialized value warnings from PNGDecode
One of the dashboard compilers found a code path in PNGDecode where if
given a buffer too short for a header the info.width and info.height
were not initialized but their values still returned to the calling
function. This case does not really matter since an error is also
returned, but still technically incorrect. Fixed the problem by
initializing the width and height to 0 (which could help anyway if the
error is not properly checked).
2016-09-22 09:43:24 -06:00
Dave Pugmire
a12b5eeae3 Fix compile errors. decl for memcpy required. 2016-09-20 11:03:25 -04:00
Kenneth Moreland
0ca69cf65f Merge topic 'osmesa-option'
123bc8b6 Add a configuration error if OSMesa was not found
0a61085d Do not load OpenGL libraries if OSMesa already loaded
640e92c7 Add VTKm_ENABLE_OSMESA option

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !548
2016-09-17 10:11:55 -04:00
Mark Kim
c99c05b6f0 Change glfw unit test to also test vbo uploading. 2016-09-15 13:56:50 -04:00
Mark Kim
bb7fe4ad8e It's possible that the length of shader compiler message to be less than
or equal to zero. If we don't check for that, it'll spit out garbage.
2016-09-15 13:55:16 -04:00
Kenneth Moreland
123bc8b6e2 Add a configuration error if OSMesa was not found
If VTKm_ENABLE_OSMesa was on but OSMesa was not found, CMake would just
give a status update but happily configure. This change checks for the
condition where VTKm_ENABLE_OSMesa is on but OSMesa was not configured
correctly and raises an error in this case.
2016-09-14 16:04:37 -06:00
Mark Kim
7cfc119999 Demo.cxx: MapperRayTracer is no longer a templated class.
UnitTestMapperEGL.cxx: MapperGL is no longer a templated class.
UnitTestMapperGLFW.cxx: strmp needs cstring
rendering/CMakeLists.txt: need to append egl_sources to sources.
2016-09-14 15:58:45 -04:00
Mark Kim
ecf57f8f31 need glewInit. 2016-09-14 11:25:03 -04:00
Mark Kim
c216c98c57 Merge branch 'umaster' 2016-09-14 10:39:52 -04:00
Mark Kim
fbaee11da9 Demo.cxx: MapperRayTracer is no longer a templated class.
UnitTestMapperEGL.cxx: MapperGL is no longer a templated class.
UnitTestMapperGLFW.cxx: strmp needs cstring
rendering/CMakeLists.txt: need to append egl_sources to sources.
2016-09-14 10:33:51 -04:00
Mark Kim
f293c5a0bc Merge branch 'glut-unittest' 2016-09-14 09:19:57 -04:00
Dave Pugmire
36be354980 Merge branch 'glut-rendertest' into 'master'
Add glut rendering unittest.

Make the GLFW package variables advanced, and add it to the configure components.
Modify the other examples that use GLUT to use the configure components command.

See merge request !546
2016-09-13 14:20:04 -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
Dave Pugmire
ffd2d0eac6 Add glut rendering unittest.
Make the GLFW package variables advanced, and add it to the configure components.
Modify the other examples that use GLUT to use the configure components command.
2016-09-09 15:33:34 -04:00
Kenneth Moreland
77ecfbeb78 Explicitly implement constructors and destructors
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.
2016-09-08 17:08:17 -06:00
Kenneth Moreland
52838e9ed2 Make font factory arrays static for faster compilation
I noticed that Visual Studio was taking an insane amount of time to
compile BitmapFontFactory.cxx (~20 minutes). Following some suggestions
on stackoverflow (http://stackoverflow.com/questions/7893850/long-
compile-times-in-visual-c-2010-with-large-static-arrays) I changed the
arrays to be static const (something that is more viable when compiling
a library instead of header-only). The compile after this changes seems
basically immediate now.
2016-09-07 16:48:11 -06:00
Kenneth Moreland
17194ff3a6 Update OSMesa test for new rendering class interfaces 2016-09-07 16:48:07 -06:00
Kenneth Moreland
0dab3f2adf Fix warning about precision conversion 2016-09-07 16:48:05 -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
26671e9fd6 Add WorldAnnotator to rendering library 2016-09-07 16:48:01 -06:00
Kenneth Moreland
219d6c02a1 Add TextureGL to rendering library
Also hide internals and other GL-ness from the interface.
2016-09-07 16:48:00 -06:00
Kenneth Moreland
c446f1bc7a Add TextAnnotation to rendering library
Also made the TextAnnotation classes conform better to VTK-m coding
style. Specifically, changed the order of words in subclass names (e.g.
TextAnnotationBillboard instead of BillboardTextAnnotation) and broke
out each subclass into its own header/source files.
2016-09-07 16:47:58 -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
668f93a66b Move Mappers to rendering library
Also changed the mappers to not be templated on the device adapter.
Instead, use TryExecute to determine the device adapter at runtime.
2016-09-07 16:47:52 -06:00
Kenneth Moreland
111850ef08 Use TryExecute within the rendeirng library
When things in the rendering library need to execute things in parallel
(outside of another rendering library like OpenGL) it should run it on
available parallel devices. This means using TryExecute to attempt on
whatever devices may be available. It also means that some of the
sources must be compiled with CUDA's nvcc. To enable this, made a code
wrapping mechanism to compile within a .cu file.
2016-09-07 16:47:50 -06:00
Kenneth Moreland
d8ca9f0125 Add ColorBarAnnotation and ColorTable to rendering library 2016-09-07 16:47:48 -06:00
Kenneth Moreland
1073fdede1 Move Canvas classes to rendering library 2016-09-07 16:47:46 -06:00
Kenneth Moreland
e20648b845 Add Camera code to rendering library 2016-09-07 16:47:44 -06:00
Kenneth Moreland
2c34c1ac9d Move BitmapFont code to library 2016-09-07 16:47:42 -06:00
Kenneth Moreland
07df53d7d1 Move AxisAnnotation classes to rendering library 2016-09-07 16:47:40 -06:00
Kenneth Moreland
ea8602d882 Create configuration for rendering library
I have noticed at least on my windows machine that source code that uses
the rendering package is taking a long time to compile. The rendering
library does not rely much on templates and more on virtual methods.
Thus, it is a good candidate for moving to a library so that it need be
compiled only once.

This sets up the configure scripts to create the library. There is also
a simple port of one class to the library. More will follow.
2016-09-07 16:47:35 -06:00
Kenneth Moreland
8cb2803b45 Merge branch 'precision-warnings' into 'master'
Fix precision warnings when FloatDefault is 64 bit

When VTKm_USE_DOUBLE_PRECISION is on (not the default), then
vtkm::FloatDefault is set to 64 bit values. There was some code that was
coded for 32 bit and never checked for 64 bit (on all compilers).

See merge request !526
2016-09-07 13:54:13 -04:00
Robert Maynard
f81c42b9b4 Replace NULL with nullptr where applicable. 2016-09-01 09:38:25 -04:00
Mark Kim
387d2a6a76 Stop copying the data in the render call. Instead, upload it on the first
call and then never upload again.

RenderTest: overload the Render function to pass in a Mapper.
UnitTestMapperGLFW: global variable for the MapperGL to pass into RenderTest::Render

MapperGL: Creating the VBO/VAO is now wrapped in check to see if the data's
already been loaded.

Moved some variables to class scope.
2016-08-29 04:33:14 -06:00
Kenneth Moreland
893f3115f2 Fix precision warnings when FloatDefault is 64 bit
When VTKm_USE_DOUBLE_PRECISION is on (not the default), then
vtkm::FloatDefault is set to 64 bit values. There was some code that was
coded for 32 bit and never checked for 64 bit (on all compilers).
2016-08-26 09:33:37 -06:00
Kenneth Moreland
4fd9ba7e11 Make glfw auto-terminate during testing
The UnitTestMapperGLFW test was coded to run in an interactive mode,
which was problematic when simply running the test. If no one was there
to exit the interactive window, the test would time out. This change
adds a "batch" mode that is on when run by ctest. The batch mode runs
through all configurations and exits.
2016-08-26 08:28:35 -06:00
Kenneth Moreland
7f8ea09f88 Fix configuration of dependent rendering libraries
The VTKmConfigureComponents.cmake file has lots of careful configuration
of many of VTK-m components and dependent libraries (like OpenGL,
OSMesa, etc.) that takes care of several corner cases. The configuration
is consolidated here so that it can be consistent across the many
directories in VTK-m as well as other projects that use VTK-m.

Recent changes to the configuration in rendering circumvented these and
directly tried to configure dependent rendering libraries. This is wrong
(and more importantly broke my OSX build).
2016-08-25 14:44:30 -06:00
Kenneth Moreland
1b69a83423 Don't add tests from parent directories
The testing subdirectories were including the tests from the parent
directory. I believe this was a copy-paste error from the tests
originally all being in one file (where the unit_tests variable had all
tests appended) and then moved to subdirectories where they should not
be appended.
2016-08-25 13:20:40 -06:00
Kenneth Moreland
8fd0768b39 Add RenderTest.h to configure scripts
The SourceInBuild was failing because of that.
2016-08-25 10:34:40 -06:00
Dave Pugmire
6f30b786f5 Add GLFW unit test.
Simplify the test code with a class templated on mapper, canvas and view.
2016-08-24 16:22:48 -04:00
Dave Pugmire
78f368486c Did a chmod on these files that had the execute bit set. 2016-08-24 13:08:23 -04:00
Mark Kim
e920659ab8 Don't need to set uni_tests. 2016-08-19 14:27:40 -06:00
Mark Kim
5fbc55fa52 Check to see if osmesa or egl were found before adding testing. 2016-08-18 14:04:37 -06:00
Mark Kim
a5c3be294e Not specifying GLFW compatibility mode and OpenGL version allows for
annotation.
2016-08-12 19:29:01 -06:00
Mark Kim
cd27a71e2b Some Windows specific problems:
snprintf is incorrect pre-VS2013.
There are iterator issues (see 2121a36f)
far is a reserved #defined in windows *sigh*
2016-08-12 18:33:27 -06:00
Mark Kim
7bb3e89e87 Split EGL and OSMesa into separate directories. libGL and libOSMesa do not play well together. 2016-08-08 21:57:38 -04:00
Robert Maynard
31138293f9 Pass Fields and CoordinateSystems to Dispatcher::Invoke
Now that we can handle scheduling Fields and CoordinateSystems, do
2016-08-05 15:26:17 -04:00
Mark Kim
5535751a17 Merge branch 'glut-unittest' of gitlab.kitware.com:dpugmire/vtk-m into glut-unittest
Merge of Dave's clean-up with some of my fixes.
2016-08-03 10:40:53 -04:00