mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-26 07:16:11 +01:00
Merge pull request #34 from roystgnr/instructions_update
File naming, build/run instruction updates
This commit is contained in:
commit
8b5fa15800
29
README.md
29
README.md
@ -27,6 +27,9 @@ Core poly2tri lib:
|
|||||||
|
|
||||||
* Standard Template Library (STL)
|
* Standard Template Library (STL)
|
||||||
|
|
||||||
|
Unit tests:
|
||||||
|
* Boost (filesystem, test framework)
|
||||||
|
|
||||||
Testbed:
|
Testbed:
|
||||||
|
|
||||||
* OpenGL
|
* OpenGL
|
||||||
@ -35,28 +38,32 @@ Testbed:
|
|||||||
Build the library
|
Build the library
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
With the ninja build system installed:
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -GNinja
|
cmake -GNinja ..
|
||||||
cmake --build .
|
cmake --build .
|
||||||
```
|
```
|
||||||
|
|
||||||
Build and run the unit tests
|
Build and run with unit tests
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
With the ninja build system:
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -GNinja -DP2T_BUILD_TESTS=ON
|
cmake -GNinja -DP2T_BUILD_TESTS=ON ..
|
||||||
cmake --build .
|
cmake --build .
|
||||||
ctest --output-on-failure
|
ctest --output-on-failure
|
||||||
```
|
```
|
||||||
|
|
||||||
Build the testbed
|
Build with the testbed
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -GNinja -DP2T_BUILD_TESTBED=ON
|
cmake -GNinja -DP2T_BUILD_TESTBED=ON ..
|
||||||
cmake --build .
|
cmake --build .
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -65,19 +72,19 @@ Running the Examples
|
|||||||
|
|
||||||
Load data points from a file:
|
Load data points from a file:
|
||||||
```
|
```
|
||||||
p2t <filename> <center_x> <center_y> <zoom>
|
build/testbed/p2t <filename> <center_x> <center_y> <zoom>
|
||||||
```
|
```
|
||||||
Random distribution of points inside a constrained box:
|
Random distribution of points inside a constrained box:
|
||||||
```
|
```
|
||||||
p2t random <num_points> <box_radius> <zoom>
|
build/testbed/p2t random <num_points> <box_radius> <zoom>
|
||||||
```
|
```
|
||||||
Examples:
|
Examples:
|
||||||
```
|
```
|
||||||
./build/p2t testbed/data/dude.dat 300 500 2
|
build/testbed/p2t testbed/data/dude.dat 300 500 2
|
||||||
./build/p2t testbed/data/nazca_monkey.dat 0 0 9
|
build/testbed/p2t testbed/data/nazca_monkey.dat 0 0 9
|
||||||
|
|
||||||
./build/p2t random 10 100 5.0
|
build/testbed/p2t random 10 100 5.0
|
||||||
./build/p2t random 1000 20000 0.025
|
build/testbed/p2t random 1000 20000 0.025
|
||||||
```
|
```
|
||||||
|
|
||||||
References
|
References
|
||||||
|
@ -3,11 +3,11 @@ find_package(glfw3 3.3 REQUIRED)
|
|||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
# Build testbed
|
# Build testbed
|
||||||
add_executable(testbed
|
add_executable(p2t
|
||||||
main.cc
|
main.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(testbed
|
target_link_libraries(p2t
|
||||||
PRIVATE
|
PRIVATE
|
||||||
glfw
|
glfw
|
||||||
OpenGL::GL
|
OpenGL::GL
|
||||||
|
Loading…
Reference in New Issue
Block a user