move the white_torus to GizmoRotate
This commit is contained in:
parent
efd9a447fb
commit
bbbd8b06c2
@ -1 +1 @@
|
||||
Subproject commit ef1afa55da2ede0b7d0b6c8efb424e3e11c1c366
|
||||
Subproject commit ae170b717e5960034a2a0e83ba4c00a05023491d
|
@ -1,6 +1,7 @@
|
||||
#include"GizmoResource.h"
|
||||
#include<hgl/graph/VKRenderResource.h>
|
||||
#include<hgl/graph/InlineGeometry.h>
|
||||
#include<hgl/graph/TransformFaceToCamera.h>
|
||||
|
||||
VK_NAMESPACE_BEGIN
|
||||
|
||||
@ -53,6 +54,18 @@ bool InitGizmoRotateStaticMesh()
|
||||
root_node->CreateSubNode(tm,torus[2]);
|
||||
}
|
||||
|
||||
{
|
||||
SceneNode *white_torus=new SceneNode(scale(13),torus[3]);
|
||||
|
||||
white_torus->SetLocalNormal(AxisVector::X);
|
||||
|
||||
TransformFaceToCamera *rotate_white_torus_tfc=new TransformFaceToCamera();
|
||||
|
||||
white_torus->GetTransform().AddTransform(rotate_white_torus_tfc);
|
||||
|
||||
root_node->AddSubNode(white_torus);
|
||||
}
|
||||
|
||||
sm_gizmo_rotate=CreateGizmoStaticMesh(root_node);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include"VulkanAppFramework.h"
|
||||
#include"Gizmo.h"
|
||||
#include<hgl/graph/TransformFaceToCamera.h>
|
||||
#include<hgl/graph/Ray.h>
|
||||
|
||||
using namespace hgl;
|
||||
@ -56,14 +55,11 @@ const Vector3f GizmoPosition(0,0,0);
|
||||
class TestApp:public SceneAppFramework
|
||||
{
|
||||
SceneNode root;
|
||||
SceneNode *rotate_white_torus=nullptr;
|
||||
|
||||
StaticMesh *sm_move=nullptr;
|
||||
StaticMesh *sm_rotate=nullptr;
|
||||
StaticMesh *sm_scale=nullptr;
|
||||
|
||||
Renderable *face_torus=nullptr;
|
||||
|
||||
private:
|
||||
|
||||
bool InitGizmo()
|
||||
@ -75,8 +71,6 @@ private:
|
||||
sm_rotate =GetGizmoRotateStaticMesh();
|
||||
sm_scale =GetGizmoScaleStaticMesh();
|
||||
|
||||
face_torus =GetGizmoRenderable(GizmoShape::Torus,GizmoColor::White);
|
||||
|
||||
return(true);
|
||||
}
|
||||
|
||||
@ -91,18 +85,6 @@ private:
|
||||
root.CreateSubNode(sm_rotate->GetScene());
|
||||
//root.CreateSubNode(sm_scale->GetScene());
|
||||
|
||||
{
|
||||
rotate_white_torus=new SceneNode(scale(13),face_torus);
|
||||
|
||||
rotate_white_torus->SetLocalNormal(AxisVector::X);
|
||||
|
||||
TransformFaceToCamera *rotate_white_torus_tfc=new TransformFaceToCamera(ci);
|
||||
|
||||
rotate_white_torus->GetTransform().AddTransform(rotate_white_torus_tfc);
|
||||
|
||||
root.AddSubNode(rotate_white_torus);
|
||||
}
|
||||
|
||||
root.RefreshMatrix();
|
||||
render_list->SetCamera(ci);
|
||||
render_list->Expend(&root);
|
||||
|
Loading…
x
Reference in New Issue
Block a user