fixing core matrix calculations
This commit is contained in:
parent
1e8b91474e
commit
54e3b1587e
10 changed files with 401 additions and 145 deletions
|
@ -5,25 +5,25 @@ add_executable(pwcore_test_matrix
|
|||
target_link_libraries(pwcore_test_matrix
|
||||
pwcore)
|
||||
|
||||
add_executable(pwcore_test_vector
|
||||
pwcore_test_vector.cpp
|
||||
)
|
||||
#add_executable(pwcore_test_vector
|
||||
# pwcore_test_vector.cpp
|
||||
# )
|
||||
|
||||
target_link_libraries(pwcore_test_vector
|
||||
pwcore)
|
||||
#target_link_libraries(pwcore_test_vector
|
||||
# pwcore)
|
||||
|
||||
|
||||
add_executable(pwcore_test_quaternion
|
||||
pwcore_test_quaternion.cpp
|
||||
)
|
||||
#add_executable(pwcore_test_quaternion
|
||||
# pwcore_test_quaternion.cpp
|
||||
# )
|
||||
|
||||
target_link_libraries(pwcore_test_quaternion
|
||||
pwcore)
|
||||
#target_link_libraries(pwcore_test_quaternion
|
||||
# pwcore)
|
||||
|
||||
|
||||
add_executable(pwcore_test_axisangle
|
||||
pwcore_test_axisangle.cpp
|
||||
)
|
||||
#add_executable(pwcore_test_axisangle
|
||||
# pwcore_test_axisangle.cpp
|
||||
# )
|
||||
|
||||
target_link_libraries(pwcore_test_axisangle
|
||||
pwcore)
|
||||
#target_link_libraries(pwcore_test_axisangle
|
||||
# pwcore)
|
||||
|
|
|
@ -1,11 +1,45 @@
|
|||
|
||||
#include <pw/core/matrix.hpp>
|
||||
#include <pw/core/serialize.hpp>
|
||||
#include <pw/core/matrixbase.hpp>
|
||||
|
||||
//#include <pw/core/matrix.hpp>
|
||||
//#include <pw/core/serialize.hpp>
|
||||
|
||||
#include <pw/core/debug.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc,char **argv) {
|
||||
|
||||
|
||||
using namespace pw;
|
||||
|
||||
matrix2x2f m22; m22.zero();
|
||||
|
||||
m22(0,0) = 1; m22(0,1) = 2;
|
||||
m22(1,0) = 3; m22(1,1) = 4;
|
||||
|
||||
|
||||
debug::d() << "offset(0,1) col-major " << m22.offset(0,1);
|
||||
debug::d() << "det " << m22.determinant();
|
||||
|
||||
// vector2f v2 = m22.slice<2,1>(0,0);
|
||||
// m22.set_slice<2,1>(v2,0,0);
|
||||
|
||||
// v2 *= 2;
|
||||
// v2 += 1;
|
||||
|
||||
// m22 *= 3;
|
||||
|
||||
// m22.determinant();
|
||||
|
||||
// debug::d() << sizeof(v2);
|
||||
|
||||
// auto m22_i = m22.inverse();
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
|
||||
pw::matrix4x4d m;
|
||||
|
||||
m.set_identity();
|
||||
|
@ -48,4 +82,6 @@ int main(int argc,char **argv) {
|
|||
|
||||
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue