aboutsummaryrefslogtreecommitdiffstats
path: root/src/chilbert_obj.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-11-07 06:30:02 -0500
committerDavid Robillard <d@drobilla.net>2022-11-07 06:56:07 -0500
commit036c4c1634b2e056da722b21302608ccfe05a298 (patch)
tree75e4a59b169f8012ec542c1fe806224bd5dc08ac /src/chilbert_obj.cpp
parentc002ebc4245e805d7a2a0ddaf2fd9f6ff58d22a4 (diff)
downloadchilbert-036c4c1634b2e056da722b21302608ccfe05a298.tar.gz
chilbert-036c4c1634b2e056da722b21302608ccfe05a298.tar.bz2
chilbert-036c4c1634b2e056da722b21302608ccfe05a298.zip
Build tools
Diffstat (limited to 'src/chilbert_obj.cpp')
-rw-r--r--src/chilbert_obj.cpp40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/chilbert_obj.cpp b/src/chilbert_obj.cpp
deleted file mode 100644
index 76039d0..0000000
--- a/src/chilbert_obj.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2018-2022 David Robillard <d@drobilla.net>
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "chilbert/chilbert.hpp"
-
-#include <array>
-#include <cstdint>
-#include <cstdio>
-#include <cstdlib>
-
-int
-main(int argc, char** argv)
-{
- if (argc != 2) {
- fprintf(stderr, "Usage: %s NUM_POINTS\n", argv[0]);
- return 1;
- }
-
- const unsigned long num_points = std::strtoul(argv[1], nullptr, 10);
- if (num_points == 0 || num_points == ULONG_MAX) {
- fprintf(stderr, "Usage: %s NUM_POINTS\n", argv[0]);
- return 1;
- }
-
- // Vertices
- for (uint64_t i = 0; i < num_points; ++i) {
- std::array<uint32_t, 3> point;
- chilbert::index_to_coords(point, 16, 3, i);
- printf("v %u %u %u\n", point[0], point[1], point[2]);
- }
-
- // One polyline through all vertices
- printf("\nl");
- for (unsigned i = 0; i < num_points - 1; ++i) {
- printf(" %u", i + 1);
- }
- printf("\n");
-
- return 0;
-}