Skip to content

Commit

Permalink
fixed everything
Browse files Browse the repository at this point in the history
  • Loading branch information
zigapk committed Sep 23, 2015
1 parent 421d58e commit e6d1f98
Show file tree
Hide file tree
Showing 47 changed files with 96 additions and 3 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified lib/javadrone-api-1.3.jar
100644 → 100755
Empty file.
Empty file modified lib/log4j-1.2.17.jar
100644 → 100755
Empty file.
Empty file modified lib/lwjgl.jar
100644 → 100755
Empty file.
Empty file modified reader_joystick.py
100644 → 100755
Empty file.
Empty file modified reader_oculus.py
100644 → 100755
Empty file.
Empty file modified res/batt_off.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/batt_on.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/font.ttf
100644 → 100755
Empty file.
Empty file modified res/grid.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/h.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/logo2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/off.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/on.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/roll.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/rotate.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified res/speed.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified shaders/fragmentShader.txt
100644 → 100755
Empty file.
Empty file modified shaders/vertexShaderLeft.txt
100644 → 100755
Empty file.
45 changes: 45 additions & 0 deletions shaders/vertexShaderLeft.txt~
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#version 400 core

layout(location = 0) in vec3 coordinates;
layout(location = 1) in vec2 textureCoordinates;

out vec2 pass_textureCoordinates;

vec4 Distort(vec4 p, float BarrelPower) {
float CALIBRATION2 = -0.068731;
float paramA = -0.007715;
float paramC = -0.25;
float paramD = 1.0 - paramA - CALIBRATION2 - paramC;


vec2 v = p.xy / p.w;
// Convert to polar coords:
float radius = length(v);
if (radius > 0) {
float theta = atan(v.y, v.x);

// Distort:
radius = (paramA * radius * radius * radius + CALIBRATION2 * radius * radius + paramC * radius + paramD)
* radius * 0.77;

// Convert back to Cartesian:
v.x = radius * cos(theta);
v.y = radius * sin(theta);
p.xy = v.xy * p.w;
}
return p;
}

void main() {
vec4 P = vec4(coordinates, 1);
P.x += 0.45;

vec4 newPos = Distort(P, 0.9);
newPos.x -= 0.5;
//newPos.y += 0.03;

newPos.x += 0.03;

gl_Position = newPos;
pass_textureCoordinates = textureCoordinates;
}
Empty file modified shaders/vertexShaderRight.txt
100644 → 100755
Empty file.
45 changes: 45 additions & 0 deletions shaders/vertexShaderRight.txt~
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#version 400 core

layout(location = 0) in vec3 coordinates;
layout(location = 1) in vec2 textureCoordinates;

out vec2 pass_textureCoordinates;

vec4 Distort(vec4 p, float BarrelPower) {
float CALIBRATION2 = -0.068731;
float paramA = -0.007715;
float paramC = -0.25;
float paramD = 1.0 - paramA - CALIBRATION2 - paramC;


vec2 v = p.xy / p.w;
// Convert to polar coords:
float radius = length(v);
if (radius > 0) {
float theta = atan(v.y, v.x);

// Distort:
radius = (paramA * radius * radius * radius + CALIBRATION2 * radius * radius + paramC * radius + paramD)
* radius * 0.77;

// Convert back to Cartesian:
v.x = radius * cos(theta);
v.y = radius * sin(theta);
p.xy = v.xy * p.w;
}
return p;
}

void main() {
vec4 P = vec4(coordinates, 1);
P.x -= 0.45;

vec4 newPos = Distort(P, 0.9);
newPos.x += 0.5;
//newPos.y += 0.03;

newPos.x += 0.03;

gl_Position = newPos;
pass_textureCoordinates = textureCoordinates;
}
Empty file modified src/com/sourcegasm/riftvision/Main.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/control/ControlModes.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/control/DroneController.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/control/ExpoController.java
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions src/com/sourcegasm/riftvision/control/MainController.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ public void stopController() {
} catch (final IOException e) {
e.printStackTrace();
}
thread.stop();
thread = null;
if(thread != null){
thread.stop();
thread = null;
}
}

public DroneController getDroneController() {
Expand Down
Empty file modified src/com/sourcegasm/riftvision/control/YawController.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/game/LapTimer.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/math/Euler.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/math/Quaternion.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/opengl/MeshMaker.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/opengl/Model.java
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/com/sourcegasm/riftvision/opengl/OpenGLWindow.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public void init() {
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

//window = glfwCreateWindow(width, height, "RiftVision", glfwGetMonitors().get(1), NULL);
window = glfwCreateWindow(width, height, "RiftVision", glfwGetPrimaryMonitor(), NULL);

if (window == NULL) {
System.err.println("Could not create our Window!");
}
Expand Down
Empty file modified src/com/sourcegasm/riftvision/opengl/ShaderUtils.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/opengl/TextureLoader.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/opengl/Utilities.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/render/OSDRender.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/render/OculusLayerRender.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/render/RenderManager.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/render/SBSBufferedImage.java
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions src/com/sourcegasm/riftvision/sensors/JoyStickSensors.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public void startReceiving() {
e14.printStackTrace();
}
} else if (Integer.parseInt(mami_array[5].trim()) == 1) {
System.out.println("asdf");
droneController.setControlMode(droneController.getNextMode());
} else if (Integer.parseInt(mami_array[4].trim()) == 1) {
droneController.setControlMode(droneController.getPreviousMode());
Expand Down
Empty file modified src/com/sourcegasm/riftvision/sensors/LowPassFilter.java
100644 → 100755
Empty file.
Empty file modified src/com/sourcegasm/riftvision/sensors/OculusSensors.java
100644 → 100755
Empty file.

0 comments on commit e6d1f98

Please sign in to comment.