Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…g-Workshop-Examples

Conflicts:
	DMX Sliders/DMX Sliders.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate
	Dimmer/Dimmer.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate
	DimmerPulse/DimmerPulse.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate
	ImageToLights/ImageToLights.xcodeproj/project.xcworkspace/xcuserdata/andreasmuller.xcuserdatad/UserInterfaceState.xcuserstate
  • Loading branch information
andreasmuller committed Aug 13, 2012
2 parents 80da671 + 998cd79 commit 525f57c
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 213 deletions.
2 changes: 2 additions & 0 deletions DMX Sliders/DMX Sliders.xcodeproj/project.pbxproj
Expand Up @@ -474,6 +474,7 @@
"-D__MACOSX_CORE__",
"-lpthread",
);
SDKROOT = macosx10.6;
};
name = Debug;
};
Expand Down Expand Up @@ -503,6 +504,7 @@
"-D__MACOSX_CORE__",
"-lpthread",
);
SDKROOT = macosx10.6;
};
name = Release;
};
Expand Down
52 changes: 2 additions & 50 deletions DMX Sliders/src/testApp.cpp
Expand Up @@ -9,7 +9,8 @@ void testApp::setup()
initSliders16();
initSliders48();

dmxPacketLength = 48 + 1; // the maximum amount of sliders we'll make + 1 as DMX channels start at address 1
// the maximum amount of sliders we'll make + 1 as DMX channels start at address 1
dmxPacketLength = 48 + 1;
dmxPacket = new unsigned char[ dmxPacketLength ];
for( int i = 0; i < dmxPacketLength; i++ ) { dmxPacket[i] = 0; }

Expand Down Expand Up @@ -156,11 +157,6 @@ void testApp::initSliders48()
}


//--------------------------------------------------------------
void testApp::exit()
{

}

//--------------------------------------------------------------
void testApp::keyPressed(int key)
Expand All @@ -184,48 +180,4 @@ void testApp::keyPressed(int key)
break;
}
}
//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y )
{

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button)
{

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button)
{

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button)
{

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h)
{


}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){

}
9 changes: 0 additions & 9 deletions DMX Sliders/src/testApp.h
Expand Up @@ -12,22 +12,13 @@ class testApp : public ofBaseApp
void setup();
void update();
void draw();
void exit();

void showGUI( int _num );

void initSliders16();
void initSliders48();

void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);

void guiEvent(ofxUIEventArgs &e);

Expand Down
4 changes: 4 additions & 0 deletions Dimmer/Dimmer.xcodeproj/project.pbxproj
Expand Up @@ -326,6 +326,7 @@
"-D__MACOSX_CORE__",
"-lpthread",
);
SDKROOT = macosx10.6;
};
name = Debug;
};
Expand Down Expand Up @@ -355,6 +356,7 @@
"-D__MACOSX_CORE__",
"-lpthread",
);
SDKROOT = macosx10.6;
};
name = Release;
};
Expand Down Expand Up @@ -441,6 +443,7 @@
);
PREBINDING = NO;
PRODUCT_NAME = Dimmer;
SDKROOT = macosx10.6;
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand Down Expand Up @@ -527,6 +530,7 @@
);
PREBINDING = NO;
PRODUCT_NAME = Dimmer;
SDKROOT = macosx10.6;
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
Binary file not shown.
71 changes: 6 additions & 65 deletions Dimmer/src/testApp.cpp
Expand Up @@ -7,12 +7,14 @@ void testApp::setup()

ofSetCircleResolution( 50 ); // nicer circles

dmxChannelAmount = DIMMER_POINT_AMOUNT + 1; // the maximum amount of sliders we'll make + 1 as DMX channels start at address 1
// the maximum amount of sliders we'll make + 1 as DMX channels start at address 1
dmxChannelAmount = DIMMER_POINT_AMOUNT + 1;

dmxPacket = new unsigned char[ dmxChannelAmount ];
for( int i = 0; i < dmxChannelAmount; i++ ) { dmxPacket[i] = 0; }

// Set the address, depending on whether we are on OSX or Windows, this might be different on your machine!
// Set the address, depending on whether we are on OSX or Windows,
// this might be different on your machine!
#ifdef TARGET_WIN32
string serialPortAddress = "COM3";
#else
Expand Down Expand Up @@ -41,15 +43,14 @@ void testApp::setup()
dimmerPointAffectionRadius = 160.0f;

mouseX = 0;
mouseY = 0;

mouseY = 0;
}

//--------------------------------------------------------------
void testApp::update()
{

// Check the distance to each point, if we are under 'dimmerPointAffectionRadius'
// Check the distance to each point, if we are closer than 'dimmerPointAffectionRadius'
// then adjust intensity of the light accordingly

for( int i = 0; i < DIMMER_POINT_AMOUNT; i++ )
Expand Down Expand Up @@ -82,7 +83,6 @@ void testApp::update()
//--------------------------------------------------------------
void testApp::draw()
{

for( int i = 0; i < DIMMER_POINT_AMOUNT; i++ )
{
ofSetColor( 255, 255, 255 );
Expand All @@ -105,68 +105,9 @@ void testApp::draw()
}


//--------------------------------------------------------------
void testApp::exit()
{

}

//--------------------------------------------------------------
void testApp::keyPressed(int key)
{
switch (key)
{
case '1':

break;

default:
break;
}
}
//--------------------------------------------------------------
void testApp::keyReleased(int key){

}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y )
{
mouseX = x;
mouseY = y;
}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button)
{

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button)
{

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button)
{

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h)
{


}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){

}
10 changes: 1 addition & 9 deletions Dimmer/src/testApp.h
Expand Up @@ -6,24 +6,16 @@

#define DIMMER_POINT_AMOUNT 4

//--------------------------------------------------------------
class testApp : public ofBaseApp
{
public:

void setup();
void update();
void draw();
void exit();

void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);

int dmxChannelAmount;
unsigned char* dmxPacket;
Expand Down
8 changes: 6 additions & 2 deletions DimmerPulse/DimmerPulse.xcodeproj/project.pbxproj
Expand Up @@ -306,7 +306,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
buildSettings = {
ARCHS = "$(NATIVE_ARCH)";
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
Expand All @@ -326,14 +327,16 @@
"-D__MACOSX_CORE__",
"-lpthread",
);
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
};
name = Debug;
};
E4B69B4F0A3A1720003C02F2 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
buildSettings = {
ARCHS = "$(NATIVE_ARCH)";
ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386";
CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
COPY_PHASE_STRIP = YES;
DEAD_CODE_STRIPPING = YES;
Expand All @@ -355,6 +358,7 @@
"-D__MACOSX_CORE__",
"-lpthread",
);
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
};
name = Release;
};
Expand Down
Binary file not shown.
Expand Up @@ -14,9 +14,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "ofxUISliders.app"
BlueprintName = "DMX Sliders"
ReferencedContainer = "container:ofxUISliders.xcodeproj">
BuildableName = "Dimmer Pulse.app"
BlueprintName = "Dimmer Pulse"
ReferencedContainer = "container:DimmerPulse.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand Down Expand Up @@ -69,9 +69,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "ofxUISliders.app"
BlueprintName = "DMX Sliders"
ReferencedContainer = "container:ofxUISliders.xcodeproj">
BuildableName = "Dimmer Pulse.app"
BlueprintName = "Dimmer Pulse"
ReferencedContainer = "container:DimmerPulse.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
Expand Up @@ -32,9 +32,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "ofxUISliders.app"
BlueprintName = "DMX Sliders"
ReferencedContainer = "container:ofxUISliders.xcodeproj">
BuildableName = "Dimmer Pulse.app"
BlueprintName = "Dimmer Pulse"
ReferencedContainer = "container:DimmerPulse.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
Expand All @@ -51,9 +51,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "ofxUISliders.app"
BlueprintName = "DMX Sliders"
ReferencedContainer = "container:ofxUISliders.xcodeproj">
BuildableName = "Dimmer Pulse.app"
BlueprintName = "Dimmer Pulse"
ReferencedContainer = "container:DimmerPulse.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
Expand All @@ -69,9 +69,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E4B69B5A0A3A1756003C02F2"
BuildableName = "ofxUISliders.app"
BlueprintName = "DMX Sliders"
ReferencedContainer = "container:ofxUISliders.xcodeproj">
BuildableName = "Dimmer Pulse.app"
BlueprintName = "Dimmer Pulse"
ReferencedContainer = "container:DimmerPulse.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down

0 comments on commit 525f57c

Please sign in to comment.