2019-05-21 03:35:07 +00:00
|
|
|
#include <stdint.h>
|
2019-05-24 22:14:09 +00:00
|
|
|
#include <stdbool.h>
|
2019-05-21 03:35:07 +00:00
|
|
|
|
2017-01-26 10:20:30 +00:00
|
|
|
#pragma once
|
2016-11-26 07:15:04 +00:00
|
|
|
|
2019-04-05 11:58:29 +00:00
|
|
|
struct Material;
|
|
|
|
struct ModelData;
|
|
|
|
|
2019-07-12 03:00:36 +00:00
|
|
|
typedef enum {
|
|
|
|
SPACE_LOCAL,
|
|
|
|
SPACE_GLOBAL
|
|
|
|
} CoordinateSpace;
|
|
|
|
|
2019-05-24 22:14:09 +00:00
|
|
|
typedef struct Model Model;
|
|
|
|
Model* lovrModelCreate(struct ModelData* data);
|
2018-02-26 08:59:03 +00:00
|
|
|
void lovrModelDestroy(void* ref);
|
2019-05-24 22:14:09 +00:00
|
|
|
struct ModelData* lovrModelGetModelData(Model* model);
|
2019-05-21 03:35:07 +00:00
|
|
|
void lovrModelDraw(Model* model, float* transform, uint32_t instances);
|
2019-05-24 22:14:09 +00:00
|
|
|
void lovrModelAnimate(Model* model, uint32_t animationIndex, float time, float alpha);
|
2019-07-12 03:00:36 +00:00
|
|
|
void lovrModelGetNodePose(Model* model, uint32_t nodeIndex, float position[4], float rotation[4], CoordinateSpace space);
|
|
|
|
void lovrModelPose(Model* model, uint32_t nodeIndex, float position[4], float rotation[4], float alpha);
|
|
|
|
void lovrModelResetPose(Model* model);
|
2019-08-09 23:10:46 +00:00
|
|
|
struct Material* lovrModelGetMaterial(Model* model, uint32_t material);
|
2019-01-23 18:24:08 +00:00
|
|
|
void lovrModelGetAABB(Model* model, float aabb[6]);
|
2021-02-28 21:58:08 +00:00
|
|
|
void lovrModelGetTriangles(Model* model, float** vertices, uint32_t* vertexCount, uint32_t** indices, uint32_t* indexCount);
|