2018-04-08 00:21:45 +02:00
|
|
|
#ifndef PW_SCENE_TRANSFORM_HPP
|
|
|
|
#define PW_SCENE_TRANSFORM_HPP
|
|
|
|
|
|
|
|
#include <pw/core/matrix.hpp>
|
|
|
|
#include <pw/scene/component.hpp>
|
|
|
|
|
|
|
|
namespace pw {
|
|
|
|
|
|
|
|
class transform : public component {
|
|
|
|
public:
|
2018-04-11 17:55:55 +02:00
|
|
|
|
2018-04-08 00:21:45 +02:00
|
|
|
using component::component;
|
|
|
|
|
|
|
|
const matrix44d& local() const;
|
|
|
|
void set_local(const matrix44d &local);
|
|
|
|
|
2018-04-11 17:55:55 +02:00
|
|
|
void set_global(const matrix44d &global);
|
|
|
|
|
|
|
|
void update();
|
|
|
|
|
2018-04-08 00:21:45 +02:00
|
|
|
protected:
|
|
|
|
|
|
|
|
matrix44d _local;
|
2018-04-11 17:55:55 +02:00
|
|
|
|
2018-04-08 00:21:45 +02:00
|
|
|
matrix44d _global;
|
2018-04-11 17:55:55 +02:00
|
|
|
matrix44d _global_inverse;
|
2018-04-08 00:21:45 +02:00
|
|
|
|
|
|
|
std::vector<ref> _path;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|