Commit Graph

3 Commits

Author SHA1 Message Date
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
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
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