Cogs.Core
MeshComponent.h
1#pragma once
2
3#include "Resources/Resources.h"
4
5#include "Foundation/ComponentModel/Component.h"
6
7namespace Cogs
8{
9 namespace Core
10 {
15 {
16 public:
18 static void registerType();
19
30
39 COGSCORE_DLL_API Mesh * getMesh(class Context * context);
40 };
41 }
42}
43
44template<> inline Cogs::StringView getName<Cogs::Core::MeshComponent>() { return "MeshComponent"; }
Base class for Component instances.
Definition: Component.h:143
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Contains a handle to a Mesh resource to use when rendering using the MeshRenderComponent.
Definition: MeshComponent.h:15
MeshHandle meshHandle
Handle to a Mesh resource to use when rendering.
Definition: MeshComponent.h:29
static void registerType()
Register the type in the type system.
COGSCORE_DLL_API Mesh * getMesh(class Context *context)
Utility for getting a pointer to the Mesh instance held by the component.
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Meshes contain streams of vertex data in addition to index data and options defining geometry used fo...
Definition: Mesh.h:265
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.