Skip to content

Instantly share code, notes, and snippets.

View Erkaman's full-sized avatar

Eric Arnebäck Erkaman

View GitHub Profile
@alecjacobson
alecjacobson / viewmesh.cpp
Last active January 11, 2019 07:40
Command line program to view 3D meshes from files, standard input and pipes
#include <igl/guess_extension.h>
#include <igl/read_triangle_mesh.h>
#include <igl/viewer/Viewer.h>
#include <Eigen/Core>
#include <iostream>
#include <string>
#include <cstdio>
#include <unistd.h>
int main(int argc, char * argv[])
@MuhAssar
MuhAssar / project.lock.json
Last active June 29, 2016 11:08
This unbelievably-long file is generated for a simple "hello world" program using .NetCore 1.0.0, I just did "dotnet new" followed by "dotnet restore", then BOOM! this behemoth file is generated
{
"locked": false,
"version": 2,
"targets": {
".NETCoreApp,Version=v1.0": {
"Libuv/1.9.0": {
"type": "package",
"dependencies": {
"Microsoft.NETCore.Platforms": "1.0.1"
},
@yomotsu
yomotsu / gist:d845f21e2e1eb49f647f
Last active September 29, 2023 02:13
Intersection AABB - Plane ,Triangle - AABB, sphere - AABB, sphere - sphere, sphere - triangle, in three.js
var collision = {};
// aabb: <THREE.Box3>
// Plane: <THREE.Plane>
collision.isIntersectionAABBPlane = function ( aabb, Plane ) {
var center = new THREE.Vector3().addVectors( aabb.max, aabb.min ).multiplyScalar( 0.5 ),
extents = new THREE.Vector3().subVectors( aabb.max, center );
@roxlu
roxlu / GridDrawer.cpp
Created March 5, 2013 12:42
Probably the most basic example of using Texture Buffer Objects (TBOs) with openGL
#include "GridDrawer.h"
#include "Grid.h"
GridDrawer::GridDrawer(Grid& grid)
:grid(grid)
,grid_prog(0)
,grid_vbo(0)
,grid_vao(0)
,u_projection_matrix(0)
{