Skip to content

Instantly share code, notes, and snippets.

View paulhoux's full-sized avatar
🏠
Working from home

Paul Houx paulhoux

🏠
Working from home
View GitHub Profile
@paulhoux
paulhoux / CamAndGridApp.cpp
Last active December 28, 2015 17:29
Shows how to setup a camera, render a grid and control the camera using a mouse.
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
#include "cinder/Camera.h"
#include "cinder/MayaCamUI.h"
using namespace ci;
using namespace ci::app;
using namespace std;
@paulhoux
paulhoux / PointOnSphereApp.cpp
Last active December 22, 2015 08:09
Example of how to place objects at the surface of a sphere with the correct axes. Created in response to https://forum.libcinder.org/#Topic/23286000001779023 .
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
#include "cinder/Camera.h"
#include "cinder/MayaCamUI.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class PointOnSphereApp : public AppNative {
@paulhoux
paulhoux / SignalsApp.cpp
Last active December 20, 2015 00:38
Example of using signals and slots with derived classes. Sample made for Cinder. Simply create an empty Cinder application called "Signals" using TinderBox, then replace the contents of ```SignalsApp.cpp``` with this code.
#define _SCL_SECURE_NO_WARNINGS
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
using namespace std;
//--------------------------
@paulhoux
paulhoux / Frustum.cpp
Created January 15, 2012 03:34
Additions to Cinder to facilitate frustum culling
/*
Copyright (c) 2012, Paul Houx
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
@paulhoux
paulhoux / AppImplMswBasic.cpp
Created November 5, 2011 03:57
Cinder: improved frame rate and low CPU usage on Windows PC's
/*
Copyright (c) 2010, The Barbarian Group
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
@paulhoux
paulhoux / BallisticsIntegrator.as
Created September 27, 2011 10:02
AS3 sample that compares standard Euler integration to the performance of a Runge-Kutta-4 integrator. Based on an article by Glenn Fiedler: http://gafferongames.com/game-physics/integration-basics/ .
package nl.cowlumbus.integrator
{
/** An object with a position, velocity and acceleration. */
public class BallisticsIntegrator extends Object
{
private const force:Number = 10;
private const mass:Number = 1;
private var position:Number = 0;
private var velocity:Number = 0;