use hgl_cmp<Matrix4f> instead of IsNearlyEqual
This commit is contained in:
parent
7dc4bb9d76
commit
3f37fec8a8
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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>
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user