add new construct function of SceneOrient

This commit is contained in:
2021-06-10 18:55:40 +08:00
parent 40784b7bdf
commit 2180dff6f8
2 changed files with 9 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ namespace hgl
public:
SceneOrient();
SceneOrient(const Matrix4f &mat);
virtual ~SceneOrient()=default;
Matrix4f & SetLocalMatrix (const Matrix4f &); ///<设定当前节点矩阵

View File

@@ -3,8 +3,6 @@ namespace hgl
{
namespace graph
{
Matrix4f Ortho2DMatrix; ///<全局2D视图矩阵
SceneOrient::SceneOrient()
{
LocalMatrix =Matrix4f::identity;
@@ -13,6 +11,14 @@ namespace hgl
InverseLocalToWorldMatrix =Matrix4f::identity;
}
SceneOrient::SceneOrient(const Matrix4f &mat)
{
SetLocalMatrix(mat);
LocalToWorldMatrix =Matrix4f::identity;
InverseLocalToWorldMatrix =Matrix4f::identity;
}
Matrix4f &SceneOrient::SetLocalMatrix(const Matrix4f &m)
{
LocalMatrix=m;