StaticMeshComponent改为MeshComponent
This commit is contained in:
@@ -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();
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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:
|
||||
|
@@ -7,7 +7,7 @@ VK_NAMESPACE_BEGIN
|
||||
|
||||
class SceneNode;
|
||||
class PrimitiveCreater;
|
||||
class StaticMeshComponent;
|
||||
class MeshComponent;
|
||||
|
||||
constexpr const COLOR gizmo_color[size_t(GizmoColor::RANGE_SIZE)]=
|
||||
{
|
||||
@@ -38,6 +38,6 @@ constexpr const float GIZMO_TWO_AXIS_OFFSET =5.0F;
|
||||
|
||||
Mesh *GetGizmoMesh(const GizmoShape &gs,const GizmoColor &);
|
||||
|
||||
StaticMeshComponent *CreateGizmoStaticMeshComponent(SceneNode *);
|
||||
MeshComponent *CreateGizmoMeshComponent(SceneNode *);
|
||||
|
||||
VK_NAMESPACE_END
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include<hgl/graph/VKVertexInputConfig.h>
|
||||
#include<hgl/graph/FirstPersonCameraControl.h>
|
||||
#include<hgl/color/Color.h>
|
||||
#include<hgl/component/StaticMeshComponent.h>
|
||||
#include<hgl/component/MeshComponent.h>
|
||||
|
||||
using namespace hgl;
|
||||
using namespace hgl::graph;
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
if(!ri)
|
||||
return;
|
||||
|
||||
CreateComponent<StaticMeshComponent>(mat,parent_node,ri);
|
||||
CreateComponent<MeshComponent>(mat,parent_node,ri);
|
||||
}
|
||||
|
||||
bool InitScene()
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#include<hgl/graph/mtl/Material3DCreateConfig.h>
|
||||
#include<hgl/graph/VertexDataManager.h>
|
||||
#include<hgl/graph/VKVertexInputConfig.h>
|
||||
#include<hgl/component/StaticMeshComponent.h>
|
||||
#include<hgl/component/MeshComponent.h>
|
||||
|
||||
using namespace hgl;
|
||||
using namespace hgl::graph;
|
||||
@@ -101,7 +101,7 @@ private:
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
CreateComponent<StaticMeshComponent>(parent_node,ri);
|
||||
CreateComponent<MeshComponent>(parent_node,ri);
|
||||
|
||||
return ri;
|
||||
}
|
||||
|
Reference in New Issue
Block a user