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
glPushMatrix(); | |
glTranslatef(panX, panY, panZ); | |
glRotatef(rvX, 0, 1, 0); // rotate around y | |
glRotatef(rvY, 1, 0, 0); // rotate around x | |
glEnable(GL_TEXTURE_2D); | |
glBindTexture(GL_TEXTURE_2D, (GLuint)mapBalls[i].mapTexture.textureName[0]); | |
gluSphere(sphere, 200, 30, 30); |
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 "ofTexture2D.h" | |
#include "ofUtils.h" // for nextPow2() | |
#include "ofAppRunner.h" // for getWidth() | |
ofTexture2D::ofTexture2D(){ | |
textureName[0] = 0; | |
bFlipTexture = false; | |
textureTarget = GL_TEXTURE_2D; | |
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
package | |
{ | |
import flash.geom.ColorTransform; | |
public class ColorUtil | |
{ | |
/** | |
* RGBColorTransform Create an instance of the information. | |
* @ Param rgb RGB integer value that indicates (0x000000 - 0xFFFFFF) | |
* @ Param amount of fill adaptive value (0.0 - 1.0) | |
* @ Param alpha transparency (0.0 - 1.0) |
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
«Widget Factory» | |
«Eric Mika − Fall 2005» | |
«EXECUTE ALL TO PLAY» | |
[using System | |
System.Windows.Forms | |
System.Drawing | |
Packages.SimpleClasses | |
System.Collections] |
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
«Basic class for game objects Provides: − Basic fields for position and motion | |
− Tracking of what game objects exist in the game − Initialize method − draw and tick generic procedures | |
To customize: | |
− Make sure your game calls [initialize-game-objects] when it starts | |
− Create a new subclass of GameObject − Add an initialize method, if needed Remember to use [call-next-method], if you do. − Add methods for draw and tick | |
» | |
[define all-game-objects “List of all objects currently in play” | |
[new ArrayList]] |
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
if (Serial.available() >= 3) { | |
// read and send stuff | |
// Incoming Packet Has form: | |
// Byte 1: Mic Display Level (0 - 10) | |
// Byte 2: VHS Display Level (0 - 10) | |
// Byte 3: Mix Display Level (0 - 10) | |
setMicLevelBar(Serial.read()); | |
setVHSLevelBar(Serial.read()); | |
setMixLevelBar(Serial.read()); |
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
/* | |
* controlPanel.h | |
* vhsCannon | |
* | |
* Created by Eric Mika on 12/13/10. | |
* Copyright 2010 __MyCompanyName__. All rights reserved. | |
* | |
*/ | |
#pragma once |
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 "controlPanel.h" | |
controlPanel::controlPanel() { | |
// cout << "setting up control panel" << endl; | |
// Set up serial | |
serial.enumerateDevices(); | |
serial.setup("/dev/tty.usbserial-A900aeQz", 115200); | |
bytesReceived = 0; | |
ageOfDeath = 0; |
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
# From webpy / web / wsgiserver / __init__.py | |
"""A high-speed, production ready, thread pooled, generic HTTP server. | |
Simplest example on how to use this module directly | |
(without using CherryPy's application machinery):: | |
from cherrypy import wsgiserver | |
def my_crazy_app(environ, start_response): |
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
private function upload(picture:BitmapData, format:String = JPG):void { | |
var urlLoader:URLLoader = new URLLoader(); | |
// encode image to ByteArray | |
var byteArray:ByteArray; | |
// encode in the requested file format | |
switch (format) { | |
case JPG: | |
// encode as JPG |
OlderNewer