use hgl_cmp<Matrix4f> instead of IsNearlyEqual

This commit is contained in:
hyzboy 2024-08-29 20:25:57 +08:00
parent 7dc4bb9d76
commit 3f37fec8a8
2 changed files with 7 additions and 5 deletions

View File

@ -149,8 +149,8 @@ public:
// root.SetLocalTransform(tm); // root.SetLocalTransform(tm);
//} //}
//root.RefreshMatrix(); root.RefreshMatrix();
//render_list->UpdateLocalToWorld(); render_list->UpdateLocalToWorld();
SceneAppFramework::BuildCommandBuffer(index); SceneAppFramework::BuildCommandBuffer(index);
} }

View File

@ -80,7 +80,8 @@ namespace hgl
void SetLocalMatrix(const Matrix4f &mat) void SetLocalMatrix(const Matrix4f &mat)
{ {
if (IsNearlyEqual(local_matrix,mat)) //if (IsNearlyEqual(local_matrix,mat))
if(!hgl_cmp(local_matrix,mat))
return; return;
local_matrix=mat; local_matrix=mat;
@ -89,7 +90,8 @@ namespace hgl
void SetParentMatrix(const Matrix4f &pm) void SetParentMatrix(const Matrix4f &pm)
{ {
if (IsNearlyEqual(parent_matrix,pm)) //if (IsNearlyEqual(parent_matrix,pm))
if(!hgl_cmp(parent_matrix,pm))
return; return;
parent_matrix=pm; parent_matrix=pm;
@ -101,7 +103,7 @@ namespace hgl
* <br> * <br>
* 3D空间中的位置<br> * 3D空间中的位置<br>
* :<br> * :<br>
* <ul> * * <ul>
* <li>LocalMatrix </li> * <li>LocalMatrix </li>
* <li>LocalToWorldMatrix 使</li> * <li>LocalToWorldMatrix 使</li>
* *