-
-
Notifications
You must be signed in to change notification settings - Fork 164
feat region streaming #675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ class Terrain3D : public Node3D { | |
}; | ||
|
||
private: | ||
String _version = "1.1.0-dev"; | ||
String _version = "1.0.0"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't have been changed. |
||
String _data_directory; | ||
bool _is_inside_world = false; | ||
bool _initialized = false; | ||
|
@@ -78,6 +78,10 @@ class Terrain3D : public Node3D { | |
real_t _cull_margin = 0.0f; | ||
bool _free_editor_textures = true; | ||
|
||
// Region Streaming | ||
bool _enable_streaming = false; | ||
int _streaming_rings = 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need these in Terrain3D and Terrain3DData. You can have the alias in the first and the variable in the second. See collision_mode for instance. |
||
|
||
// Mouse cursor | ||
SubViewport *_mouse_vp = nullptr; | ||
Camera3D *_mouse_cam = nullptr; | ||
|
@@ -176,6 +180,16 @@ class Terrain3D : public Node3D { | |
void set_show_instances(const bool p_visible) { _mmi_parent ? _mmi_parent->set_visible(p_visible) : void(); } | ||
bool get_show_instances() const { return _mmi_parent ? _mmi_parent->is_visible() : false; } | ||
|
||
// Region Streaming | ||
void set_enable_streaming(const bool p_enabled); | ||
bool get_enable_streaming() const; | ||
void set_streaming_rings(const int p_rings); | ||
int get_streaming_rings() const; | ||
|
||
// Backward compatibility | ||
void set_streaming_distance(const real_t p_distance); | ||
real_t get_streaming_distance() const; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is newly created, why is it already backwards compatible? |
||
|
||
// Utility | ||
Vector3 get_intersection(const Vector3 &p_src_pos, const Vector3 &p_direction, const bool p_gpu_mode = false); | ||
Ref<Mesh> bake_mesh(const int p_lod, const Terrain3DData::HeightFilter p_filter = Terrain3DData::HEIGHT_FILTER_NEAREST) const; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No distance property has been exposed.