diff options
Diffstat (limited to 'scene/3d/navigation_mesh.h')
-rw-r--r-- | scene/3d/navigation_mesh.h | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/scene/3d/navigation_mesh.h b/scene/3d/navigation_mesh.h index 36fe3ee34b..dd5ed79500 100644 --- a/scene/3d/navigation_mesh.h +++ b/scene/3d/navigation_mesh.h @@ -61,6 +61,87 @@ protected: Array _get_polygons() const; public: + enum SamplePartitionType { + SAMPLE_PARTITION_WATERSHED = 0, + SAMPLE_PARTITION_MONOTONE, + SAMPLE_PARTITION_LAYERS, + SAMPLE_PARTITION_MAX + }; + +protected: + float cell_size; + float cell_height; + float agent_height; + float agent_radius; + float agent_max_climb; + float agent_max_slope; + float region_min_size; + float region_merge_size; + float edge_max_length; + float edge_max_error; + float verts_per_poly; + float detail_sample_distance; + float detail_sample_max_error; + + SamplePartitionType partition_type; + + bool filter_low_hanging_obstacles; + bool filter_ledge_spans; + bool filter_walkable_low_height_spans; + +public: + // Recast settings + void set_sample_partition_type(int p_value); + int get_sample_partition_type() const; + + void set_cell_size(float p_value); + float get_cell_size() const; + + void set_cell_height(float p_value); + float get_cell_height() const; + + void set_agent_height(float p_value); + float get_agent_height() const; + + void set_agent_radius(float p_value); + float get_agent_radius(); + + void set_agent_max_climb(float p_value); + float get_agent_max_climb() const; + + void set_agent_max_slope(float p_value); + float get_agent_max_slope() const; + + void set_region_min_size(float p_value); + float get_region_min_size() const; + + void set_region_merge_size(float p_value); + float get_region_merge_size() const; + + void set_edge_max_length(float p_value); + float get_edge_max_length() const; + + void set_edge_max_error(float p_value); + float get_edge_max_error() const; + + void set_verts_per_poly(float p_value); + float get_verts_per_poly() const; + + void set_detail_sample_distance(float p_value); + float get_detail_sample_distance() const; + + void set_detail_sample_max_error(float p_value); + float get_detail_sample_max_error() const; + + void set_filter_low_hanging_obstacles(bool p_value); + bool get_filter_low_hanging_obstacles() const; + + void set_filter_ledge_spans(bool p_value); + bool get_filter_ledge_spans() const; + + void set_filter_walkable_low_height_spans(bool p_value); + bool get_filter_walkable_low_height_spans() const; + void create_from_mesh(const Ref<Mesh> &p_mesh); void set_vertices(const PoolVector<Vector3> &p_vertices); |