-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,168 additions
and
1,175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.vscode/ | ||
build/ | ||
build-win/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
project(metaball) | ||
set(CMAKE_C_STANDARD 99) | ||
# set(CMAKE_C_STANDARD_REQUIRED TRUE) | ||
|
||
# raylib | ||
find_package(raylib QUIET) | ||
if (NOT raylib_FOUND) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
raylib | ||
GIT_REPOSITORY https://github.com/raysan5/raylib.git | ||
GIT_TAG 4.5.0 | ||
) | ||
FetchContent_MakeAvailable(raylib) | ||
endif() | ||
|
||
message(STATUS "PROJECT_NAME: ${PROJECT_NAME}") | ||
add_executable(${PROJECT_NAME} metaball.c marching_cube.h) | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
project(metaball) | ||
set(CMAKE_C_STANDARD 99) | ||
# set(CMAKE_C_STANDARD_REQUIRED TRUE) | ||
|
||
# raylib | ||
find_package(raylib QUIET) | ||
if (NOT raylib_FOUND) | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
raylib | ||
GIT_REPOSITORY https://github.com/raysan5/raylib.git | ||
GIT_TAG 4.5.0 | ||
) | ||
FetchContent_MakeAvailable(raylib) | ||
endif() | ||
|
||
message(STATUS "PROJECT_NAME: ${PROJECT_NAME}") | ||
add_executable(${PROJECT_NAME} metaball.c marching_cube.h) | ||
target_link_libraries(${PROJECT_NAME} PUBLIC raylib) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Carlos Asensio Martinez <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
MIT License | ||
Copyright (c) 2023 Carlos Asensio Martinez <[email protected]> | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
# Metaballs | ||
![Thumbnail](./thumbnail.png) | ||
|
||
## Description | ||
|
||
This proyect builds a metaball in pure C, uses raylib to render it. | ||
|
||
There are optimizations to be done. | ||
|
||
## TODO | ||
|
||
- ~~Iteration~~. Added a method to visit only valid neighbors. | ||
- ~~Compute the edge values only once~~. A rudimentary cache system is included. | ||
- ~~Add color~~. Added color per ball. | ||
- Add texture mapping. | ||
- Clean code, separate voxel calculation and render code. | ||
- Control, add mouse and keyboard control. | ||
# Metaballs | ||
![Thumbnail](./thumbnail.png) | ||
|
||
## Description | ||
|
||
This proyect builds a metaball in pure C, uses raylib to render it. | ||
|
||
There are optimizations to be done. | ||
|
||
## TODO | ||
|
||
- ~~Iteration~~. Added a method to visit only valid neighbors. | ||
- ~~Compute the edge values only once~~. A rudimentary cache system is included. | ||
- ~~Add color~~. Added color per ball. | ||
- Add texture mapping. | ||
- Clean code, separate voxel calculation and render code. | ||
- Control, add mouse and keyboard control. |
Oops, something went wrong.