diff --git a/CMCore b/CMCore index 6280ace5..14da0940 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit 6280ace5a5a27edb6dab026be2a323a21dca63d8 +Subproject commit 14da094013b5a33b95f2b24afdf44fb5ba008d40 diff --git a/CMSceneGraph b/CMSceneGraph index 569fc6c9..04a2736b 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 569fc6c9ca5fbba277a70044871f2af045f2c6db +Subproject commit 04a2736bac9fe0b8c9c84d4dedd5e455071e4e64 diff --git a/example/Vulkan/DeferredRenderMultiCmdBuffer.cpp b/example/Vulkan/DeferredRenderMultiCmdBuffer.cpp index fe64a413..115ddbf3 100644 --- a/example/Vulkan/DeferredRenderMultiCmdBuffer.cpp +++ b/example/Vulkan/DeferredRenderMultiCmdBuffer.cpp @@ -404,8 +404,8 @@ public: lights.color = Vector4f(15.0f); lights.radius = 155.0f; - lights.position.x = sin(hgl_rad2deg(timer/100)) * 100.0f; - lights.position.y = cos(hgl_rad2deg(timer/100)) * 100.0f; + lights.position.x = sin(rad2deg(timer/100)) * 100.0f; + lights.position.y = cos(rad2deg(timer/100)) * 100.0f; ubo_lights->Write(&lights); } diff --git a/example/common/VulkanAppFramework.h b/example/common/VulkanAppFramework.h index 0392678f..e9da23a5 100644 --- a/example/common/VulkanAppFramework.h +++ b/example/common/VulkanAppFramework.h @@ -363,9 +363,9 @@ protected: return(true); } - bool OnWheel(int v,int h) + bool OnWheel(int x,int y) { - //camera->Distance(1+(h/1000.0f)); + camera->Distance(y>1.0f?1.1f:0.9f); return(true); } @@ -424,11 +424,10 @@ public: camera->vp_width=w; camera->vp_height=h; - camera->pos=Vector4f(10,10,10,1); + camera->pos=Vector3f(10,10,10); camera_control=new FirstPersonCameraControl(camera); - //camera_control->target=Vector4f(0,0,0,1); camera_control->Refresh(); //更新矩阵计算 ubo_camera_info=db->CreateUBO(sizeof(CameraInfo),&camera->info); diff --git a/src/SceneGraph/InlineGeometry.cpp b/src/SceneGraph/InlineGeometry.cpp index 889cbfb2..ea887d5a 100644 --- a/src/SceneGraph/InlineGeometry.cpp +++ b/src/SceneGraph/InlineGeometry.cpp @@ -74,8 +74,8 @@ namespace hgl { float ang=float(i)/float(rci->round_per-1)*90.0f; - float x=sin(hgl_deg2rad(ang))*radius; - float y=cos(hgl_deg2rad(ang))*radius; + float x=sin(deg2rad(ang))*radius; + float y=cos(deg2rad(ang))*radius; coord[i].x=x; coord[i].y=y; @@ -148,8 +148,8 @@ namespace hgl { float ang=float(i)/float(cci->field_count)*360.0f; - float x=cci->center.x+sin(hgl_deg2rad(ang))*cci->radius.x; - float y=cci->center.y+cos(hgl_deg2rad(ang))*cci->radius.y; + float x=cci->center.x+sin(deg2rad(ang))*cci->radius.x; + float y=cci->center.y+cos(deg2rad(ang))*cci->radius.y; vertex->Write(x,y); @@ -373,7 +373,7 @@ namespace hgl void glusQuaternionRotateRyf(float quaternion[4], const float angle) { - float halfAngleRadian = hgl_deg2rad(angle) * 0.5f; + float halfAngleRadian = deg2rad(angle) * 0.5f; quaternion[0] = 0.0f; quaternion[1] = sin(halfAngleRadian); @@ -383,7 +383,7 @@ namespace hgl void glusQuaternionRotateRzf(float quaternion[4], const float angle) { - float halfAngleRadian = hgl_deg2rad(angle) * 0.5f; + float halfAngleRadian = deg2rad(angle) * 0.5f; quaternion[0] = 0.0f; quaternion[1] = 0.0f;