Cleanup: Clang tidy, remove typedef
This commit is contained in:
parent
b7b5c23b80
commit
fd1fec5600
|
@ -34,12 +34,12 @@ namespace blender::draw {
|
|||
* Defines how much an edge is visible.
|
||||
* \{ */
|
||||
|
||||
typedef struct MeshExtract_EdgeFac_Data {
|
||||
struct MeshExtract_EdgeFac_Data {
|
||||
uchar *vbo_data;
|
||||
bool use_edge_render;
|
||||
/* Number of loop per edge. */
|
||||
uchar *edge_loop_count;
|
||||
} MeshExtract_EdgeFac_Data;
|
||||
};
|
||||
|
||||
static float loop_edge_factor_get(const float f_no[3],
|
||||
const float v_co[3],
|
||||
|
|
|
@ -30,10 +30,10 @@ namespace blender::draw {
|
|||
/** \name Extract Edit UV Data / Flags
|
||||
* \{ */
|
||||
|
||||
typedef struct MeshExtract_EditUVData_Data {
|
||||
struct MeshExtract_EditUVData_Data {
|
||||
EditLoopData *vbo_data;
|
||||
int cd_ofs;
|
||||
} MeshExtract_EditUVData_Data;
|
||||
};
|
||||
|
||||
static void extract_edituv_data_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
|
|
@ -33,18 +33,18 @@ namespace blender::draw {
|
|||
/** \name Extract Edit UV angle stretch
|
||||
* \{ */
|
||||
|
||||
typedef struct UVStretchAngle {
|
||||
struct UVStretchAngle {
|
||||
int16_t angle;
|
||||
int16_t uv_angles[2];
|
||||
} UVStretchAngle;
|
||||
};
|
||||
|
||||
typedef struct MeshExtract_StretchAngle_Data {
|
||||
struct MeshExtract_StretchAngle_Data {
|
||||
UVStretchAngle *vbo_data;
|
||||
MLoopUV *luv;
|
||||
float auv[2][2], last_auv[2];
|
||||
float av[2][3], last_av[3];
|
||||
int cd_ofs;
|
||||
} MeshExtract_StretchAngle_Data;
|
||||
};
|
||||
|
||||
static void compute_normalize_edge_vectors(float auv[2][2],
|
||||
float av[2][3],
|
||||
|
|
|
@ -30,10 +30,10 @@ namespace blender::draw {
|
|||
/** \name Extract Face-dots Edit UV flag
|
||||
* \{ */
|
||||
|
||||
typedef struct MeshExtract_EditUVFdotData_Data {
|
||||
struct MeshExtract_EditUVFdotData_Data {
|
||||
EditLoopData *vbo_data;
|
||||
int cd_ofs;
|
||||
} MeshExtract_EditUVFdotData_Data;
|
||||
};
|
||||
|
||||
static void extract_fdots_edituv_data_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
|
|
@ -29,11 +29,11 @@ namespace blender::draw {
|
|||
/** \name Extract Face-dots UV
|
||||
* \{ */
|
||||
|
||||
typedef struct MeshExtract_FdotUV_Data {
|
||||
struct MeshExtract_FdotUV_Data {
|
||||
float (*vbo_data)[2];
|
||||
MLoopUV *uv_data;
|
||||
int cd_ofs;
|
||||
} MeshExtract_FdotUV_Data;
|
||||
};
|
||||
|
||||
static void extract_fdots_uv_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
|
|
@ -125,9 +125,9 @@ constexpr MeshExtract create_extractor_lnor()
|
|||
/** \name Extract HQ Loop Normal
|
||||
* \{ */
|
||||
|
||||
typedef struct gpuHQNor {
|
||||
struct gpuHQNor {
|
||||
short x, y, z, w;
|
||||
} gpuHQNor;
|
||||
};
|
||||
|
||||
static void extract_lnor_hq_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
|
|
@ -29,10 +29,10 @@ namespace blender::draw {
|
|||
/** \name Extract Orco
|
||||
* \{ */
|
||||
|
||||
typedef struct MeshExtract_Orco_Data {
|
||||
struct MeshExtract_Orco_Data {
|
||||
float (*vbo_data)[4];
|
||||
float (*orco)[3];
|
||||
} MeshExtract_Orco_Data;
|
||||
};
|
||||
|
||||
static void extract_orco_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
|
|
@ -31,15 +31,15 @@ namespace blender::draw {
|
|||
/** \name Extract Position and Vertex Normal
|
||||
* \{ */
|
||||
|
||||
typedef struct PosNorLoop {
|
||||
struct PosNorLoop {
|
||||
float pos[3];
|
||||
GPUPackedNormal nor;
|
||||
} PosNorLoop;
|
||||
};
|
||||
|
||||
typedef struct MeshExtract_PosNor_Data {
|
||||
struct MeshExtract_PosNor_Data {
|
||||
PosNorLoop *vbo_data;
|
||||
GPUNormal *normals;
|
||||
} MeshExtract_PosNor_Data;
|
||||
};
|
||||
|
||||
static void extract_pos_nor_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
@ -218,15 +218,15 @@ constexpr MeshExtract create_extractor_pos_nor()
|
|||
/** \name Extract Position and High Quality Vertex Normal
|
||||
* \{ */
|
||||
|
||||
typedef struct PosNorHQLoop {
|
||||
struct PosNorHQLoop {
|
||||
float pos[3];
|
||||
short nor[4];
|
||||
} PosNorHQLoop;
|
||||
};
|
||||
|
||||
typedef struct MeshExtract_PosNorHQ_Data {
|
||||
struct MeshExtract_PosNorHQ_Data {
|
||||
PosNorHQLoop *vbo_data;
|
||||
GPUNormal *normals;
|
||||
} MeshExtract_PosNorHQ_Data;
|
||||
};
|
||||
|
||||
static void extract_pos_nor_hq_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
|
|
@ -58,10 +58,10 @@ static void extract_sculpt_data_init(const MeshRenderData *mr,
|
|||
GPU_vertbuf_init_with_format(vbo, &format);
|
||||
GPU_vertbuf_data_alloc(vbo, mr->loop_len);
|
||||
|
||||
typedef struct gpuSculptData {
|
||||
struct gpuSculptData {
|
||||
uint8_t face_set_color[4];
|
||||
float mask;
|
||||
} gpuSculptData;
|
||||
};
|
||||
|
||||
gpuSculptData *vbo_data = (gpuSculptData *)GPU_vertbuf_get_data(vbo);
|
||||
MLoop *loops = (MLoop *)CustomData_get_layer(cd_ldata, CD_MLOOP);
|
||||
|
|
|
@ -29,10 +29,10 @@ namespace blender::draw {
|
|||
/** \name Extract Skin Modifier Roots
|
||||
* \{ */
|
||||
|
||||
typedef struct SkinRootData {
|
||||
struct SkinRootData {
|
||||
float size;
|
||||
float local_pos[3];
|
||||
} SkinRootData;
|
||||
};
|
||||
|
||||
static void extract_skin_roots_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *UNUSED(cache),
|
||||
|
|
|
@ -33,12 +33,12 @@ namespace blender::draw {
|
|||
/** \name Extract Vertex Weight
|
||||
* \{ */
|
||||
|
||||
typedef struct MeshExtract_Weight_Data {
|
||||
struct MeshExtract_Weight_Data {
|
||||
float *vbo_data;
|
||||
const DRW_MeshWeightState *wstate;
|
||||
const MDeformVert *dvert; /* For #Mesh. */
|
||||
int cd_ofs; /* For #BMesh. */
|
||||
} MeshExtract_Weight_Data;
|
||||
};
|
||||
|
||||
static float evaluate_vertex_weight(const MDeformVert *dvert, const DRW_MeshWeightState *wstate)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue