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
### Imports ### | |
# Python | |
import os | |
import logging | |
import math | |
import sys | |
import itertools | |
import random |
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
function DrawAcube(location, scale) | |
newcube = createCube(scale, location); | |
cubert(:,1) = reshape(newcube(:,:,1), 1, 30); | |
cubert(:,2) = reshape(newcube(:,:,2), 1, 30); | |
cubert(:,3) = reshape(newcube(:,:,3), 1, 30); | |
calip = importdata('calibrationpoints.mat'); | |
matrix = Create3DMatrix(calip.XYZ, calip.xy); | |
to2d = cubert * matrix |
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
void Engine::InitSDL(){ | |
//Start SDL | |
if (SDL_Init( SDL_INIT_EVERYTHING ) != 0){ | |
cerr << "SDL_Init() Failed: " << | |
SDL_GetError() << endl; | |
exit(1); | |
} | |
SDL_CreateWindowAndRenderer(res_width_, res_height_, SDL_WINDOW_OPENGL, &window_, &renderer_); |
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
// | |
// Run the game loop | |
// | |
void Engine::Run(){ | |
Loop(); | |
} | |
//========= Privates ==========// |
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 "engine.h" | |
#include <iostream> | |
#include "libs/Matrices.h" | |
#include "utility.h" | |
using std::cout; | |
using std::cerr; |
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
#!/bin/bash | |
W=0 | |
DROP=1 | |
F=2 | |
while getopts ":w:d:f:" opt; do | |
case $opt in | |
w) |
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
#!/usr/bin/env python | |
import sys, os | |
import numpy as np | |
from matplotlib import cm | |
from scipy import ndimage, misc, spatial | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
ENDC = '\033[0m' |
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
#!/usr/bin/env python | |
import sys, os | |
import numpy as np | |
from matplotlib import cm | |
from scipy import ndimage, misc, spatial | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
ENDC = '\033[0m' |
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
IEnumerator Shoot() { | |
while (true) | |
{ | |
Debug.Log("Shoot!"); | |
yield return new WaitForSeconds(1.0f); | |
} | |
} | |
void WalkAwayMan() { | |
Debug.Log("Walking Away"); |
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
public static Sprite GetSpriteWithWordReplaced(Sprite sprite, string word, string replaceBy) | |
{ | |
string assetPath = AssetDatabase.GetAssetPath(sprite); | |
string spriteName = sprite.name; | |
string newName = spriteName.Replace(word, replaceBy); | |
string newPath = assetPath.Replace(word, replaceBy); | |
foreach (Object assetObject in AssetDatabase.LoadAllAssetsAtPath(newPath)) | |
{ | |
Sprite newSprite = assetObject as Sprite; |
OlderNewer