Remove constructor argument from array classes.

This is not used anymore, and is causing issues with
vtkTypeTemplate.

Also cleaned up some constructors to avoid re-initializing
members from base classes and ensure that all members are
initialized.

Change-Id: I103365211ce8289c2f5a5fdb05ccb5126a8fc0e0
Add FastDownCast method to vtkDataArray, vtkDataArrayTemplate.

The vtkDataArray API has several functions that take
vtkAbstractArrays as arguments, SafeDownCast them, and do
work with them. Several of these functions are often called
from tight loops in filters, causing the update to spend more
time doing strcmp trying to downcast the arrays than actually
crunching numbers.

The FastDownCast method takes a vtkAbstractArray, check an enum
value indicating the subclass, and static cast the result. Using
this downcast method in tight loop improves the filter
performance considerably.

Change-Id: Ibb23d10f3f265a4ac6bac21646c9c6f98854edc2
Add a vtkTypedDataArray class and iterator.

The templated vtkTypedDataArray provides an abstract interface to data
arrays with a known data type. This will be used to interact with data
arrays that are not subclasses of vtkDataArrayTemplate, but may be mapped
onto a non-standard memory layout for in-situ processing.

The vtkTypedDataArrayIterator uses the vtkTypedDataArray API to provide
generic random or sequential access into an array without using the void
pointer API.

An Iterator typedef along with Begin() and End() methods are added to both
vtkTypedDataArray and vtkDataArrayTemplate. The former uses
vtkTypeDataArrayIterators for safety, while the latter uses scalar pointers
for speed.

A vtkDataArrayIteratorMacro is added to provide a safe alternative to
vtkTemplateMacro when a non-standard vtkDataArray may be used.

Change-Id: I37c39af140733e5b715c42ab80153257d69a4d44
Allow batch copying of data set attributes.

This allows filters to copy many tuples at once, reducing the
overhead of copying many points.

Change-Id: I29089d761697fe110b85820254fceb0d2d7b1121
Add vtkAbstractTypeMacro for abstract vtkObject subclasses.

This allows abstract interfaces to define:
* IsA
* IsTypeOf
* SafeDownCast
* GetClassNameInternal

While ignoring the methods that cannot be used on abstract classes:
* NewInstanceInternal
* NewInstance

Change-Id: Ied61bf69b8caa3b5497766510fa5592d22eba117
Add setters for vtkGenericCell's points/point-ids.

This is done for performance reasons in the upcoming
vtkCellIterator class.

Change-Id: Ie03d620c2f653a9e55cfcfd4f87a5e4ce7353271
Tweaked Apple gcc 4.2 check

Comments say the hack is for apple-gcc-4.2,
but clang also identifies itself as such.
Make the check more exact.

Change-Id: Ic4a9adfa1fd60d74b5e8e4cea421757e07b1bb89
Remove compiler-specific check

The gcc-only path is perfectly portable,
so use it for all compilers.

Change-Id: Ic331b9bb45ce6fe8c2b5f17978b4f0c72b96ecaa
Removed bizarre useless comments

Change-Id: Iedd179dedc88a15ccf3d3465d7cceb48d0142279
Reuse memory in DeepCopy implementations.

Many implementations of DeepCopy in array objects
reallocated memory each time DeepCopy was called. This
patch modifies these methods to reuse memory, if possible.

Squeeze() is called after copying to prevent memory bloat.

Change-Id: Ibf5f86bd0032bf2c7aa7c61787d123ca1a7c3b67
Avoid writing to unallocated memory in quadratic cells.

The Contour method of quadratic cells needs to interpolate
extra points that are not defined in the data structure. Instead
of calling SetPoint and hoping that extra memory has been
allocated, use InsertPoint to ensure that the array will be
extended as needed.

Change-Id: I5c5d7efb1af16116c538ebbe718650d350388aa9
Add vtkCellIterator for traversing cells in data sets.

This provides a generic method for traversing cells in
subclasses of vtkDataSet. Three implementations of the
vtkCellIterator interface are provided:

* vtkDataSetCellIterator: Use vtkDataSet API to look up cells
  using random access.
* vtkPointSetCellIterator: Use the vtkPointSet API to look up
  cells using random access. Advantage over
  vtkDataSetCellIterator is that points are looked up as a batch
  operation.
* vtkUnstructuredGridCellIterator: Use the vtkUnstructuredGrid
  internals to perform efficient sequential iteration without
  vtkCellLinks.

Change-Id: I5893dab945115721d2291b2eff83bf7e71632230
Perform a batch copy in vtkPoints::GetPoints.

This avoids the overhead of copying each point individually.
Instead, let the container decide the best copy strategy.

Change-Id: Ia12904c19fef8fe897170ceb731c1203e4998f20
Speed up vtkUnstructuredGrid::GetCell implementation.

Use batch retrievals and std::copy where possible.

Change-Id: I712624c64b8c5901db0a97ba5acb525df17bd6a8
Use ComputeNormals in vtkContourFilter.

The existing implementation ignored this setting. Changed the
default ComputeNormals setting to preserve old behavior unless
explicitly set by the user.

Change-Id: Ie599c4853881fa201509de5d835202b43967b474
Added 'const' to several public setters

Made some pointer/array parameters const.

Change-Id: I5f00b580e7478623d72c13cdca605aaa2bec7b56
Removed MSVC 6 workaround

MSVC 6 is no longer supported, so removed
a workaround documented to be for it.  Use
std::string clear() instead of erase().

Change-Id: I652c0780fa8efa3ae38f4ea77e862dca4f9e68bd
Remove MSVC 7.0 workaround

VTK requires 7.1 or later, which this comment
says does not need the workaround (the workaround
being using the i64 suffix instead of LL suffix.)

Change-Id: I1d7e038e47965b2c99b416d4997632341fbc42f2
Fixed some OS X-related spelling; comments only.

Change-Id: I461204856d7cccdc7f7edf41773391edd69daecd
Eliminated gcc-only prototype

made function static instead of having a
gcc-only prototype.

Change-Id: Ia081815b1c33333396d342ea1e281343b609931c