KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
StaticMeshComponent.h
Go to the documentation of this file.
1
9
10#pragma once
11
13#include "Renderer/Mesh.h"
14
15namespace Karma
16{
25 {
27
28 private:
29
35 std::shared_ptr<Mesh> m_StaticMesh;
36
37 public:
43 UStaticMeshComponent(const std::string& name = "StaticMeshComponent");
44
48 virtual ~UStaticMeshComponent();
49
50 // Additional methods and members specific to StaticMeshComponent can be added here.
51
58 void SetStaticMesh(std::shared_ptr<Mesh> staticMesh) { m_StaticMesh = staticMesh; }
59
66 std::shared_ptr<Mesh> GetStaticMesh() const { return m_StaticMesh; }
67 };
68}
#define KARMA_API
Defining Karma's API macro for storage class information.
Definition Core.h:41
#define DECLARE_KARMA_CLASS(TClass, TSuperClass)
Karma's gamecode object class declaration.
Definition GFrameworkMacros.h:45
This file contains the class Mesh and relevant data structures.
Declaration of the MeshComponent class, representing a PrimitiveComponent that handles mesh rendering...
A component that represents a mesh in the game engine, responsible for rendering and managing mesh da...
Definition MeshComponent.h:23
std::shared_ptr< Mesh > GetStaticMesh() const
Gets the static mesh associated with this component.
Definition StaticMeshComponent.h:66
UStaticMeshComponent(const std::string &name="StaticMeshComponent")
Constructor for StaticMeshComponent.
Definition StaticMeshComponent.cpp:5
void SetStaticMesh(std::shared_ptr< Mesh > staticMesh)
Sets the static mesh associated with this component.
Definition StaticMeshComponent.h:58