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
# https://stackoverflow.com/questions/39332406/install-libc-on-ubuntu | |
# Adapted for Clang 5.0 | |
sudo apt-get update | |
sudo apt-get install -y clang-5.0 clang-5.0-doc \ | |
libclang-common-5.0-dev libclang-5.0-dev libclang1-5.0 libclang1-5.0-dbg \ | |
libllvm5.0 libllvm5.0-dbg lldb-5.0 llvm-5.0 llvm-5.0-dev llvm-5.0-runtime \ | |
clang-format-5.0 python-clang-5.0 liblldb-5.0-dev lld-5.0 libfuzzer-5.0-dev \ | |
subversion cmake |
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
#include "boost/format.hpp" | |
#include <string> | |
#include <utility> | |
inline auto fmt_r(boost::format & format) -> boost::format & {return format;} | |
template<typename T, typename... Args> | |
auto fmt_r(boost::format & format, T && val, Args &&... args) -> boost::format & { | |
return fmt_r(format % std::forward<T>(val), std::forward<Args>(args)...); | |
} |
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
#include <cstdlib> | |
#include <iostream> | |
#include <iterator> | |
#include "boost/format.hpp" | |
using boost::format; | |
namespace iter { |
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
template<typename T> | |
auto BBox::SlopeTest(const t_ClassifiedRay<T> & ray) const -> bool | |
{ | |
auto && tl = (minExt - ray.origin)*ray.rdir; | |
auto && th = (maxExt - ray.origin)*ray.rdir; | |
auto && tmin = std::min(tl.x, th.x); | |
auto && tmax = std::max(tl.x, th.x); | |
tmin = std::max(tmin, std::min(std::min(tl.y, th.y), tmax)); | |
tmax = std::min(tmax, std::max(std::max(tl.y, th.y), tmin)); |
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
#include <cstdlib> | |
#include <iostream> | |
#include "boost/format.hpp" | |
using boost::format; | |
namespace iter { | |
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
def to_bin(bits) bits.to_s(2).rjust(64, '0') end | |
x = 0xFFFFFFFFFFFFFFFF | |
puts to_bin(x) | |
x = ((x & 0x00000000001FFC00) << 20) | (x & 0x00000000000003FF) | |
puts to_bin(x) | |
x = ((x & 0x000001F8000003E0) << 10) | (x & 0x00000007C000001F) | |
puts to_bin(x) | |
x = ((x & 0x00070006000C0018) << 6) | (x & 0x0000E001C0038007) |
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
#ifndef TEST_DEFS_H | |
#define TEST_DEFS_H | |
#include "flexproto.h" | |
using namespace flexproto; | |
struct Point { | |
int32_t x; | |
int32_t y; |
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
qeg.GenerateFromFaces(faces.size(), vertices.size(), | |
[this](ind_t faceIdx, ind_t & a, ind_t & b, ind_t & c){ | |
auto & face = faces[faceIdx]; | |
a = face.vertices[0]; | |
b = face.vertices[1]; | |
c = face.vertices[2]; | |
} | |
); |
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
{ | |
parts: { | |
test_shape: { | |
shape: union | |
children: [ | |
{shape: sphere, center: [0, 0, 5], radius: 4.5} | |
{shape: sphere, center: [-2, 0,-1], radius: 2.1} | |
{shape: sphere, center: [2, 0,-1], radius: 2.1} | |
] | |
} |
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
// ***************************************************************************** | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2013 Christopher James Huff | |
// https://github.com/cjameshuff/ | |
// | |
// 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 |
NewerOlder