123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /*
- * 3D Engine
- * mesh.h:
- * Based on pikuma.com 3D software renderer in C
- * Copyright (c) 2021 986-Studio. All rights reserved.
- *
- * Created by Manoël Trapier on 04/03/2021.
- */
- #ifndef THREEDENGINE_SOURCE_INCLUDE_MESH_H
- #define THREEDENGINE_SOURCE_INCLUDE_MESH_H
- #include <vector.h>
- #include <triangle.h>
- /***********************************************************************************************************************
- * Data types
- **********************************************************************************************************************/
- typedef struct mesh_t
- {
- vec3_t *vertices; /**< List of vertices */
- vec3_t *normalVertices; /**< List of normal vertices */
- tex2_t *textureVertices; /**< List of texture vertices */
- face_t *faces; /**< List of faces */
- vec3_t rotation; /**< Rotation of the object */
- vec3_t scale; /**< Scaling of the object */
- vec3_t translation; /**< Translation of the object */
- } mesh_t;
- /***********************************************************************************************************************
- * Global variables
- **********************************************************************************************************************/
- extern mesh_t mesh;
- /***********************************************************************************************************************
- * Prototypes
- **********************************************************************************************************************/
- void loadCubeMeshData();
- void meshFree();
- void loadOBJFile(const char *filepath);
- #endif /* THREEDENGINE_SOURCE_INCLUDE_MESH_H */
|