Skip to content

Instantly share code, notes, and snippets.

@horzelski
horzelski / cstr.cpp
Created April 24, 2020 12:12 — forked from caiorss/cstr.cpp
Python Ctypes wrapper to C++ shared library returning dynamically allocated string buffers
// Compile with:
// $ clang++ cstr.cpp -o cstr.so -std=c++1z -O0 -g -shared -fPIC -std=c++1z
//----------------------------------------------------
#include <iostream>
#include <string>
#include <sstream>
#include <cstring> // std::strncpy
#include <cmath>
#if defined(_WIN32)
@horzelski
horzelski / ezTD_mobuSetup.py
Created March 27, 2017 20:00 — forked from OmniZ3D/ezTD_mobuSetup.py
Easily setup & maintain a standardized pipeline for Animators in MotionBuilder Also helpful when/if a MotionBuilder bug resets the config files. Making a copy of your "..\Documents\MB\[version]\config" directory is recommended to back up your personal preferences.
########################################################################################
## ezTD_mobuSetup.py
## version: 2.0
## Author: Jason Barnidge
## jbarnidge [at] OmniZed.com
## www.OmniZed.com
## Description:
## Easily setup & maintain a standardized pipeline for Animators in MotionBuilder
## Also helpful when/if a MotionBuilder bug resets the config files
########################################################################################
@horzelski
horzelski / GLSL-Noise.md
Created February 16, 2016 14:56 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}