just a bit of tinkering around

This commit is contained in:
Hartmut Seichter 2020-03-02 12:27:04 +01:00
parent 70424c8819
commit a9626cc33f
8 changed files with 12 additions and 12 deletions

View file

@ -10,4 +10,4 @@ add_subdirectory(scripting)
add_subdirectory(visual)
add_subdirectory(geometry)
add_subdirectory(engine)
add_subdirectory(runtime)

View file

@ -30,8 +30,8 @@
namespace pw {
const static double __PW_PI = 3.1415926535897932384626433832795028841971693993751058209;
const static double __PW_PI_DOUBLE = 2.0 * __PW_PI;
constexpr double __PW_PI = 3.1415926535897932384626433832795028841971693993751058209;
constexpr double __PW_PI_DOUBLE = 2.0 * __PW_PI;
template <typename T>
inline const T pi() { return static_cast<T>(__PW_PI); }

View file

@ -69,7 +69,7 @@ public:
void reset();
aabb aabb() const { return _aabb; }
aabb get_aabb() const { return _aabb; }
void compute_normals();
@ -86,7 +86,7 @@ protected:
std::vector<vertex2array_t> _uvs; //!< storing multiple UV sets
struct aabb _aabb;
struct aabb _aabb;
// TODO add weights, tangents etc. pp.

View file

@ -33,13 +33,13 @@ namespace pw {
struct serialize {
template <size_t R,size_t C,typename T>
inline static std::string matrix(const matrix_<R,C,T>& m) {
template <size_t R,size_t C,typename T>
inline static std::string matrix(const matrix_<R,C,T>& m) {
std::stringstream ss;
for (int r = 0; r < m.rows;r++) {
for (int c = 0; c < m.cols;c++) {
ss << m(r,c) << " ";
for (int r = 0; r < m.rows;r++) {
for (int c = 0; c < m.cols;c++) {
ss << m(r,c) << " ";
}
ss << std::endl;
}

View file

@ -38,6 +38,7 @@ int main(int argc,const char** argv) {
} catch (std::exception &e) {
std::cerr << e.what() << std::endl;
return -1;
}

View file

@ -6,7 +6,7 @@
namespace pw {
void register_io_function(sol::state& lua,sol::table& ns)
void register_io_function(sol::state&,sol::table& ns)
{
ns.new_usertype<image_io>("imageio"
,"new", sol::no_constructor

View file

@ -165,7 +165,6 @@ struct triangle_renderer
auto proj_mat = matrix_transform<float>::perspective_projection(deg_to_rad(60.f),
1.3f,
0.2f,1000.f);
#endif