Roi Atalla avatar Roi Atalla committed f147fa7

Well the good news is that 8.2 is ported. The bad news is that it's misbehaving. If you run 'tutorials.jar' in the 'files' directory and go to II -> 8 -> QuaternionYPR while running 8.2, you'll see the difference in input handling. :/

Comments (0)

Files changed (6)

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example2/Example8_2.java

+package com.ra4king.opengl.arcsynthesis.gl33.chapter8.example2;
+
+import static org.lwjgl.opengl.GL11.*;
+import static org.lwjgl.opengl.GL20.*;
+
+import org.lwjgl.input.Keyboard;
+
+import com.ra4king.opengl.GLProgram;
+import com.ra4king.opengl.util.Mesh;
+import com.ra4king.opengl.util.ShaderProgram;
+import com.ra4king.opengl.util.math.Matrix4;
+import com.ra4king.opengl.util.math.MatrixStack;
+import com.ra4king.opengl.util.math.Quaternion;
+import com.ra4king.opengl.util.math.Vector3;
+
+public class Example8_2 extends GLProgram {
+	public static void main(String[] args) {
+		new Example8_2().run(true);
+	}
+	
+	private ShaderProgram program;
+	
+	private int modelToClipMatrixUniform;
+	private int cameraToClipMatrixUniform;
+	private int baseColorUniform;
+	
+	private Mesh ship;
+	
+	private Quaternion orientation;
+	
+	private boolean rightMultiply = true;
+	
+	public Example8_2() {
+		super("Example 8.2", 500, 500, true);
+	}
+	
+	@Override
+	public void init() {
+		glClearColor(0,0,0,0);
+		glClearDepth(1);
+		
+		program = new ShaderProgram(readFromFile("example8.2.vert"), readFromFile("example8.2.frag"));
+		
+		modelToClipMatrixUniform = glGetUniformLocation(program.getProgram(), "modelToCameraMatrix");
+		cameraToClipMatrixUniform = glGetUniformLocation(program.getProgram(), "cameraToClipMatrix");
+		baseColorUniform = glGetUniformLocation(program.getProgram(), "baseColor");
+		
+		try {
+			ship = new Mesh(getClass().getResource("example8.2.Ship.xml"));
+		}
+		catch(Exception exc) {
+			exc.printStackTrace();
+			destroy();
+		}
+		
+		orientation = new Quaternion();
+		
+		glEnable(GL_CULL_FACE);
+		glCullFace(GL_BACK);
+		glFrontFace(GL_CW);
+		
+		glEnable(GL_DEPTH_TEST);
+		glDepthMask(true);
+		glDepthFunc(GL_LEQUAL);
+		glDepthRange(0, 1);
+	}
+	
+	@Override
+	public void resized() {
+		super.resized();
+		
+		program.begin();
+		glUniformMatrix4(cameraToClipMatrixUniform, false, new Matrix4().clearToPerspectiveDeg(20, getWidth(), getHeight(), 1, 600).getBuffer());
+		program.end();
+	}
+	
+	private void offsetOrientation(Vector3 axis, float angle) {
+		angle = angle * (float)Math.PI / 180;
+		
+		axis.normalize();
+		System.out.println(axis.x() + " " + axis.y() + " " + axis.z());
+		axis.mul((float)Math.sin(angle/2));
+		
+		Quaternion offset = new Quaternion(axis.x(), axis.y(), axis.z(), (float)Math.cos(angle/2));
+		
+		if(rightMultiply)
+			orientation = orientation.mult(offset);
+		else
+			orientation = offset.mult(orientation);
+		
+		orientation.normalize();
+	}
+	
+	@Override
+	public void update(long deltaTime) {
+		float speed = 90 * deltaTime / (float)1e9;
+		
+		if(Keyboard.isKeyDown(Keyboard.KEY_W))
+			offsetOrientation(new Vector3(1, 0, 0), speed);
+		if(Keyboard.isKeyDown(Keyboard.KEY_S))
+			offsetOrientation(new Vector3(1, 0, 0), -speed);
+		
+		if(Keyboard.isKeyDown(Keyboard.KEY_A))
+			offsetOrientation(new Vector3(0, 0, 1), speed);
+		if(Keyboard.isKeyDown(Keyboard.KEY_D))
+			offsetOrientation(new Vector3(0, 0, 1), -speed);
+		
+		if(Keyboard.isKeyDown(Keyboard.KEY_Q))
+			offsetOrientation(new Vector3(0, 1, 0), speed);
+		if(Keyboard.isKeyDown(Keyboard.KEY_E))
+			offsetOrientation(new Vector3(0, 1, 0), -speed);
+	}
+	
+	@Override
+	public void keyPressed(int key, char c, long nanos) {
+		if(key == Keyboard.KEY_SPACE) {
+			rightMultiply = !rightMultiply;
+			System.out.println(rightMultiply ? "Right-multiply" : "Left-multiply");
+		}
+	}
+	
+	@Override
+	public void render() {
+		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+		
+		MatrixStack stack = new MatrixStack();
+		stack.getTop().translate(0, 0, -200).mult(orientation.getMatrix());
+		
+		program.begin();
+		stack.getTop().scale(3, 3, 3).rotateDeg(-90, 1, 0, 0);
+		
+		glUniform4f(baseColorUniform, 1, 1, 1, 1);
+		glUniformMatrix4(modelToClipMatrixUniform, false, stack.getTop().getBuffer());
+		
+		ship.render("tint");
+		
+		program.end();
+	}
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example2/example8.2.Ship.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<?oxygen RNGSchema="../../Documents/meshFormat.rnc" type="compact"?>
+
+<mesh xmlns="http://www.arcsynthesis.com/gltut/mesh" >
+	<attribute index="0" type="float" size="3" >
+		0 0 5.486261 
+		0 1 4.091465 
+		0.7365548 0.7365548 4.091465 
+		-0.7365548 0.7365548 4.091465 
+		0 1 4.091465 
+		0 0 5.486261 
+		0.7365548 0.7365548 4.091465 
+		0.8 0 5.091465 
+		0 0 5.486261 
+		-0.7365548 0.7365548 4.091465 
+		0 0 5.486261 
+		-0.8 0 5.091465 
+		1 0 4.091465 
+		0.8 0 5.091465 
+		0.7365548 0.7365548 4.091465 
+		-0.7365548 0.7365548 4.091465 
+		-0.8 0 5.091465 
+		-1 0 4.091465 
+		0 0 4.091465 
+		0.8 0 5.091465 
+		1 0 4.091465 
+		-1 0 4.091465 
+		-0.8 0 5.091465 
+		0 0 4.091465 
+		0 0 4.091465 
+		0 0 5.486261 
+		0.8 0 5.091465 
+		-0.8 0 5.091465 
+		0 0 5.486261 
+		0 0 4.091465 
+		-0.7365548 0.7365548 4.091465 
+		-0.7365548 0.7365548 4.091465 
+		0 1 4.091465 
+		-0.7365548 0.7365548 4.091465 
+		-0.7365548 0.7365548 4.091465 
+		-1 0 4.091465 
+		0 1.845113 -1.908402 
+		1.188213 1.188213 -1.908402 
+		0 1 4.091465 
+		0 1 4.091465 
+		-1.188213 1.188213 -1.908402 
+		0 1.845113 -1.908402 
+		0.7365548 0.7365548 4.091465 
+		1.094106 0.5941064 1.091532 
+		1 0 4.091465 
+		-1 0 4.091465 
+		-1.094106 0.5941064 1.091532 
+		-0.7365548 0.7365548 4.091465 
+		1.516663 0.2699136 -1.908402 
+		1.094106 0.5941064 1.091532 
+		1.188213 1.188213 -1.908402 
+		-1.188213 1.188213 -1.908402 
+		-1.094106 0.5941064 1.091532 
+		-1.516663 0.2699136 -1.908402 
+		1.845113 -0.6483857 -1.908402 
+		1.422557 -0.3241928 1.091532 
+		1.516663 0.2699136 -1.908402 
+		-1.516663 0.2699136 -1.908402 
+		-1.422557 -0.3241928 1.091532 
+		-1.845113 -0.6483857 -1.908402 
+		1.094106 0.5941064 1.091532 
+		1.516663 0.2699136 -1.908402 
+		2.904993 0.4069349 -0.2403131 
+		-2.904993 0.4069349 -0.2403131 
+		-1.516663 0.2699136 -1.908402 
+		-1.094106 0.5941064 1.091532 
+		1.094106 0.5941064 1.091532 
+		2.904993 0.4069349 -0.2403131 
+		2.755336 0.5183109 1.252996 
+		-2.755336 0.5183109 1.252996 
+		-2.904993 0.4069349 -0.2403131 
+		-1.094106 0.5941064 1.091532 
+		1.516663 0.2699136 -1.908402 
+		3.05465 0.1929539 -1.733622 
+		2.904993 0.4069349 -0.2403131 
+		-2.904993 0.4069349 -0.2403131 
+		-3.05465 0.1929539 -1.733622 
+		-1.516663 0.2699136 -1.908402 
+		1.516663 0.2699136 -1.908402 
+		1.422557 -0.3241928 1.091532 
+		2.902689 -0.03290349 -0.2282143 
+		-2.902689 -0.03290349 -0.2282143 
+		-1.422557 -0.3241928 1.091532 
+		-1.516663 0.2699136 -1.908402 
+		1.516663 0.2699136 -1.908402 
+		2.902689 -0.03290349 -0.2282143 
+		3.05465 0.1929539 -1.733622 
+		-3.05465 0.1929539 -1.733622 
+		-2.902689 -0.03290349 -0.2282143 
+		-1.516663 0.2699136 -1.908402 
+		1.422557 -0.3241928 1.091532 
+		2.750729 -0.2587609 1.277193 
+		2.902689 -0.03290349 -0.2282143 
+		-2.902689 -0.03290349 -0.2282143 
+		-2.750729 -0.2587609 1.277193 
+		-1.422557 -0.3241928 1.091532 
+		1.422557 -0.3241928 1.091532 
+		1.094106 0.5941064 1.091532 
+		2.753033 0.2287188 1.265094 
+		-2.753033 0.2287188 1.265094 
+		-1.094106 0.5941064 1.091532 
+		-1.422557 -0.3241928 1.091532 
+		1.422557 -0.3241928 1.091532 
+		2.753033 0.2287188 1.265094 
+		2.750729 -0.2587609 1.277193 
+		-2.750729 -0.2587609 1.277193 
+		-2.753033 0.2287188 1.265094 
+		-1.422557 -0.3241928 1.091532 
+		1.094106 0.5941064 1.091532 
+		2.755336 0.5183109 1.252996 
+		2.753033 0.2287188 1.265094 
+		-2.753033 0.2287188 1.265094 
+		-2.755336 0.5183109 1.252996 
+		-1.094106 0.5941064 1.091532 
+		2.902689 -0.03290349 -0.2282143 
+		2.750729 -0.2587609 1.277193 
+		2.753033 0.2287188 1.265094 
+		-2.753033 0.2287188 1.265094 
+		-2.750729 -0.2587609 1.277193 
+		-2.902689 -0.03290349 -0.2282143 
+		2.904993 0.4069349 -0.2403131 
+		2.753033 0.2287188 1.265094 
+		2.755336 0.5183109 1.252996 
+		-2.755336 0.5183109 1.252996 
+		-2.753033 0.2287188 1.265094 
+		-2.904993 0.4069349 -0.2403131 
+		3.05465 0.1929539 -1.733622 
+		2.902689 -0.03290349 -0.2282143 
+		2.904993 0.4069349 -0.2403131 
+		-2.904993 0.4069349 -0.2403131 
+		-2.902689 -0.03290349 -0.2282143 
+		-3.05465 0.1929539 -1.733622 
+		4.670839 0.2244458 1.458042 
+		4.822799 0.4503033 -0.04736506 
+		4.820496 -0.03717672 -0.03526628 
+		-4.820496 -0.03717672 -0.03526628 
+		-4.822799 0.4503033 -0.04736506 
+		-4.670839 0.2244458 1.458042 
+		1.516663 0.2699136 -1.908402 
+		0 -0.6483857 -1.908402 
+		1.845113 -0.6483857 -1.908402 
+		-1.845113 -0.6483857 -1.908402 
+		0 -0.6483857 -1.908402 
+		-1.516663 0.2699136 -1.908402 
+		1.516663 0.2699136 -1.908402 
+		1.188213 1.188213 -1.908402 
+		0 1.845113 -1.908402 
+		0 1.845113 -1.908402 
+		-1.188213 1.188213 -1.908402 
+		-1.516663 0.2699136 -1.908402 
+		0 -0.6483857 -1.908402 
+		1.516663 0.2699136 -1.908402 
+		0 1.845113 -1.908402 
+		0 1.845113 -1.908402 
+		-1.516663 0.2699136 -1.908402 
+		0 -0.6483857 -1.908402 
+		0 1 4.091465 
+		0.9623838 0.9623838 1.091532 
+		0.7365548 0.7365548 4.091465 
+		-0.7365548 0.7365548 4.091465 
+		-0.9623838 0.9623838 1.091532 
+		0 1 4.091465 
+		0 1 4.091465 
+		1.188213 1.188213 -1.908402 
+		0.9623838 0.9623838 1.091532 
+		-0.9623838 0.9623838 1.091532 
+		-1.188213 1.188213 -1.908402 
+		0 1 4.091465 
+		1.094106 0.5941064 1.091532 
+		0.9623838 0.9623838 1.091532 
+		1.188213 1.188213 -1.908402 
+		-1.188213 1.188213 -1.908402 
+		-0.9623838 0.9623838 1.091532 
+		-1.094106 0.5941064 1.091532 
+		1.094106 0.5941064 1.091532 
+		0.7365548 0.7365548 4.091465 
+		0.9623838 0.9623838 1.091532 
+		-0.9623838 0.9623838 1.091532 
+		-0.7365548 0.7365548 4.091465 
+		-1.094106 0.5941064 1.091532 
+		1.845113 -0.6483857 -1.908402 
+		0.7112783 -0.4862892 -0.4084351 
+		1.422557 -0.3241928 1.091532 
+		-1.422557 -0.3241928 1.091532 
+		-0.7112783 -0.4862892 -0.4084351 
+		-1.845113 -0.6483857 -1.908402 
+		1.845113 -0.6483857 -1.908402 
+		0 -0.6483857 -1.908402 
+		0.7112783 -0.4862892 -0.4084351 
+		-0.7112783 -0.4862892 -0.4084351 
+		0 -0.6483857 -1.908402 
+		-1.845113 -0.6483857 -1.908402 
+		1.211278 -0.1620964 2.591498 
+		1.422557 -0.3241928 1.091532 
+		0.7112783 -0.4862892 -0.4084351 
+		-0.7112783 -0.4862892 -0.4084351 
+		-1.422557 -0.3241928 1.091532 
+		-1.211278 -0.1620964 2.591498 
+		0.7112783 -0.4862892 -0.4084351 
+		0.5 -0.3241928 1.091532 
+		1.211278 -0.1620964 2.591498 
+		-1.211278 -0.1620964 2.591498 
+		-0.5 -0.3241928 1.091532 
+		-0.7112783 -0.4862892 -0.4084351 
+		0.5 -0.3241928 1.091532 
+		0.7112783 -0.4862892 -0.4084351 
+		0 -0.6483857 -1.908402 
+		0 -0.6483857 -1.908402 
+		-0.7112783 -0.4862892 -0.4084351 
+		-0.5 -0.3241928 1.091532 
+		1.094106 0.5941064 1.091532 
+		1.211278 -0.1620964 2.591498 
+		1 0 4.091465 
+		-1 0 4.091465 
+		-1.211278 -0.1620964 2.591498 
+		-1.094106 0.5941064 1.091532 
+		1.094106 0.5941064 1.091532 
+		1.422557 -0.3241928 1.091532 
+		1.211278 -0.1620964 2.591498 
+		-1.211278 -0.1620964 2.591498 
+		-1.422557 -0.3241928 1.091532 
+		-1.094106 0.5941064 1.091532 
+		0.75 -0.1620964 2.591498 
+		0.5 -0.3241928 1.091532 
+		0.25 -0.1620964 2.591498 
+		-0.25 -0.1620964 2.591498 
+		-0.5 -0.3241928 1.091532 
+		-0.75 -0.1620964 2.591498 
+		0.25 -0.1620964 2.591498 
+		1 0 4.091465 
+		0.75 -0.1620964 2.591498 
+		-0.75 -0.1620964 2.591498 
+		-1 0 4.091465 
+		-0.25 -0.1620964 2.591498 
+		1.211278 -0.1620964 2.591498 
+		0.75 -0.1620964 2.591498 
+		1 0 4.091465 
+		-1 0 4.091465 
+		-0.75 -0.1620964 2.591498 
+		-1.211278 -0.1620964 2.591498 
+		1.211278 -0.1620964 2.591498 
+		0.5 -0.3241928 1.091532 
+		0.75 -0.1620964 2.591498 
+		-0.75 -0.1620964 2.591498 
+		-0.5 -0.3241928 1.091532 
+		-1.211278 -0.1620964 2.591498 
+		0.5 -0.3241928 1.091532 
+		0.125 -0.405241 0.3415482 
+		0.25 -0.1620964 2.591498 
+		-0.25 -0.1620964 2.591498 
+		-0.125 -0.405241 0.3415482 
+		-0.5 -0.3241928 1.091532 
+		0.5 -0.3241928 1.091532 
+		0 -0.6483857 -1.908402 
+		0.125 -0.405241 0.3415482 
+		-0.125 -0.405241 0.3415482 
+		0 -0.6483857 -1.908402 
+		-0.5 -0.3241928 1.091532 
+		0 -0.3241928 1.091532 
+		0.25 -0.1620964 2.591498 
+		0.125 -0.405241 0.3415482 
+		-0.125 -0.405241 0.3415482 
+		-0.25 -0.1620964 2.591498 
+		0 -0.3241928 1.091532 
+		0 -0.3241928 1.091532 
+		0.125 -0.405241 0.3415482 
+		0 -0.6483857 -1.908402 
+		0 -0.6483857 -1.908402 
+		-0.125 -0.405241 0.3415482 
+		0 -0.3241928 1.091532 
+		-2.753033 0.2287188 1.265094 
+		-2.902689 -0.03290349 -0.2282143 
+		-4.820496 -0.03717672 -0.03526628 
+		-4.670839 0.2244458 1.458042 
+		-2.753033 0.2287188 1.265094 
+		-4.820496 -0.03717672 -0.03526628 
+		4.820496 -0.03717672 -0.03526628 
+		2.902689 -0.03290349 -0.2282143 
+		2.753033 0.2287188 1.265094 
+		4.670839 0.2244458 1.458042 
+		4.820496 -0.03717672 -0.03526628 
+		2.753033 0.2287188 1.265094 
+		-4.820496 -0.03717672 -0.03526628 
+		-2.904993 0.4069349 -0.2403131 
+		-4.822799 0.4503033 -0.04736506 
+		-4.820496 -0.03717672 -0.03526628 
+		-2.902689 -0.03290349 -0.2282143 
+		-2.904993 0.4069349 -0.2403131 
+		4.820496 -0.03717672 -0.03526628 
+		2.904993 0.4069349 -0.2403131 
+		2.902689 -0.03290349 -0.2282143 
+		4.820496 -0.03717672 -0.03526628 
+		4.822799 0.4503033 -0.04736506 
+		2.904993 0.4069349 -0.2403131 
+		-2.904993 0.4069349 -0.2403131 
+		-2.753033 0.2287188 1.265094 
+		-4.670839 0.2244458 1.458042 
+		-4.822799 0.4503033 -0.04736506 
+		-2.904993 0.4069349 -0.2403131 
+		-4.670839 0.2244458 1.458042 
+		4.670839 0.2244458 1.458042 
+		2.753033 0.2287188 1.265094 
+		2.904993 0.4069349 -0.2403131 
+		4.822799 0.4503033 -0.04736506 
+		4.670839 0.2244458 1.458042 
+		2.904993 0.4069349 -0.2403131 
+		0 -0.1620964 2.591498 
+		-1 0 4.091465 
+		0 0 4.091465 
+		0 0 4.091465 
+		0.25 -0.1620964 2.591498 
+		0 -0.1620964 2.591498 
+		0.25 -0.1620964 2.591498 
+		0 0 4.091465 
+		1 0 4.091465 
+		0 -0.3241928 1.091532 
+		0 -0.1620964 2.591498 
+		0.25 -0.1620964 2.591498 
+		-1 0 4.091465 
+		0 -0.1620964 2.591498 
+		-0.25 -0.1620964 2.591498 
+		0 -0.3241928 1.091532 
+		-0.25 -0.1620964 2.591498 
+		0 -0.1620964 2.591498 
+		0.25 -0.1620964 2.591498 
+		0.25 -0.1620964 2.591498 
+		1 0 4.091465 
+		0.25 -0.1620964 2.591498 
+		0 -0.3241928 1.091532 
+		0.25 -0.1620964 2.591498 
+		-0.25 -0.1620964 2.591498 
+		-0.25 -0.1620964 2.591498 
+		0 -0.3241928 1.091532 
+		-0.25 -0.1620964 2.591498 
+		-1 0 4.091465 
+		-0.25 -0.1620964 2.591498 
+	</attribute>
+	<attribute index="2" type="float" size="3" >
+		0 0.4494766 0.8932768 
+		0 0.9706107 0.2405774 
+		0.6923124 0.6569414 0.2984405 
+		-0.5413678 0.6925871 0.4766686 
+		0 0.9706107 0.2405774 
+		0 0.4494766 0.8932768 
+		0.6923124 0.6569414 0.2984405 
+		0.7200537 -0.531663 0.4458754 
+		0 0.4494766 0.8932768 
+		-0.5413678 0.6925871 0.4766686 
+		0 0.4494766 0.8932768 
+		-0.7200537 -0.531663 0.4458754 
+		0.8036439 -0.5703299 0.1697744 
+		0.7200537 -0.531663 0.4458754 
+		0.6923124 0.6569414 0.2984405 
+		-0.5413678 0.6925871 0.4766686 
+		-0.7200537 -0.531663 0.4458754 
+		-0.568041 -0.8065432 0.1636097 
+		0 -0.9989318 0.04608291 
+		0.7200537 -0.531663 0.4458754 
+		0.8036439 -0.5703299 0.1697744 
+		-0.568041 -0.8065432 0.1636097 
+		-0.7200537 -0.531663 0.4458754 
+		0 -0.9989318 0.04608291 
+		0 -0.9989318 0.04608291 
+		0 0.4494766 0.8932768 
+		0.7200537 -0.531663 0.4458754 
+		-0.7200537 -0.531663 0.4458754 
+		0 0.4494766 0.8932768 
+		0 -0.9989318 0.04608291 
+		-0.5413678 0.6925871 0.4766686 
+		-0.8041628 0.5850704 0.1045564 
+		0 0.9706107 0.2405774 
+		-0.8041628 0.5850704 0.1045564 
+		-0.5413678 0.6925871 0.4766686 
+		-0.568041 -0.8065432 0.1636097 
+		0 0.4198431 -0.90759 
+		0.72631 0.6685995 -0.1593676 
+		0 0.9706107 0.2405774 
+		0 0.9706107 0.2405774 
+		-0.72631 0.6685995 -0.1593676 
+		0 0.4198431 -0.90759 
+		0.6923124 0.6569414 0.2984405 
+		0.7624744 0.5555894 0.3315531 
+		0.8036439 -0.5703299 0.1697744 
+		-0.568041 -0.8065432 0.1636097 
+		-0.7624744 0.5555894 0.3315531 
+		-0.8041628 0.5850704 0.1045564 
+		0.4916532 0.1722465 -0.8535722 
+		0.7624744 0.5555894 0.3315531 
+		0.72631 0.6685995 -0.1593676 
+		-0.72631 0.6685995 -0.1593676 
+		-0.7624744 0.5555894 0.3315531 
+		-0.4916532 0.1722465 -0.8535722 
+		0.4636067 -0.817774 -0.3409833 
+		0.4027222 -0.7771539 0.4835352 
+		0.4916532 0.1722465 -0.8535722 
+		-0.4916532 0.1722465 -0.8535722 
+		-0.4027222 -0.7771539 0.4835352 
+		-0.4636067 -0.817774 -0.3409833 
+		0.7624744 0.5555894 0.3315531 
+		0.4916532 0.1722465 -0.8535722 
+		0.4004639 0.8580889 -0.3213599 
+		-0.4004639 0.8580889 -0.3213599 
+		-0.4916532 0.1722465 -0.8535722 
+		-0.7624744 0.5555894 0.3315531 
+		0.7624744 0.5555894 0.3315531 
+		0.4004639 0.8580889 -0.3213599 
+		0.5471664 0.5945006 0.5891599 
+		-0.5471664 0.5945006 0.5891599 
+		-0.4004639 0.8580889 -0.3213599 
+		-0.7624744 0.5555894 0.3315531 
+		0.4916532 0.1722465 -0.8535722 
+		0.9838863 -0.001617431 -0.1786248 
+		0.4004639 0.8580889 -0.3213599 
+		-0.4004639 0.8580889 -0.3213599 
+		-0.9838863 -0.001617431 -0.1786248 
+		-0.4916532 0.1722465 -0.8535722 
+		0.4916532 0.1722465 -0.8535722 
+		0.4027222 -0.7771539 0.4835352 
+		0.4582049 -0.8560442 -0.2391125 
+		-0.4582049 -0.8560442 -0.2391125 
+		-0.4027222 -0.7771539 0.4835352 
+		-0.4916532 0.1722465 -0.8535722 
+		0.4916532 0.1722465 -0.8535722 
+		0.4582049 -0.8560442 -0.2391125 
+		0.9838863 -0.001617431 -0.1786248 
+		-0.9838863 -0.001617431 -0.1786248 
+		-0.4582049 -0.8560442 -0.2391125 
+		-0.4916532 0.1722465 -0.8535722 
+		0.4027222 -0.7771539 0.4835352 
+		0.56386 -0.5887936 0.5790887 
+		0.4582049 -0.8560442 -0.2391125 
+		-0.4582049 -0.8560442 -0.2391125 
+		-0.56386 -0.5887936 0.5790887 
+		-0.4027222 -0.7771539 0.4835352 
+		0.4027222 -0.7771539 0.4835352 
+		0.7624744 0.5555894 0.3315531 
+		0.3905149 -0.2341074 0.8903165 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.7624744 0.5555894 0.3315531 
+		-0.4027222 -0.7771539 0.4835352 
+		0.4027222 -0.7771539 0.4835352 
+		0.3905149 -0.2341074 0.8903165 
+		0.56386 -0.5887936 0.5790887 
+		-0.56386 -0.5887936 0.5790887 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.4027222 -0.7771539 0.4835352 
+		0.7624744 0.5555894 0.3315531 
+		0.5471664 0.5945006 0.5891599 
+		0.3905149 -0.2341074 0.8903165 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.5471664 0.5945006 0.5891599 
+		-0.7624744 0.5555894 0.3315531 
+		0.4582049 -0.8560442 -0.2391125 
+		0.56386 -0.5887936 0.5790887 
+		0.3905149 -0.2341074 0.8903165 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.56386 -0.5887936 0.5790887 
+		-0.4582049 -0.8560442 -0.2391125 
+		0.4004639 0.8580889 -0.3213599 
+		0.3905149 -0.2341074 0.8903165 
+		0.5471664 0.5945006 0.5891599 
+		-0.5471664 0.5945006 0.5891599 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.4004639 0.8580889 -0.3213599 
+		0.9838863 -0.001617431 -0.1786248 
+		0.4582049 -0.8560442 -0.2391125 
+		0.4004639 0.8580889 -0.3213599 
+		-0.4004639 0.8580889 -0.3213599 
+		-0.4582049 -0.8560442 -0.2391125 
+		-0.9838863 -0.001617431 -0.1786248 
+		0.6358227 0.6805627 0.3640248 
+		0.6556292 0.5953856 -0.4643697 
+		0.4132511 -0.7235328 -0.5528733 
+		-0.4132511 -0.7235328 -0.5528733 
+		-0.6556292 0.5953856 -0.4643697 
+		-0.6358227 0.6805627 0.3640248 
+		0.4916532 0.1722465 -0.8535722 
+		0 -0.9301126 -0.3672292 
+		0.4636067 -0.817774 -0.3409833 
+		-0.4636067 -0.817774 -0.3409833 
+		0 -0.9301126 -0.3672292 
+		-0.4916532 0.1722465 -0.8535722 
+		0.4916532 0.1722465 -0.8535722 
+		0.72631 0.6685995 -0.1593676 
+		0 0.4198431 -0.90759 
+		0 0.4198431 -0.90759 
+		-0.72631 0.6685995 -0.1593676 
+		-0.4916532 0.1722465 -0.8535722 
+		0 -0.9301126 -0.3672292 
+		0.4916532 0.1722465 -0.8535722 
+		0 0.4198431 -0.90759 
+		0 0.4198431 -0.90759 
+		-0.4916532 0.1722465 -0.8535722 
+		0 -0.9301126 -0.3672292 
+		0 0.9706107 0.2405774 
+		0.7031159 0.7031159 0.1058382 
+		0.6923124 0.6569414 0.2984405 
+		-0.8041628 0.5850704 0.1045564 
+		-0.7031159 0.7031159 0.1058382 
+		0 0.9706107 0.2405774 
+		0 0.9706107 0.2405774 
+		0.72631 0.6685995 -0.1593676 
+		0.7031159 0.7031159 0.1058382 
+		-0.7031159 0.7031159 0.1058382 
+		-0.72631 0.6685995 -0.1593676 
+		0 0.9706107 0.2405774 
+		0.7624744 0.5555894 0.3315531 
+		0.7031159 0.7031159 0.1058382 
+		0.72631 0.6685995 -0.1593676 
+		-0.72631 0.6685995 -0.1593676 
+		-0.7031159 0.7031159 0.1058382 
+		-0.7624744 0.5555894 0.3315531 
+		0.7624744 0.5555894 0.3315531 
+		0.6923124 0.6569414 0.2984405 
+		0.7031159 0.7031159 0.1058382 
+		-0.7031159 0.7031159 0.1058382 
+		-0.8041628 0.5850704 0.1045564 
+		-0.7624744 0.5555894 0.3315531 
+		0.4636067 -0.817774 -0.3409833 
+		0 -0.9942015 0.1074251 
+		0.4027222 -0.7771539 0.4835352 
+		-0.4027222 -0.7771539 0.4835352 
+		0 -0.9942015 0.1074251 
+		-0.4636067 -0.817774 -0.3409833 
+		0.4636067 -0.817774 -0.3409833 
+		0 -0.9301126 -0.3672292 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9301126 -0.3672292 
+		-0.4636067 -0.817774 -0.3409833 
+		0.4867092 -0.8585162 0.1613208 
+		0.4027222 -0.7771539 0.4835352 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		-0.4027222 -0.7771539 0.4835352 
+		-0.4867092 -0.8585162 0.1613208 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0.4867092 -0.8585162 0.1613208 
+		-0.4867092 -0.8585162 0.1613208 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9301126 -0.3672292 
+		0 -0.9301126 -0.3672292 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0.7624744 0.5555894 0.3315531 
+		0.4867092 -0.8585162 0.1613208 
+		0.8036439 -0.5703299 0.1697744 
+		-0.568041 -0.8065432 0.1636097 
+		-0.4867092 -0.8585162 0.1613208 
+		-0.7624744 0.5555894 0.3315531 
+		0.7624744 0.5555894 0.3315531 
+		0.4027222 -0.7771539 0.4835352 
+		0.4867092 -0.8585162 0.1613208 
+		-0.4867092 -0.8585162 0.1613208 
+		-0.4027222 -0.7771539 0.4835352 
+		-0.7624744 0.5555894 0.3315531 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0.8036439 -0.5703299 0.1697744 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		-0.568041 -0.8065432 0.1636097 
+		0 -0.9942015 0.1074251 
+		0.4867092 -0.8585162 0.1613208 
+		0 -0.9942015 0.1074251 
+		0.8036439 -0.5703299 0.1697744 
+		-0.568041 -0.8065432 0.1636097 
+		0 -0.9942015 0.1074251 
+		-0.4867092 -0.8585162 0.1613208 
+		0.4867092 -0.8585162 0.1613208 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		-0.4867092 -0.8585162 0.1613208 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9301126 -0.3672292 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9301126 -0.3672292 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9301126 -0.3672292 
+		0 -0.9301126 -0.3672292 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.4582049 -0.8560442 -0.2391125 
+		-0.4132511 -0.7235328 -0.5528733 
+		-0.6358227 0.6805627 0.3640248 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.4132511 -0.7235328 -0.5528733 
+		0.4132511 -0.7235328 -0.5528733 
+		0.4582049 -0.8560442 -0.2391125 
+		0.3905149 -0.2341074 0.8903165 
+		0.6358227 0.6805627 0.3640248 
+		0.4132511 -0.7235328 -0.5528733 
+		0.3905149 -0.2341074 0.8903165 
+		-0.4132511 -0.7235328 -0.5528733 
+		-0.4004639 0.8580889 -0.3213599 
+		-0.6556292 0.5953856 -0.4643697 
+		-0.4132511 -0.7235328 -0.5528733 
+		-0.4582049 -0.8560442 -0.2391125 
+		-0.4004639 0.8580889 -0.3213599 
+		0.4132511 -0.7235328 -0.5528733 
+		0.4004639 0.8580889 -0.3213599 
+		0.4582049 -0.8560442 -0.2391125 
+		0.4132511 -0.7235328 -0.5528733 
+		0.6556292 0.5953856 -0.4643697 
+		0.4004639 0.8580889 -0.3213599 
+		-0.4004639 0.8580889 -0.3213599 
+		-0.3905149 -0.2341074 0.8903165 
+		-0.6358227 0.6805627 0.3640248 
+		-0.6556292 0.5953856 -0.4643697 
+		-0.4004639 0.8580889 -0.3213599 
+		-0.6358227 0.6805627 0.3640248 
+		0.6358227 0.6805627 0.3640248 
+		0.3905149 -0.2341074 0.8903165 
+		0.4004639 0.8580889 -0.3213599 
+		0.6556292 0.5953856 -0.4643697 
+		0.6358227 0.6805627 0.3640248 
+		0.4004639 0.8580889 -0.3213599 
+		0 -0.9942015 0.1074251 
+		-0.568041 -0.8065432 0.1636097 
+		0 -0.9989318 0.04608291 
+		0 -0.9989318 0.04608291 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9989318 0.04608291 
+		0.8036439 -0.5703299 0.1697744 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		-0.568041 -0.8065432 0.1636097 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0.8036439 -0.5703299 0.1697744 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		0 -0.9942015 0.1074251 
+		-0.568041 -0.8065432 0.1636097 
+		0 -0.9942015 0.1074251 
+	</attribute>
+	<attribute index="1" type="float" size="3" >
+		0.6705883 0.7607843 0.7607843 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6705883 0.7607843 0.7607843 
+		0.6666667 0.7607843 0.7647059 
+		0.682353 0.772549 0.7411765 
+		0.6705883 0.7607843 0.7607843 
+		0.6666667 0.7607843 0.7647059 
+		0.6705883 0.7607843 0.7607843 
+		0.682353 0.772549 0.7411765 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.3843137 0.4392157 0.4431372 
+		0.4117647 0.4666666 0.4705882 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.4117647 0.4666666 0.4705882 
+		0.3843137 0.4392157 0.4431372 
+		0.3843137 0.4392157 0.4431372 
+		0.3843137 0.4352941 0.4352941 
+		0.4117647 0.4666666 0.4705882 
+		0.4117647 0.4666666 0.4705882 
+		0.3843137 0.4352941 0.4352941 
+		0.3843137 0.4392157 0.4431372 
+		1 1 1 
+		1 1 1 
+		1 1 1 
+		1 1 1 
+		1 1 1 
+		1 1 1 
+		0.6352941 0.7215687 0.6941177 
+		0.7019608 0.772549 0.627451 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.7019608 0.772549 0.627451 
+		0.6352941 0.7215687 0.6941177 
+		0.6666667 0.7607843 0.7647059 
+		0.6392157 0.7215687 0.7098039 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6392157 0.7215687 0.7098039 
+		0.6666667 0.7607843 0.7647059 
+		0.7411765 0.8 0.4941176 
+		0.6235294 0.7137255 0.7137255 
+		0.7019608 0.772549 0.627451 
+		0.7019608 0.772549 0.627451 
+		0.6235294 0.7137255 0.7137255 
+		0.7411765 0.8 0.4941176 
+		0.3686274 0.4156863 0.4196078 
+		0.3215686 0.3647059 0.3686274 
+		0.4627451 0.5411765 0.5215687 
+		0.4627451 0.5411765 0.5215687 
+		0.3215686 0.3647059 0.3686274 
+		0.3686274 0.4156863 0.4196078 
+		0.6235294 0.7137255 0.7137255 
+		0.7411765 0.8 0.4941176 
+		0.8666667 0.854902 0.6745098 
+		0.8666667 0.854902 0.6745098 
+		0.7411765 0.8 0.4941176 
+		0.6235294 0.7137255 0.7137255 
+		0.6235294 0.7137255 0.7137255 
+		0.8666667 0.854902 0.6745098 
+		0.8666667 0.854902 0.682353 
+		0.8666667 0.854902 0.682353 
+		0.8666667 0.854902 0.6745098 
+		0.6235294 0.7137255 0.7137255 
+		0.7411765 0.8 0.4941176 
+		0.5647059 0.6627451 0.6196079 
+		0.8666667 0.854902 0.6745098 
+		0.8666667 0.854902 0.6745098 
+		0.5647059 0.6627451 0.6196079 
+		0.7411765 0.8 0.4941176 
+		0.372549 0.4156863 0.3803921 
+		0.3215686 0.3647059 0.3686274 
+		0.882353 0.8705883 0.6588236 
+		0.882353 0.8705883 0.6588236 
+		0.3215686 0.3647059 0.3686274 
+		0.372549 0.4156863 0.3803921 
+		0.372549 0.4156863 0.3803921 
+		0.882353 0.8705883 0.6588236 
+		0.8784314 0.8627451 0.6784314 
+		0.8784314 0.8627451 0.6784314 
+		0.882353 0.8705883 0.6588236 
+		0.372549 0.4156863 0.3803921 
+		0.3215686 0.3647059 0.3686274 
+		0.8901961 0.8784314 0.6392157 
+		0.882353 0.8705883 0.6588236 
+		0.882353 0.8705883 0.6588236 
+		0.8901961 0.8784314 0.6392157 
+		0.3215686 0.3647059 0.3686274 
+		0.6156863 0.7019608 0.7058824 
+		0.6392157 0.7215687 0.7098039 
+		0.8392157 0.8431373 0.6941177 
+		0.8392157 0.8431373 0.6941177 
+		0.6392157 0.7215687 0.7098039 
+		0.6156863 0.7019608 0.7058824 
+		0.6156863 0.7019608 0.7058824 
+		0.827451 0.8392157 0.6980392 
+		0.7529412 0.8196079 0.6470589 
+		0.7529412 0.8196079 0.6470589 
+		0.827451 0.8392157 0.6980392 
+		0.6156863 0.7019608 0.7058824 
+		0.6196079 0.7098039 0.7137255 
+		0.8666667 0.854902 0.682353 
+		0.8431373 0.8431373 0.6941177 
+		0.8431373 0.8431373 0.6941177 
+		0.8666667 0.854902 0.682353 
+		0.6196079 0.7098039 0.7137255 
+		0.882353 0.8705883 0.6588236 
+		0.8627451 0.854902 0.6745098 
+		0.8470588 0.8431373 0.6862745 
+		0.8470588 0.8431373 0.6862745 
+		0.8627451 0.854902 0.6745098 
+		0.882353 0.8705883 0.6588236 
+		0.8431373 0.8431373 0.6588236 
+		0.8431373 0.8431373 0.6941177 
+		0.8666667 0.854902 0.682353 
+		0.8666667 0.854902 0.682353 
+		0.8431373 0.8431373 0.6941177 
+		0.8431373 0.8431373 0.6588236 
+		0.5568628 0.6588236 0.6392157 
+		0.8745098 0.8588235 0.6784314 
+		0.8431373 0.8470588 0.6627451 
+		0.8431373 0.8470588 0.6627451 
+		0.8745098 0.8588235 0.6784314 
+		0.5568628 0.6588236 0.6392157 
+		0.6078432 0.6431373 0.6470589 
+		0.6196079 0.654902 0.6588236 
+		0.6156863 0.6509804 0.654902 
+		0.6156863 0.6509804 0.654902 
+		0.6196079 0.654902 0.6588236 
+		0.6078432 0.6431373 0.6470589 
+		0.7411765 0.8 0.4941176 
+		0.9960784 1 0.317647 
+		0.9960784 1 0.317647 
+		0.9960784 1 0.317647 
+		0.9960784 1 0.317647 
+		0.7411765 0.8 0.4941176 
+		0.7411765 0.8 0.4941176 
+		0.9960784 1 0.317647 
+		0.9960784 1 0.317647 
+		0.9960784 1 0.317647 
+		0.9960784 1 0.317647 
+		0.7411765 0.8 0.4941176 
+		0.9960784 1 0.317647 
+		0.7411765 0.8 0.4941176 
+		0.9960784 1 0.317647 
+		0.9960784 1 0.317647 
+		0.7411765 0.8 0.4941176 
+		0.9960784 1 0.317647 
+		0.6666667 0.7607843 0.7647059 
+		0.6235294 0.7137255 0.7176471 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6235294 0.7137255 0.7176471 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.7019608 0.772549 0.627451 
+		0.6235294 0.7137255 0.7176471 
+		0.6235294 0.7137255 0.7176471 
+		0.7019608 0.772549 0.627451 
+		0.6666667 0.7607843 0.7647059 
+		0.6392157 0.7215687 0.7098039 
+		0.7137255 0.7647059 0.7019608 
+		0.7019608 0.772549 0.627451 
+		0.7019608 0.772549 0.627451 
+		0.7137255 0.7647059 0.7019608 
+		0.6392157 0.7215687 0.7098039 
+		0.6392157 0.7215687 0.7098039 
+		0.6666667 0.7607843 0.7647059 
+		0.7137255 0.7647059 0.7019608 
+		0.7137255 0.7647059 0.7019608 
+		0.6666667 0.7607843 0.7647059 
+		0.6392157 0.7215687 0.7098039 
+		0.3686274 0.4156863 0.4196078 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3686274 0.4156863 0.4196078 
+		0.3686274 0.4156863 0.4196078 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3686274 0.4156863 0.4196078 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.6392157 0.7215687 0.7098039 
+		0.6039216 0.6901961 0.6941177 
+		0.6666667 0.7607843 0.7647059 
+		0.6666667 0.7607843 0.7647059 
+		0.6039216 0.6901961 0.6941177 
+		0.6392157 0.7215687 0.7098039 
+		0.6392157 0.7215687 0.7098039 
+		0.6980392 0.7529412 0.6980392 
+		0.6039216 0.6901961 0.6941177 
+		0.6039216 0.6901961 0.6941177 
+		0.6980392 0.7529412 0.6980392 
+		0.6392157 0.7215687 0.7098039 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.7568628 0.8039216 0.6235294 
+		0.882353 0.8705883 0.6588236 
+		0.7058824 0.7450981 0.7450981 
+		0.6313726 0.6666667 0.6705883 
+		0.7568628 0.8039216 0.6235294 
+		0.7058824 0.7450981 0.7450981 
+		0.7058824 0.7450981 0.7450981 
+		0.882353 0.8705883 0.6588236 
+		0.7568628 0.8039216 0.6235294 
+		0.6313726 0.6666667 0.6705883 
+		0.7058824 0.7450981 0.7450981 
+		0.7568628 0.8039216 0.6235294 
+		0.6352941 0.6627451 0.6470589 
+		0.8 0.827451 0.6352941 
+		0.6313726 0.6666667 0.6509804 
+		0.6352941 0.6627451 0.6470589 
+		0.8705883 0.8588235 0.6784314 
+		0.8 0.827451 0.6352941 
+		0.6352941 0.6627451 0.6470589 
+		0.8 0.827451 0.6352941 
+		0.8705883 0.8588235 0.6784314 
+		0.6352941 0.6627451 0.6470589 
+		0.6313726 0.6666667 0.6509804 
+		0.8 0.827451 0.6352941 
+		0.8666667 0.854902 0.6745098 
+		0.8431373 0.8431373 0.6941177 
+		0.6117647 0.6509804 0.6509804 
+		0.6313726 0.6705883 0.6745098 
+		0.8666667 0.854902 0.6745098 
+		0.6117647 0.6509804 0.6509804 
+		0.6117647 0.6509804 0.6509804 
+		0.8431373 0.8431373 0.6941177 
+		0.8666667 0.854902 0.6745098 
+		0.6313726 0.6705883 0.6745098 
+		0.6117647 0.6509804 0.6509804 
+		0.8666667 0.854902 0.6745098 
+		0.3529412 0.4 0.4039216 
+		0.3843137 0.4392157 0.4431372 
+		0.3529412 0.4 0.4039216 
+		0.3529412 0.4 0.4039216 
+		0.3215686 0.3647059 0.3686274 
+		0.3529412 0.4 0.4039216 
+		0.3215686 0.3647059 0.3686274 
+		0.3529412 0.4 0.4039216 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3529412 0.4 0.4039216 
+		0.3215686 0.3647059 0.3686274 
+		0.3529412 0.4 0.4039216 
+		0.3529412 0.4 0.4039216 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3529412 0.4 0.4039216 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+		0.3215686 0.3647059 0.3686274 
+	</attribute>
+	<vao name="flat" >
+		<source attrib="0" />
+	</vao>
+	<vao name="tint" >
+		<source attrib="0" />
+		<source attrib="1" />
+	</vao>
+	<arrays cmd="triangles" start="0" count="336" />
+</mesh>

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example2/example8.2.frag

+#version 330
+
+smooth in vec4 theColor;
+
+uniform vec4 baseColor;
+
+out vec4 outputColor;
+
+void main()
+{
+	outputColor = theColor * baseColor;
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter8/example2/example8.2.vert

+#version 330
+
+layout(location = 0) in vec4 position;
+layout(location = 1) in vec4 color;
+
+smooth out vec4 theColor;
+
+uniform mat4 cameraToClipMatrix;
+uniform mat4 modelToCameraMatrix;
+
+void main()
+{
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * position;
+	theColor = color;
+}

src/main/java/com/ra4king/opengl/util/math/Quaternion.java

+package com.ra4king.opengl.util.math;
+
+public class Quaternion {
+	private float x, y, z, w;
+	
+	public Quaternion() {
+		reset();
+	}
+	
+	public Quaternion(float x, float y, float z, float w) {
+		set(x,y,z,w);
+	}
+	
+	public Quaternion(Quaternion q) {
+		set(q);
+	}
+	
+	public float x() {
+		return x;
+	}
+	
+	public Quaternion x(float x) {
+		this.x = x;
+		return this;
+	}
+	
+	public float y() {
+		return y;
+	}
+	
+	public Quaternion y(float y) {
+		this.y = y;
+		return this;
+	}
+	
+	public float z() {
+		return z;
+	}
+	
+	public Quaternion z(float z) {
+		this.z = z;
+		return this;
+	}
+	
+	public float w() {
+		return w;
+	}
+	
+	public Quaternion w(float w) {
+		this.w = w;
+		return this;
+	}
+	
+	public Quaternion set(float x, float y, float z, float w) {
+		this.x = x;
+		this.y = y;
+		this.z = z;
+		this.w = w;
+		return this;
+	}
+	
+	public Quaternion set(Quaternion q) {
+		return set(q.x,q.y,q.z,q.w);
+	}
+	
+	public Quaternion reset() {
+		x = y = z = 0;
+		w = 1;
+		return this;
+	}
+	
+	public float length() {
+		return (float)Math.sqrt(x*x + y*y + z*z + w*w);
+	}
+	
+	public Quaternion normalize() {
+		float length = length();
+		x /= length;
+		y /= length;
+		z /= length;
+		w /= length;
+		return this;
+	}
+	
+	public float dot(Quaternion q) {
+		return x*q.x + y*q.y + z*q.z + w*q.w;
+	}
+	
+	public Quaternion add(float x, float y, float z, float w) {
+		this.x += x;
+		this.y += y;
+		this.z += z;
+		this.w += w;
+		
+		return this;
+	}
+	
+	public Quaternion add(Quaternion q) {
+		return add(q.x,q.y,q.z,q.w);
+	}
+	
+	public Quaternion sub(float x, float y, float z, float w) {
+		this.x -= x;
+		this.y -= y;
+		this.z -= z;
+		this.w -= w;
+		
+		return this;
+	}
+	
+	public Quaternion sub(Quaternion q) {
+		return sub(q.x,q.y,q.z,q.w);
+	}
+	
+	public Quaternion mult(float f) {
+		this.x *= f;
+		this.y *= f;
+		this.z *= f;
+		this.w *= f;
+		
+		return this;
+	}
+	
+	public Quaternion mult(Quaternion q) {
+		float xx = w*q.x + x*q.w + y*q.z - z*q.y;
+		float yy = w*q.y + y*q.w + z*q.x - x*q.z;
+		float zz = w*q.z + z*q.w + x*q.y - y*q.x;
+		float ww = w*q.w - x*q.x + y*q.y - z*q.z;
+		
+		x = xx;
+		y = yy;
+		z = zz;
+		w = ww;
+		
+		return this;
+	}
+	
+	public Quaternion conjugate() {
+		x *= -1;
+		y *= -1;
+		z *= -1;
+		
+		return this;
+	}
+	
+	public Matrix4 getMatrix() {
+		float[] m = {
+				1 - 2*y*y - 2*z*z,     2*x*y - 2*w*z,     2*x*z + 2*w*y, 0,
+					2*x*y + 2*w*z, 1 - 2*x*x - 2*z*z,     2*y*z - 2*w*x, 0,
+					2*x*z - 2*w*y,     2*y*z + 2*w*x, 1 - 2*x*x - 2*y*y, 0,
+								0,				   0,				  0, 1
+		};
+		
+		return new Matrix4(m);
+	}
+}

src/main/java/com/ra4king/opengl/util/math/Vector3.java

 	}
 	
 	public Vector3(float x, float y, float z) {
-		this.x = x;
-		this.y = y;
-		this.z = z;
+		set(x,y,z);
 	}
 	
 	public Vector3(Vector3 vec) {
 	}
 	
 	public Vector3 set(Vector3 vec) {
-		return set(vec.x(),vec.y(),vec.z());
+		return set(vec.x,vec.y,vec.z);
 	}
 	
 	public Vector3 reset() {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.