50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "entity/entitybase.h"
|
|
#include "display/mesh/mesh.h"
|
|
|
|
typedef struct {
|
|
mesh_t *mesh;
|
|
} entitymesh_t;
|
|
|
|
/**
|
|
* Initializes the entity mesh component.
|
|
*
|
|
* @param entityId The entity ID.
|
|
* @param componentId The component ID.
|
|
*/
|
|
void entityMeshInit(
|
|
const entityid_t entityId,
|
|
const componentid_t componentId
|
|
);
|
|
|
|
/**
|
|
* Retrieves the mesh associated with the entity mesh component.
|
|
*
|
|
* @param entityId The entity ID.
|
|
* @param componentId The component ID.
|
|
* @return A pointer to the mesh associated with the entity mesh component.
|
|
*/
|
|
mesh_t * entityMeshGetMesh(
|
|
const entityid_t entityId,
|
|
const componentid_t componentId
|
|
);
|
|
|
|
/**
|
|
* Sets the mesh associated with the entity mesh component.
|
|
*
|
|
* @param entityId The entity ID.
|
|
* @param componentId The component ID.
|
|
* @param mesh A pointer to the mesh to associate with the entity mesh component.
|
|
*/
|
|
void entityMeshSetMesh(
|
|
const entityid_t entityId,
|
|
const componentid_t componentId,
|
|
mesh_t *mesh
|
|
); |