StaticMeshComponent改为MeshComponent

This commit is contained in:
2025-06-15 17:53:15 +08:00
parent ec4125776a
commit 97040176d6
20 changed files with 131 additions and 131 deletions

View File

@@ -13,7 +13,7 @@
#include<hgl/graph/VKVertexInputConfig.h>
#include<hgl/graph/module/TextureManager.h>
#include<hgl/graph/FirstPersonCameraControl.h>
#include<hgl/component/StaticMeshComponent.h>
#include<hgl/component/MeshComponent.h>
using namespace hgl;
using namespace hgl::graph;
@@ -152,8 +152,8 @@ private:
{
SceneNode *scene_root=GetSceneRoot(); //取得缺省场景根节点
CreateComponent<StaticMeshComponent>(scene_root,db->CreateMesh(prim_plane_grid,mi_plane_grid,pipeline_plane_grid));
CreateComponent<StaticMeshComponent>(scene_root,ro_billboard);
CreateComponent<MeshComponent>(scene_root,db->CreateMesh(prim_plane_grid,mi_plane_grid,pipeline_plane_grid));
CreateComponent<MeshComponent>(scene_root,ro_billboard);
CameraControl *camera_control=GetCameraControl();

View File

@@ -5,7 +5,7 @@
#include<hgl/graph/PrimitiveCreater.h>
#include<hgl/graph/VKVertexInputConfig.h>
#include<hgl/graph/mtl/Material2DCreateConfig.h>
#include<hgl/component/StaticMeshComponent.h>
#include<hgl/component/MeshComponent.h>
using namespace hgl;
using namespace hgl::graph;
@@ -83,7 +83,7 @@ private:
rad=deg2rad<double>((360.0f/double(TRIANGLE_NUMBER))*i); //这里一定要加<double>或<float>否则结果用int保存会出现问题
mat=rotate(rad,Vector3f(0,0,1));
CreateComponent<StaticMeshComponent>(mat,scene_root,render_obj);
CreateComponent<MeshComponent>(mat,scene_root,render_obj);
}
return(true);

View File

@@ -5,7 +5,7 @@
#include<hgl/filesystem/FileSystem.h>
#include<hgl/graph/mtl/Material2DCreateConfig.h>
#include<hgl/color/Color.h>
#include<hgl/component/StaticMeshComponent.h>
#include<hgl/component/MeshComponent.h>
using namespace hgl;
using namespace hgl::graph;
@@ -94,7 +94,7 @@ private:
mat=rotate(deg2rad<double>(TRI_ROTATE_ANGLE*i),AxisVector::Z);
CreateComponent<StaticMeshComponent>(mat,scene_root,render_obj[i].mesh);
CreateComponent<MeshComponent>(mat,scene_root,render_obj[i].mesh);
}
return(true);

View File

@@ -5,7 +5,7 @@
#include<hgl/graph/PrimitiveCreater.h>
#include<hgl/graph/mtl/Material2DCreateConfig.h>
#include<hgl/component/StaticMeshComponent.h>
#include<hgl/component/MeshComponent.h>
using namespace hgl;
using namespace hgl::graph;
@@ -90,7 +90,7 @@ private:
if(!mesh_triangle)
return(false);
return CreateComponent<StaticMeshComponent>(GetSceneRoot(),mesh_triangle); //创建一个静态网格组件
return CreateComponent<MeshComponent>(GetSceneRoot(),mesh_triangle); //创建一个静态网格组件
}
public: