Volumes/apps/main.cpp
Karl-Wilfried Zimmer 66ae828379 fixed block
2024-07-21 19:12:47 +02:00

32 lines
905 B
C++

#include <iostream>
#include "Block/block.h"
int main(int argc, char **argv) {
std::cout << "Hello, world!" << std::endl;
LinAlg::Vector3 vec(1, 2, 3);
LinAlg::Vector3 vec2(2, 1, 3);
Volumes::Block block(vec,1,1,1);
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
vec*=2;
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
vec/=2;
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
std::cout<<vec.dot(vec)<<std::endl;
std::cout<<vec.cross(vec2)<<std::endl;
vec.norm();
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
vec-=vec;
std::cout<<vec<<std::endl;
std::cout<<vec.len()<<std::endl;
std::cout<<block<<std::endl;
std::vector<LinAlg::Vector3> normals=block.getNormals();
for(LinAlg::Vector3 vector:normals){
std::cout<<vector<<std::endl;
}
return 0;
}