removed mesh_spec

This commit is contained in:
Sandro Sobczyński
2020-10-30 14:50:01 +01:00
parent aa97e471ed
commit 24016ffa7e
11 changed files with 54 additions and 150 deletions
+9 -4
View File
@@ -13,12 +13,14 @@
#include "math/vector3.hpp"
#include "math/plane.hpp"
#include "mesh_spec.hpp"
#include "obj_model.hpp"
#include "dff_model.hpp"
#include "md2_model.hpp"
#include "./mesh_texture.hpp"
#include <tamtypes.h>
#include <draw_types.h>
#include <draw_buffers.h>
#include <draw_sampling.h>
/** Class which have common types for all 3D objects */
class Mesh
@@ -28,7 +30,6 @@ public:
Vector3 position, rotation;
u8 shouldBeLighted, shouldBeBackfaceCulled, shouldBeFrustumCulled;
MeshSpec *spec;
MD2Model *md2;
ObjModel *obj;
DffModel *dff;
@@ -40,9 +41,9 @@ public:
~Mesh();
void loadObj(char *t_subfolder, char *t_objFile, Vector3 &t_initPos, float t_scale, u16 framesAmount);
void setObj(Vector3 &t_initPos, ObjModel *t_objModel, MeshSpec *t_spec);
void setObj(Vector3 &t_initPos, ObjModel *t_objModel);
void loadDff(char *t_subfolder, char *t_dffFile, Vector3 &t_initPos, float t_scale);
void setDff(Vector3 &t_initPos, DffModel *t_dffModel, MeshSpec *t_spec);
void setDff(Vector3 &t_initPos, DffModel *t_dffModel);
void loadMD2(char *t_subfolder, char *t_md2File, Vector3 &t_initPos, float t_scale);
void getMinMax(Vector3 *t_min, Vector3 *t_max);
void playAnimation(u32 t_startFrame, u32 t_endFrame);
@@ -52,8 +53,12 @@ public:
u8 isInFrustum(Plane *t_frustumPlanes);
u8 isMd2Loaded, isObjLoaded, isDffLoaded, isSpecInitialized;
clutbuffer_t clut;
lod_t lod;
MeshTexture *textures;
private:
void setupLodAndClut();
void setDefaultWrapSettings(texwrap_t &t_wrapSettings);
u32 verticesCount;
Vector3 *vertices;
-38
View File
@@ -1,38 +0,0 @@
/*
# ______ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2020, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#ifndef _TYRA_OBJECT3D_SPEC_
#define _TYRA_OBJECT3D_SPEC_
#include "math/vector3.hpp"
#include "./mesh_texture.hpp"
#include <tamtypes.h>
#include <draw_buffers.h>
#include <draw_sampling.h>
/** Class which contain 3D object specification */
class MeshSpec
{
public:
clutbuffer_t clut;
lod_t lod;
MeshSpec();
~MeshSpec();
void allocateMemory();
void setupLodAndClut();
MeshTexture *textures;
private:
};
#endif
-16
View File
@@ -1,16 +0,0 @@
/*
# ______ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2020, tyra - https://github.com/h4570/tyra
# Licenced under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#ifndef _TYRA_TEXTURE_
#define _TYRA_TEXTURE_
#endif