ULRE/inc/hgl/graph/SceneOrient.h

54 lines
2.2 KiB
C
Raw Normal View History

2019-05-21 21:28:33 +08:00
#ifndef HGL_GRAPH_SCENE_ORIENT_INCLUDE
#define HGL_GRAPH_SCENE_ORIENT_INCLUDE
#include<hgl/graph/VK.h>
2024-08-31 00:10:57 +08:00
#include<hgl/graph/SceneMatrix.h>
2019-05-21 21:28:33 +08:00
namespace hgl
{
namespace graph
{
/**
* <br>
*/
class SceneOrient ///场景定位类
{
protected:
SceneMatrix scene_matrix;
public:
SceneOrient()=default;
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;
virtual void Clear()
{
scene_matrix.Clear();
}
void SetLocalMatrix (const Matrix4f &mat){scene_matrix.SetLocalMatrix(mat);} ///<设置本地矩阵
void SetParentMatrix (const Matrix4f &mat){scene_matrix.SetParentMatrix(mat);} ///<设置上级到世界空间变换矩阵
public:
2024-08-31 00:04:20 +08:00
const uint32 GetLocalToWorldMatrixVersion()const {return scene_matrix.GetNewestVersion();} ///<取得版本号
2024-08-25 04:03:57 +08:00
2024-08-31 00:04:20 +08:00
const Vector3f & GetWorldPosition() const {return scene_matrix.GetWorldPosition();} ///<取得世界坐标
const Matrix4f & GetLocalMatrix ()const {return scene_matrix.GetLocalMatrix();} ///<取得本地矩阵
TransformManager & GetTransform () {return scene_matrix.GetTransform();} ///<取得变换管理器
2019-05-21 21:28:33 +08:00
const Matrix4f & GetLocalToWorldMatrix () {return scene_matrix.GetLocalToWorldMatrix();} ///<取得本地到世界矩阵
const Matrix4f & GetInverseLocalToWorldMatrix () {return scene_matrix.GetInverseLocalToWorldMatrix();}
const Matrix4f & GetInverseTransposeLocalToWorldMatrix () {return scene_matrix.GetInverseTransposeLocalToWorldMatrix();}
2019-05-21 21:28:33 +08:00
public:
virtual void RefreshMatrix();
2019-05-21 21:28:33 +08:00
};//class SceneOrient
}//namespace graph
}//namespace hgl
#endif//HGL_GRAPH_SCENE_ORIENT_INCLUDE