2
3
4
5
9#include "Render/FrameInfo.h"
10#include "World/Entity.h"
19
20
21 std::shared_ptr<
CubePack> pack = std::make_shared<CubePack>(2, 2);
24 m_Mesh = Mesh::Builder().AddPack(pack).Build();
48 auto e = FrameInfo::Get().m_World->QueryEntitybyID((uint32_t)m_Owner);
50 m_Mesh->GetPacks().for_each([&](
const auto& k,
const auto& v) {
51 v->SetMaterial(materialPath);
52 v->GetMeshDesc().UpdatemodelAddress(e.GetComponent<TransformComponent>().GetModelBufferAddress());
53 v->GetMeshDesc().UpdateentityID((uint32_t)m_Owner);
#define SPICES_PROFILE_ZONE
CubePack Class. This class defines box type mesh pack.
virtual void DrawThis() override
This interface defines how to draw this component to property panel.
MeshComponent Class. This class defines the specific behaves of MeshComponent.
virtual void DrawThis() override
This interface defines how to draw this component to property panel.
SkyBoxComponent()
Constructor Function.
virtual void OnDeSerialize() override
This interface defines how to deserialize.
virtual void OnSerialize() override
This interface defines how to serialize.
void SetMaterial(const std::string &materialPath)
Set SkyBox Material.
SkyBoxComponent Class. This class defines the specific behaves of SkyBoxComponent.