some small refactorings
This commit is contained in:
parent
d8fac9045b
commit
8eda3df225
23 changed files with 314 additions and 268 deletions
|
@ -1,6 +1,6 @@
|
|||
#include <pw/core/vector.hpp>
|
||||
#include <pw/core/serialize.hpp>
|
||||
#include <pw/core/transform_tools.hpp>
|
||||
#include <pw/core/matrix_transform.hpp>
|
||||
#include <pw/core/mesh.hpp>
|
||||
#include <pw/core/axisangle.hpp>
|
||||
|
||||
|
@ -17,7 +17,7 @@ int main(int argc,char **argv) {
|
|||
std::cout << pw::serialize::matrix(v.transposed()) << std::endl;
|
||||
}
|
||||
|
||||
auto scale = pw::transform_tools<float>::scale_matrix({2,2,2});
|
||||
auto scale = pw::matrix_transform<float>::scale_matrix({2,2,2});
|
||||
|
||||
amesh.apply(scale);
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
|
||||
#include <pw/core/vector.hpp>
|
||||
#include <pw/core/serialize.hpp>
|
||||
#include <pw/core/transform_tools.hpp>
|
||||
#include <pw/core/matrix_transform.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc,char **argv) {
|
||||
|
||||
auto perspective_mat = pw::transform_tools<float>::perspective_projection(45.f,1.3f,10,100);
|
||||
auto ortho_mat = pw::transform_tools<float>::orthogonal_projection(-1,1,1,-1,10,100);
|
||||
auto lookat_mat = pw::transform_tools<float>::look_at(pw::vector3(0,0,5),pw::vector3(0,0,0),pw::vector3(0,1,0));
|
||||
auto perspective_mat = pw::matrix_transform<float>::perspective_projection(45.f,1.3f,10,100);
|
||||
auto ortho_mat = pw::matrix_transform<float>::orthographic_frustum(-1,1,1,-1,10,100);
|
||||
auto lookat_mat = pw::matrix_transform<float>::look_at(pw::vector3(0,0,5),pw::vector3(0,0,0),pw::vector3(0,1,0));
|
||||
|
||||
|
||||
std::cout << pw::serialize::matrix(perspective_mat) << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue