added a few things from SSTT as it has a newer C++11 design

This commit is contained in:
Hartmut Seichter 2019-01-02 23:22:09 +01:00
parent 9819fa7f36
commit f6c7f1adbb
16 changed files with 79 additions and 67 deletions

View file

@ -1,5 +1,6 @@
set(hdrs
include/pw/core/log.hpp
include/pw/core/axisangle.hpp
include/pw/core/core.hpp
include/pw/core/math.hpp
@ -10,12 +11,15 @@ set(hdrs
include/pw/core/serialize.hpp
include/pw/core/image.hpp
include/pw/core/size.hpp
include/pw/core/timer.hpp
include/pw/core/globals.hpp
)
set(srcs
src/log.cpp
src/core.cpp
src/serialize.cpp
src/timer.cpp
${CMAKE_SOURCE_DIR}/README.md
${CMAKE_SOURCE_DIR}/LICENSE
)

View file

@ -26,6 +26,7 @@
#ifndef PW_CORE_MATRIX_HPP
#define PW_CORE_MATRIX_HPP
#include <pw/core/globals.hpp>
#include <pw/core/matrixbase.hpp>
#include <pw/core/math.hpp>
@ -319,19 +320,19 @@ void matrix_<R,C,T>::normalize()
// 4x4
template <typename T>
class matrix44 : public matrix_<4,4,T>
class matrix44_ : public matrix_<4,4,T>
{
public:
using matrix_<4,4,T>::matrix_;
matrix44(const matrix_<4,4,T>& i)
matrix44_(const matrix_<4,4,T>& i)
{
*this = i;
}
matrix44& operator = (const matrix_<4,4,T>& rhs) {
matrix44_& operator = (const matrix_<4,4,T>& rhs) {
if (this != &rhs){
this->at(0,0) = rhs.at(0,0);this->at(0,1) = rhs.at(0,1);this->at(0,2) = rhs.at(0,2);this->at(0,3) = rhs.at(0,3);
this->at(1,0) = rhs.at(1,0);this->at(1,1) = rhs.at(1,1);this->at(1,2) = rhs.at(1,2);this->at(1,3) = rhs.at(1,3);
@ -599,8 +600,10 @@ matrix44<T>::LookAt(const matrix<3,1,T> &eye, const matrix<3,1,T> &target, const
// predefined matricies
typedef matrix44<double> matrix44d;
typedef matrix44<float> matrix44f;
typedef matrix44_<real_t> matrix44;
typedef matrix44_<double> matrix44d;
typedef matrix44_<float> matrix44f;
}