2019-05-21 21:28:33 +08:00
|
|
|
|
#ifndef HGL_GRAPH_SCENE_ORIENT_INCLUDE
|
|
|
|
|
#define HGL_GRAPH_SCENE_ORIENT_INCLUDE
|
|
|
|
|
|
|
|
|
|
//#include<hgl/type/List.h>
|
|
|
|
|
#include<hgl/math/Math.h>
|
2020-10-21 11:43:18 +08:00
|
|
|
|
#include<hgl/graph/VK.h>
|
2019-05-21 21:28:33 +08:00
|
|
|
|
namespace hgl
|
|
|
|
|
{
|
|
|
|
|
namespace graph
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* 方向定位数据基类
|
|
|
|
|
*/
|
2024-08-04 22:35:31 +08:00
|
|
|
|
class SceneOrient ///场景定位类
|
2019-05-21 21:28:33 +08:00
|
|
|
|
{
|
|
|
|
|
protected:
|
|
|
|
|
|
2024-08-24 03:08:14 +08:00
|
|
|
|
TransformManager transform_manager;
|
2019-05-21 21:28:33 +08:00
|
|
|
|
|
2024-08-24 03:08:14 +08:00
|
|
|
|
Matrix4f ParentMatrix; ///<上级矩阵
|
2024-07-17 01:38:30 +08:00
|
|
|
|
|
2024-08-24 03:08:14 +08:00
|
|
|
|
Matrix4f LocalMatrix; ///<本地到上一级矩阵
|
|
|
|
|
Matrix4f LocalToWorldMatrix; ///<本地到世界矩阵
|
|
|
|
|
Matrix4f InverseLocalToWorldMatrix; ///<世界到本地矩阵
|
|
|
|
|
Matrix4f InverseTransposeLocalToWorldMatrix; ///<世界到本地矩阵的转置矩阵
|
2019-05-21 21:28:33 +08:00
|
|
|
|
|
2024-08-24 03:08:14 +08:00
|
|
|
|
virtual void SetWorldMatrix(const Matrix4f &);
|
2019-05-21 21:28:33 +08:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
SceneOrient();
|
2024-07-31 00:11:04 +08:00
|
|
|
|
SceneOrient(const SceneOrient &);
|
2024-08-24 03:08:14 +08:00
|
|
|
|
SceneOrient(const Matrix4f &);
|
2019-05-21 21:28:33 +08:00
|
|
|
|
virtual ~SceneOrient()=default;
|
|
|
|
|
|
2024-07-17 01:38:30 +08:00
|
|
|
|
public:
|
|
|
|
|
|
2024-08-24 03:08:14 +08:00
|
|
|
|
TransformManager * GetTransform (){return &transform_manager;} ///<取得变换管理器
|
2019-05-21 21:28:33 +08:00
|
|
|
|
|
2024-08-24 03:08:14 +08:00
|
|
|
|
const Matrix4f & GetLocalMatrix ()const{return LocalMatrix;}
|
|
|
|
|
const Matrix4f & GetLocalToWorldMatrix ()const{return LocalToWorldMatrix;}
|
|
|
|
|
const Matrix4f & GetInverseLocalToWorldMatrix ()const{return InverseLocalToWorldMatrix;}
|
|
|
|
|
const Matrix4f & GetInverseTransposeLocalToWorldMatrix ()const{return InverseTransposeLocalToWorldMatrix;}
|
2019-05-21 21:28:33 +08:00
|
|
|
|
|
2020-11-26 17:51:59 +08:00
|
|
|
|
public:
|
|
|
|
|
|
2024-08-24 03:08:14 +08:00
|
|
|
|
virtual bool RefreshMatrix (const Matrix4f &); ///<刷新到世界空间变换
|
2019-05-21 21:28:33 +08:00
|
|
|
|
};//class SceneOrient
|
|
|
|
|
}//namespace graph
|
|
|
|
|
}//namespace hgl
|
|
|
|
|
#endif//HGL_GRAPH_SCENE_ORIENT_INCLUDE
|