Marc Gilleron
dff7386186
Moved conversions to conv.h
2022-05-07 20:34:06 +01:00
Marc Gilleron
adbfd3b584
floor_to_int
to emphasize the return value converts to int
2022-05-02 14:49:40 +01:00
Marc Gilleron
6b81e6ac9b
Moved ops to funcs header
2022-04-29 23:27:50 +01:00
Marc Gilleron
a5e429de6f
Moved some Vector3i function specializations to math:: namespace
2022-04-29 23:25:37 +01:00
Marc Gilleron
493b93a051
SDF is now encoded with inorm8 and inorm16
2022-02-26 22:51:29 +00:00
Marc Gilleron
0137ca3036
Namespaced VoxelBuffer in gd::
because it is actually a wrapper
2022-02-15 21:49:20 +00:00
Marc Gilleron
48081faf03
Use real_t
in most utils, use 32-bit floats in meshers.
...
This is a first step to supporting double-precision floats in Godot.
Meshers don't need doubles because vertices, normals and UVs should
never span large enough areas while needing such amount of precision.
Besides, it costs a lot more memory and processing.
2022-02-14 00:11:41 +00:00
Marc Gilleron
f1694b08ec
Remove a few unnecessary usages of the wrapper version of VoxelBuffer
2022-02-03 00:02:10 +00:00
Marc Gilleron
b67ca3d903
Namespaced every registered class
2022-01-09 22:16:44 +00:00
Marc Gilleron
64415a3c86
Configure clang-format to put a newline after template declarations
2022-01-04 22:15:57 +00:00
Marc Gilleron
1d63067b6b
Re-namespaced VoxelToolOps
2022-01-03 23:33:29 +00:00
Marc Gilleron
3eb6641c4f
Namespace edition funcs
2022-01-03 23:26:02 +00:00
Marc Gilleron
e20684ce69
Namespaced math funcs
2022-01-03 23:14:18 +00:00
Marc Gilleron
24e9e36434
Namespace SDF functions
2022-01-03 03:18:58 +00:00
Marc Gilleron
922f361cb0
Made it compile in Godot 4
...
- Made a bunch of changes to comply with Godot 4 API
- Use Godot's Vector3i and add the missing stuff with helper functions
- Transvoxel uses custom attributes API, the old way would not work
- Wrap MeshOptimizer in a unique namespace (see build script why)
- Added clang-format file for the module as some rules now differ
- Prevent thirdparty code and lookup tables from being clang-formatted
- Very likely full of runtime bugs that need fixing
2021-12-13 21:38:10 +00:00
Marc Gilleron
ca7ac42cde
Merge branch 'master' into full_load_mode
...
# Conflicts:
# edition/voxel_tool_lod_terrain.cpp
# generators/graph/voxel_generator_graph.cpp
# terrain/voxel_lod_terrain.cpp
2021-10-31 16:17:27 +00:00
Marc Gilleron
6441d1b864
Deprecate Vector3i(Vector3) constructor, make conversions explicit
...
Some conversions were wrong/unintented.
This is also in prevision of using Godot 4 Vector3i,
which default behavior differs from this module.
2021-10-31 16:01:47 +00:00
Marc Gilleron
c5b0ac43fb
Semi-async do_sphere() implementation. May change though.
...
It is a lot better than the fully synchronous do_sphere(),
but it would be a lot better if we could move everything async
2021-10-04 19:20:36 +01:00
Marc Gilleron
43adf2d6e7
Fix GCC warning
2021-09-25 17:38:36 +01:00
Marc Gilleron
979e5c9c47
VoxelTool.paste now only expects 0xffffffff to turn off masking.
...
Before it was 0xffffffffffffffff, which the GDScript parser no longer
accepts because it is greater than INT64_MAX.
In the future we may rework this API.
2021-09-24 02:09:58 +01:00
Marc Gilleron
2971334e85
Changed VoxelToolLodTerrain to use write_box
...
- Should be faster than get/set_voxel
- No longer expose internal data map
2021-09-17 20:01:15 +01:00
Marc Gilleron
bd696b4caa
Functions that should be const
2021-09-09 18:52:00 +01:00
Marc Gilleron
5fcd7f7363
Added mesh optimization option to Transvoxel, using MeshOptimizer
2021-07-11 16:19:49 +01:00
Marc Gilleron
1ee5bcb80d
Renamed Rect3i -> Box3i
2021-05-31 17:12:04 +01:00
Marc Gilleron
fbb39f6fcc
Added falloff
property to control sharpness of texture painting
2021-05-30 16:28:10 +01:00
Marc Gilleron
74e89b882e
Implemented texture painting on all VoxelTools using faster access to voxels
2021-05-29 23:28:11 +01:00
Marc Gilleron
d2d07904b8
Moved VoxelRaycastResult to its own file
2021-05-29 15:09:10 +01:00
Marc Gilleron
8b017f460f
Basic VoxelTool function to paint textures on buffers
2021-04-25 20:23:14 +01:00
Marc Gilleron
09c815e253
Implemented copy
and paste
for VoxelToolTerrain (untested)
2021-02-21 18:23:56 +00:00
Marc Gilleron
b51897b8df
Added voxel raycast to VoxelToolLodTerrain
...
- Made more precise with an option to use binary search (unoptimized)
- Distance along ray is now available in blocky terrains as well
2021-02-21 03:08:47 +00:00
Marc Gilleron
d1207bdd96
Reorganized some utility files
2021-02-17 20:34:35 +00:00
Marc Gilleron
99723cc006
Merge branch 'master' into instancing
2021-01-25 22:17:46 +00:00
Marc Gilleron
55a38957b5
Added SDF scale to VoxelTool. Default value should work best with default bit depth.
2021-01-24 13:54:38 +00:00
Marc Gilleron
3e510d2e93
get_voxel
may be const
2020-12-30 20:09:31 +00:00
Marc Gilleron
85bb3d7b28
VoxelTerrain can be transformed
2020-10-25 00:55:57 +01:00
Marc Gilleron
7a37770e84
Merge branch 'master' into threading_refactor
...
# Conflicts:
# edition/voxel_tool_terrain.cpp
# terrain/voxel_lod_terrain.cpp
2020-08-30 21:56:44 +01:00
Marc Gilleron
b26fd944a8
Added VoxelTool.copy
declaration, gonna need this in the future
2020-08-30 18:51:20 +01:00
Marc Gilleron
88e6d83652
Comments and formatting
2020-08-29 22:58:33 +01:00
Marc Gilleron
e30a3f51d6
Expose VoxelTool.is_area_editable()
2020-08-24 13:51:08 +01:00
Marc Gilleron
1a551fc77d
Added support for per-voxel and per-block metadata
2020-08-10 19:03:01 +01:00
Marc Gilleron
1c6404efa5
Allow to use collision mask when raycasting blocky voxels
2020-08-06 19:58:36 +01:00
Marc Gilleron
47a6426a12
Fix 64-bit usage in VoxelTool
2020-08-06 19:54:47 +01:00
Marc Gilleron
0ac1b7e6dc
Moved edition-related classes to a sub-folder
2020-01-26 20:29:44 +00:00