Skip to content

Instantly share code, notes, and snippets.

View fesoliveira014's full-sized avatar

Felipe Santos fesoliveira014

View GitHub Profile
@pyrtsa
pyrtsa / gist:2275320
Created April 1, 2012 13:27
C++11 metaprogramming
// Here are a few tricks I've used with the trunk versions of clang and libc++
// with C++11 compilation turned on. Some might be obvious, some not, but at
// least they are some kind of improvement over their C++03 counterparts.
//
// Public domain.
// =============================================================================
// 1) Using variadic class templates recursively, like in the definitions for
// "add<T...>" here:
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
#version 150
uniform sampler2D uTexture;
in VertexData {
noperspective vec3 distance;
vec4 color;
vec2 texcoord;
} vVertexIn;
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active June 5, 2025 06:41
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes.
It's an ever-growing list.
------------------------------
Relevant links:
http://en.wikipedia.org/wiki/Types_of_mesh
http://en.wikipedia.org/wiki/Tetrahedron
http://en.wikipedia.org/wiki/Simplicial_complex
@shadmar
shadmar / QuadTree.cpp
Last active February 21, 2024 19:31
QuadTree implementation in C++ designed for use in spatial applications (maps)
//
// QuadTreeNode.cpp
//
// Created by Tomas Basham on 15/03/2014.
// Copyright (c) 2014 tomasbasham.co.uk. All rights reserved.
//
#include <iostream>
#include "QuadTree.h"
using NG.Coroutines;
using NG.Math;
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Diagnostics;
namespace NG.VoxelMap {
public static class Const {
@S-V
S-V / VoxelGridIterator.h
Last active September 10, 2016 14:51
Uniform Grid Ray Casting
/**
* An iterator for a cubic grid of voxels.
*
* The iterator traverses all voxels along a specified direction starting from
* a given position.
*/
mxBIBREF(
"Ray casting technique described in paper:"
"A Fast Voxel Traversal Algorithm for Ray Tracing - John Amanatides, Andrew Woo [1987]"
"http://www.cse.yorku.ca/~amana/research/grid.pdf"
@pervognsen
pervognsen / BTree.cpp
Created April 24, 2016 20:40
A B+-tree implementation with find, insert and delete in 176 lines of code.
enum { BMAX = 32, BMIN = BMAX / 2, BHEIGHT = 6 };
struct BNode {
uint32_t length;
Key keys[BMAX];
union {
BNode *children[BMAX];
Value values[BMAX];
};
};