Bugzilla – Attachment 736 Details for
Bug 1304
Axis-Aligned Scaling incorrect on Projective Transforms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
Compile this file with Eigen on the include search path. Then run on the command line
eigen_diagonal_affine_scale_problem.cpp (text/x-c++src), 996 bytes, created by
Stephen Kiazyk
on 2016-09-23 01:01:37 UTC
(
hide
)
Description:
Compile this file with Eigen on the include search path. Then run on the command line
Filename:
MIME Type:
Creator:
Stephen Kiazyk
Created:
2016-09-23 01:01:37 UTC
Size:
996 bytes
patch
obsolete
>#include <Eigen/Core> >#include <Eigen/Geometry> >#include <iostream> > >int main(int argc, char** argv) { > typedef Eigen::Transform<float, 3, Eigen::Projective> EigenXForm; > EigenXForm original_matrix; > > original_matrix.matrix() << 1, 2, 3, 4, > 5, 6, 7, 8, > 9, 10, 11, 12, > 13, 14, 15, 16; > > // Using DiagonalMatrix directly > EigenXForm direct_result = original_matrix * Eigen::DiagonalMatrix<float, 3>(2, 3, 4); > > // First converting the Diagonal Matrix to a Transform... > EigenXForm explicit_scale(Eigen::DiagonalMatrix<float, 3>(2, 3, 4)); > // ...then apply it > EigenXForm indirect_result = original_matrix * explicit_scale; > > std::cout << "Original = " << std::endl << original_matrix.matrix() << std::endl << std::endl; > std::cout << "Direct = " << std::endl << direct_result.matrix() << std::endl << std::endl; > std::cout << "Indirect = " << std::endl << indirect_result.matrix() << std::endl << std::endl; > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1304
: 736