2022-03-17 22:33:22 +01:00
|
|
|
#ifndef PROP_MESHER_JOB_STEP_H
|
|
|
|
#define PROP_MESHER_JOB_STEP_H
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
|
2022-08-17 13:45:14 +02:00
|
|
|
#include "core/object/reference.h"
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-10-05 14:35:44 +02:00
|
|
|
#include "modules/modules_enabled.gen.h"
|
|
|
|
|
|
|
|
#ifdef MODULE_MESH_UTILS_ENABLED
|
2022-03-15 13:29:32 +01:00
|
|
|
#include "../../mesh_utils/fast_quadratic_mesh_simplifier.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class PropMesherJobStep : public Reference {
|
|
|
|
GDCLASS(PropMesherJobStep, Reference);
|
|
|
|
|
|
|
|
public:
|
|
|
|
//todo add:
|
|
|
|
//type generate lighting,
|
|
|
|
//type skip (this would leave the mesh empty)
|
|
|
|
//type previous mesh (this would set the previous mesh's rid to the current lod level)
|
|
|
|
enum PropMesherJobStepType {
|
|
|
|
TYPE_NORMAL = 0,
|
|
|
|
TYPE_NORMAL_LOD,
|
|
|
|
TYPE_DROP_UV2,
|
|
|
|
TYPE_MERGE_VERTS,
|
|
|
|
TYPE_BAKE_TEXTURE,
|
|
|
|
TYPE_SIMPLIFY_MESH,
|
|
|
|
TYPE_OTHER,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const String BINDING_STRING_PROP_MESHER_JOB_STEP_TYPE;
|
|
|
|
|
|
|
|
PropMesherJobStepType get_job_type() const;
|
|
|
|
void set_job_type(const PropMesherJobStepType value);
|
|
|
|
|
|
|
|
int get_lod_index() const;
|
|
|
|
void set_lod_index(const int value);
|
|
|
|
|
2022-10-05 14:35:44 +02:00
|
|
|
#ifdef MODULE_MESH_UTILS_ENABLED
|
2022-03-18 03:22:03 +01:00
|
|
|
Ref<FastQuadraticMeshSimplifier> get_fqms();
|
|
|
|
void set_fqms(const Ref<FastQuadraticMeshSimplifier> &val);
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-03-18 03:22:03 +01:00
|
|
|
float get_simplification_step_ratio() const;
|
|
|
|
void set_simplification_step_ratio(const float value);
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-03-18 03:22:03 +01:00
|
|
|
int get_simplification_steps() const;
|
|
|
|
void set_simplification_steps(const int value);
|
2022-03-15 13:29:32 +01:00
|
|
|
|
2022-03-18 03:22:03 +01:00
|
|
|
float get_simplification_agressiveness() const;
|
|
|
|
void set_simplification_agressiveness(const float value);
|
|
|
|
#endif
|
2022-03-15 13:29:32 +01:00
|
|
|
|
|
|
|
PropMesherJobStep();
|
|
|
|
~PropMesherJobStep();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
PropMesherJobStepType _job_type;
|
|
|
|
int _lod_index;
|
|
|
|
|
2022-10-05 14:35:44 +02:00
|
|
|
#ifdef MODULE_MESH_UTILS_ENABLED
|
2022-03-18 03:22:03 +01:00
|
|
|
Ref<FastQuadraticMeshSimplifier> _fqms;
|
|
|
|
float _simplification_step_ratio;
|
|
|
|
int _simplification_steps;
|
|
|
|
float _simplification_agressiveness;
|
|
|
|
#endif
|
2022-03-15 13:29:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
VARIANT_ENUM_CAST(PropMesherJobStep::PropMesherJobStepType);
|
|
|
|
|
|
|
|
#endif
|