This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _WIN32 | |
#include <conio.h> // _getch | |
#include <ctype.h> // toupper | |
#include <stdio.h> // printf | |
int main(int argc, char** ) | |
{ | |
printf( "Press F to pay respects: " ); | |
for( ;; ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utility> // std::forward | |
template< typename T, typename... Args > | |
void SetValues( T* t, Args&&... args ) { | |
SetValues( t ); | |
SetValues( std::forward< Args >( args )... ); | |
} | |
template<> void SetValues< int >( int *p ) { *p = 69; } | |
template<> void SetValues< float >( float* p ) { *p = 3.14f; } | |
#include <iostream> // std::cout, std::endl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 430 | |
in vec4 vColor; | |
out vec4 outColor; | |
void main() | |
{ | |
outColor = vColor; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
Memory Manager | |
Nathan Park | |
*/ | |
#include "MemoryManager.h" | |
// #include <new.h> placement new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef PB_PERLIN_H | |
#define PB_PERLIN_H | |
#include "PB_geom.h" | |
#include "PB_texture.h" | |
#include <stdlib.h> | |
#include <math.h> | |
typedef struct PerlinNoise | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****************************************************************************** | |
File: PB_gjk.c | |
Description: this file contains the functions for collision detection using | |
the gjk algorithm. | |
******************************************************************************/ | |
#include "PB_gjk.h" | |
#include "PB_n8math.h" //vector math operations | |
#include "PB_physics_debug_draw.h" //debug draw purposes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2013 Nathan Park | |
// Angelhack in Seattle | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
typedef float Date; | |
const float grams_per_lb = 453.592f; | |
const float lbs_per_gram = 1.0f / grams_per_lb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Nathan Park | |
// | |
// This is my implementation of a programming intership practice test problem | |
// from some company. | |
#include <vector> | |
int getNumberOfPrimes(int N) | |
{ | |
std:vector <int> primes(N, 1); // 0 = prime, 1 means not prime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say you have a coordinate system | |
x axis | |
y axis | |
z axis | |
and a vector v | |
if you think of the coordinates as a vector (say x) and a plane (say yz) | |
v makes a half-angle alpha [0,180] with x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////// | |
// Nathan Park // | |
// August 3, 2013 // | |
//////////////////// | |
#ifndef __ARRAY2D_H_ | |
#define __ARRAY2D_H_ | |
#include <iostream> | |
#include <iomanip> |
NewerOlder