Skip to content

Instantly share code, notes, and snippets.

View tiger-tiger's full-sized avatar

Tiger tiger-tiger

  • SHANGHAI
View GitHub Profile
@tiger-tiger
tiger-tiger / funkster.cpp
Created February 8, 2022 13:44 — forked from Sleepingwell/funkster.cpp
A very simple example of holding a C++ class in Python.
#include <Python.h>
struct MyClass {
int val;
MyClass(void) : val(42) {}
};
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
@tiger-tiger
tiger-tiger / PyUtils.cpp
Created January 19, 2022 11:35 — forked from rjzak/PyUtils.cpp
Convert between Python list/tuples and C++ vectors
#include <Python.h> // Must be first
#include <vector>
#include <stdexcept>
#include "PyUtils.h"
using namespace std;
// =====
// LISTS
// =====
//
// Marching Cubes Example Program
// by Cory Bloyd ([email protected])
//
// A simple, portable and complete implementation of the Marching Cubes
// and Marching Tetrahedrons algorithms in a single source file.
// There are many ways that this code could be made faster, but the
// intent is for the code to be easy to understand.
//
// For a description of the algorithm go to