Compare commits
2 Commits
9726d5fecc
...
6a86324f53
| Author | SHA1 | Date | |
|---|---|---|---|
|
6a86324f53
|
|||
|
768a7eaf82
|
20
flake.nix
20
flake.nix
@ -78,6 +78,25 @@ rec {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
octree = stdenv.mkDerivation {
|
||||||
|
pname = "octree";
|
||||||
|
version = "2.5-unstable-2025-12-18";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "attcs";
|
||||||
|
repo = "octree";
|
||||||
|
rev = "5058b3090c8b88e405fe2bfddd6c1c872f2b79d2";
|
||||||
|
hash = "sha256-a/aDGQ7cj1GbCjts2s9VEaxyFnL6PF+xJOsSxm9o+4M=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Header-only library
|
||||||
|
dontBuild = true;
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/include
|
||||||
|
mv ./*.h $out/include/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# ===========================================================================================
|
# ===========================================================================================
|
||||||
# Specify dependencies
|
# Specify dependencies
|
||||||
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
|
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
|
||||||
@ -120,6 +139,7 @@ rec {
|
|||||||
# boost
|
# boost
|
||||||
# sfml
|
# sfml
|
||||||
raylib
|
raylib
|
||||||
|
octree
|
||||||
llvmPackages.openmp # not required for compilation but for clangd to find the headers
|
llvmPackages.openmp # not required for compilation but for clangd to find the headers
|
||||||
# raylib-cpp
|
# raylib-cpp
|
||||||
# tinyobjloader
|
# tinyobjloader
|
||||||
|
|||||||
18
include/util.hpp
Normal file
18
include/util.hpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef __UTIL_HPP_
|
||||||
|
#define __UTIL_HPP_
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <raylib.h>
|
||||||
|
#include <raymath.h>
|
||||||
|
|
||||||
|
inline std::ostream &operator<<(std::ostream &os, const Vector2 &v) {
|
||||||
|
os << "(" << v.x << ", " << v.y << ")";
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::ostream &operator<<(std::ostream &os, const Vector3 &v) {
|
||||||
|
os << "(" << v.x << ", " << v.y << ", " << v.z << ")";
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user