Roi Atalla avatar Roi Atalla committed d1fc402

Example 11.1 fully ported.

Comments (0)

Files changed (11)

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/Example11_1.java

 import static org.lwjgl.opengl.GL31.*;
 import static org.lwjgl.opengl.GL32.*;
 
+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.MousePoles.ViewData;
 import com.ra4king.opengl.util.MousePoles.ViewPole;
 import com.ra4king.opengl.util.MousePoles.ViewScale;
+import com.ra4king.opengl.util.math.Matrix3;
 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;
 import com.ra4king.opengl.util.math.Vector4;
 	
 	private LightingModel lightModel = LightingModel.DIFFUSE_AND_SPECULAR;
 	
-	private boolean useFragmentLighting = true, drawColoredCyl, drawLightSource, scaleCyl, drawDark;
+	private boolean drawColoredCyl, drawLightSource, scaleCyl, drawDark;
 	
 	private float lightAttenuation = 1.2f, shininessFactor = 4;
 	
 	}
 	
 	private ProgramData loadLitProgram(String vertFile, String fragFile) {
-		ProgramData data = new ProgramData(new ShaderProgram(vertFile, fragFile));
+		ProgramData data = new ProgramData(new ShaderProgram(readFromFile(vertFile), readFromFile(fragFile)));
 		data.modelToCameraMatrixUniform = glGetUniformLocation(data.program.getProgram(), "modelToCameraMatrix");
 		data.lightIntensityUniform = glGetUniformLocation(data.program.getProgram(), "lightIntensity");
 		data.ambientIntensityUniform = glGetUniformLocation(data.program.getProgram(), "ambientIntensity");
 	}
 	
 	private UnlitProgramData loadUnlitProgram(String vertFile, String fragFile) {
-		UnlitProgramData data = new UnlitProgramData(new ShaderProgram(vertFile, fragFile));
+		UnlitProgramData data = new UnlitProgramData(new ShaderProgram(readFromFile(vertFile), readFromFile(fragFile)));
 		data.modelToCameraMatrixUniform = glGetUniformLocation(data.program.getProgram(), "modelToCameraMatrix");
 		data.objectColorUniform = glGetUniformLocation(data.program.getProgram(), "objectColor");
 		
 		Utils.updateMousePoles(viewPole, objectPole);
 		
 		lightTimer.update(deltaTime);
+		
+		float speed = (deltaTime / (float)1e9) * (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) ? 0.5f : 2f);
+		
+		if(Keyboard.isKeyDown(Keyboard.KEY_I))
+			lightHeight += speed;
+		if(Keyboard.isKeyDown(Keyboard.KEY_K))
+			lightHeight -= speed;
+		if(Keyboard.isKeyDown(Keyboard.KEY_L))
+			lightRadius += speed;
+		if(Keyboard.isKeyDown(Keyboard.KEY_J))
+			lightRadius -= speed;
+		
+		if(lightRadius < 0.2f)
+			lightRadius = 0.2f;
+	}
+	
+	@Override
+	public void keyPressed(int key, char c, long nanos) {
+		boolean changedShininess = false;
+		boolean changedLightModel = false;
+		
+		switch(key) {
+			case Keyboard.KEY_SPACE:
+				drawColoredCyl = !drawColoredCyl;
+				break;
+			case Keyboard.KEY_O:
+				shininessFactor += 0.5f;
+				changedShininess = true;
+				break;
+			case Keyboard.KEY_U:
+				shininessFactor -= 0.5f;
+				changedShininess = true;
+				break;
+			case Keyboard.KEY_Y:
+				drawLightSource = !drawLightSource;
+				break;
+			case Keyboard.KEY_T:
+				scaleCyl = !scaleCyl;
+				break;
+			case Keyboard.KEY_B:
+				lightTimer.togglePause();
+				break;
+			case Keyboard.KEY_G:
+				drawDark = !drawDark;
+				break;
+			case Keyboard.KEY_H:
+				lightModel = LightingModel.values()[(lightModel.ordinal()+1)%LightingModel.values().length];
+				changedLightModel = true;
+				break;
+		}
+		
+		if(shininessFactor <= 0)
+			shininessFactor = 0.0001f;
+		
+		if(changedShininess)
+			System.out.printf("Shiny: %f\n", shininessFactor);
+		
+		if(changedLightModel)
+			System.out.printf("%s\n", lightModel.name());
 	}
 	
 	private Vector4 calcLightPosition() {
 	public void render() {
 		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 		
+		MatrixStack modelMatrix = new MatrixStack();
+		modelMatrix.setTop(viewPole.calcMatrix());
 		
+		Vector4 worldLightPos = calcLightPosition();
+		Vector4 lightPosCameraSpace = modelMatrix.getTop().mult(worldLightPos);
+		
+		ProgramData whiteProgram;
+		ProgramData colorProgram;
+		
+		switch(lightModel) {
+			case PURE_DIFFUSE:
+				whiteProgram = whiteNoPhong;
+				colorProgram = colorNoPhong;
+				break;
+			case DIFFUSE_AND_SPECULAR:
+				whiteProgram = whitePhong;
+				colorProgram = colorPhong;
+				break;
+			case SPECULAR_ONLY:
+				whiteProgram = whitePhongOnly;
+				colorProgram = colorPhongOnly;
+				break;
+			default:
+				throw new RuntimeException("How is this even possible?");
+		}
+		
+		whiteProgram.program.begin();
+		glUniform4f(whiteProgram.lightIntensityUniform, 0.8f, 0.8f, 0.8f, 1);
+		glUniform4f(whiteProgram.ambientIntensityUniform, 0.2f, 0.2f, 0.2f, 1);
+		glUniform3(whiteProgram.cameraSpaceLightPosUniform, lightPosCameraSpace.toBuffer());
+		glUniform1f(whiteProgram.lightAttenuationUniform, lightAttenuation);
+		glUniform1f(whiteProgram.shininessFactorUniform, shininessFactor);
+		glUniform4(whiteProgram.baseDiffuseColorUniform, drawDark ? darkColor.toBuffer() : lightColor.toBuffer());
+		whiteProgram.program.end();
+		
+		colorProgram.program.begin();
+		glUniform4f(colorProgram.lightIntensityUniform, 0.8f, 0.8f, 0.8f, 1);
+		glUniform4f(colorProgram.ambientIntensityUniform, 0.2f, 0.2f, 0.2f, 1);
+		glUniform3(colorProgram.cameraSpaceLightPosUniform, lightPosCameraSpace.toBuffer());
+		glUniform1f(colorProgram.lightAttenuationUniform, lightAttenuation);
+		glUniform1f(colorProgram.shininessFactorUniform, shininessFactor);
+		colorProgram.program.end();
+		
+		{
+			modelMatrix.pushMatrix();
+			
+			{
+				modelMatrix.pushMatrix();
+				
+				whiteProgram.program.begin();
+				glUniformMatrix4(whiteProgram.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
+				glUniformMatrix3(whiteProgram.normalModelToCameraMatrixUniform, false, new Matrix3(modelMatrix.getTop()).inverse().transpose().toBuffer());
+				planeMesh.render();
+				whiteProgram.program.end();
+				
+				modelMatrix.popMatrix();
+			}
+			
+			{
+				modelMatrix.pushMatrix();
+				
+				modelMatrix.getTop().mult(objectPole.calcMatrix());
+				
+				if(scaleCyl)
+					modelMatrix.getTop().scale(1, 1, 0.2f);
+				
+				ProgramData prog = drawColoredCyl ? colorProgram : whiteProgram;
+				
+				prog.program.begin();
+				glUniformMatrix4(prog.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
+				glUniformMatrix3(prog.normalModelToCameraMatrixUniform, false, new Matrix3(modelMatrix.getTop()).inverse().transpose().toBuffer());
+				
+				if(drawColoredCyl)
+					cylinderMesh.render("lit-color");
+				else
+					cylinderMesh.render("lit");
+				
+				prog.program.end();
+				
+				modelMatrix.popMatrix();
+			}
+			
+			if(drawLightSource) {
+				modelMatrix.pushMatrix();
+				
+				modelMatrix.getTop().translate(new Vector3(worldLightPos));
+				modelMatrix.getTop().scale(0.1f, 0.1f, 0.1f);
+				
+				unlit.program.begin();
+				glUniformMatrix4(unlit.modelToCameraMatrixUniform, false, modelMatrix.getTop().toBuffer());
+				glUniform4f(unlit.objectColorUniform, 0.8078f, 0.8706f, 0.9922f, 1);
+				cubeMesh.render("flat");
+				unlit.program.end();
+				
+				modelMatrix.popMatrix();
+			}
+			
+			modelMatrix.popMatrix();
+		}
 	}
 	
 	private static class ProgramData {

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.LargePlane.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" > 
+		30 0 -30
+		30 0 30
+		-30 0 30
+		-30 0 -30
+		30 0 -30
+		30 0 30
+		-30 0 30
+		-30 0 -30
+	</attribute>
+	<attribute index="2" type="float" size="3" > 
+		0 1 0
+		0 1 0
+		0 1 0
+		0 1 0
+		0 -1 0
+		0 -1 0
+		0 -1 0
+		0 -1 0
+	</attribute>
+	<indices cmd="triangles" type="ushort" > 
+		0 1 2
+		2 3 0
+		4 6 5
+		6 4 7
+	</indices>
+</mesh>

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.NoPhong.frag

+#version 330
+
+in vec4 diffuseColor;
+in vec3 vertexNormal;
+in vec3 cameraSpacePosition;
+
+out vec4 outputColor;
+
+uniform vec3 modelSpaceLightPos;
+
+uniform vec4 lightIntensity;
+uniform vec4 ambientIntensity;
+
+uniform vec3 cameraSpaceLightPos;
+
+uniform float lightAttenuation;
+
+vec4 ApplyLightIntensity(in vec3 cameraSpacePosition, out vec3 lightDirection)
+{
+	vec3 lightDifference = cameraSpaceLightPos - cameraSpacePosition;
+	float lightDistanceSqr = dot(lightDifference, lightDifference);
+	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
+	
+	return lightIntensity / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+}
+
+void main()
+{
+	vec3 lightDir = vec3(0);
+	vec4 attenIntensity = ApplyLightIntensity(cameraSpacePosition, lightDir);
+	
+	float cosAngIncidence = dot(normalize(vertexNormal), lightDir);
+	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	
+	outputColor = diffuseColor * attenIntensity * cosAngIncidence + diffuseColor * ambientIntensity;
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PCN.vert

+#version 330
+
+layout(location = 0) in vec3 position;
+layout(location = 1) in vec4 inDiffuseColor;
+layout(location = 2) in vec3 normal;
+
+out vec4 diffuseColor;
+out vec3 vertexNormal;
+out vec3 cameraSpacePosition;
+
+uniform mat4 modelToCameraMatrix;
+uniform mat3 normalModelToCameraMatrix;
+
+uniform Projection
+{
+	mat4 cameraToClipMatrix;
+};
+
+void main()
+{
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * tempCamPosition;
+	
+	vertexNormal = normalModelToCameraMatrix * normal;
+	diffuseColor = inDiffuseColor;
+	cameraSpacePosition = vec3(tempCamPosition);
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PN.vert

+#version 330
+
+layout(location = 0) in vec3 position;
+layout(location = 2) in vec3 normal;
+
+out vec4 diffuseColor;
+out vec3 vertexNormal;
+out vec3 cameraSpacePosition;
+
+uniform mat4 modelToCameraMatrix;
+uniform mat3 normalModelToCameraMatrix;
+
+uniform vec4 baseDiffuseColor;
+
+uniform Projection
+{
+	mat4 cameraToClipMatrix;
+};
+
+void main()
+{
+	vec4 tempCamPosition = modelToCameraMatrix * vec4(position, 1);
+	gl_Position = cameraToClipMatrix * tempCamPosition;
+	
+	vertexNormal = normalModelToCameraMatrix * normal;
+	diffuseColor = baseDiffuseColor;
+	cameraSpacePosition = vec3(tempCamPosition);
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PhongLighting.frag

+#version 330
+
+in vec4 diffuseColor;
+in vec3 vertexNormal;
+in vec3 cameraSpacePosition;
+
+out vec4 outputColor;
+
+uniform vec3 modelSpaceLightPos;
+
+uniform vec4 lightIntensity;
+uniform vec4 ambientIntensity;
+
+uniform vec3 cameraSpaceLightPos;
+
+uniform float lightAttenuation;
+
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+uniform float shininessFactor;
+
+float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
+{
+	vec3 lightDifference = cameraSpaceLightPos - cameraSpacePosition;
+	float lightDistanceSqr = dot(lightDifference, lightDifference);
+	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
+	
+	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+}
+
+void main()
+{
+	vec3 lightDir = vec3(0);
+	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
+	vec4 attenIntensity = atten * lightIntensity;
+	
+	vec3 surfaceNormal = normalize(vertexNormal);
+	float cosAngIncidence = dot(surfaceNormal, lightDir);
+	cosAngIncidence = clamp(cosAngIncidence, 0, 1);
+	
+	vec3 viewDirection = normalize(-cameraSpacePosition);
+	vec3 reflectDir = reflect(-lightDir, surfaceNormal);
+	float phongTerm = dot(viewDirection, reflectDir);
+	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = cosAngIncidence != 0.0 ? phongTerm : 0.0;
+	phongTerm = pow(phongTerm, shininessFactor);
+	
+	outputColor = diffuseColor  * attenIntensity * cosAngIncidence +
+				  specularColor * attenIntensity * phongTerm	   +
+				  diffuseColor  * ambientIntensity;
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PhongOnly.frag

+#version 330
+
+in vec4 diffuseColor;
+in vec3 vertexNormal;
+in vec3 cameraSpacePosition;
+
+out vec4 outputColor;
+
+uniform vec3 modelSpaceLightPos;
+
+uniform vec4 lightIntensity;
+uniform vec4 ambientIntensity;
+
+uniform vec3 cameraSpaceLightPos;
+
+uniform float lightAttenuation;
+
+const vec4 specularColor = vec4(0.25, 0.25, 0.25, 1);
+uniform float shininessFactor;
+
+float CalcAttenuation(in vec3 cameraSpacePosition, out vec3 lightDirection)
+{
+	vec3 lightDifference = cameraSpaceLightPos - cameraSpacePosition;
+	float lightDistanceSqr = dot(lightDifference, lightDifference);
+	lightDirection = lightDifference * inversesqrt(lightDistanceSqr);
+	
+	return 1 / (1 + lightAttenuation * sqrt(lightDistanceSqr));
+}
+
+void main()
+{
+	vec3 lightDir = vec3(0);
+	float atten = CalcAttenuation(cameraSpacePosition, lightDir);
+	vec4 attenIntensity = atten * lightIntensity;
+	
+	vec3 surfaceNormal = normalize(vertexNormal);
+	
+	vec3 viewDirection = normalize(-cameraSpacePosition);
+	vec3 reflectDir = normalize(reflect(-lightDir, surfaceNormal));
+	float phongTerm = dot(viewDirection, reflectDir);
+	phongTerm = clamp(phongTerm, 0, 1);
+	phongTerm = dot(surfaceNormal, lightDir) > 0 ? phongTerm : 0;
+	phongTerm = pow(phongTerm, shininessFactor);
+	
+	outputColor = specularColor * attenIntensity * phongTerm + diffuseColor * ambientIntensity;
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.PosTransform.vert

+#version 330
+
+layout(location = 0) in vec3 position;
+
+uniform mat4 modelToCameraMatrix;
+
+uniform Projection
+{
+	mat4 cameraToClipMatrix;
+};
+
+void main()
+{
+	gl_Position = cameraToClipMatrix * modelToCameraMatrix * vec4(position, 1.0);
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.UniformColor.frag

+#version 330
+
+uniform vec4 objectColor;
+
+out vec4 outputColor;
+
+void main()
+{
+	outputColor = objectColor;
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.UnitCube.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.5 0.5 0.5
+		0.5 -0.5 0.5
+		-0.5 -0.5 0.5
+		-0.5 0.5 0.5
+		0.5 0.5 0.5
+		-0.5 0.5 0.5
+		-0.5 0.5 -0.5
+		0.5 0.5 -0.5
+		0.5 0.5 0.5
+		0.5 0.5 -0.5
+		0.5 -0.5 -0.5
+		0.5 -0.5 0.5
+		0.5 0.5 -0.5
+		-0.5 0.5 -0.5
+		-0.5 -0.5 -0.5
+		0.5 -0.5 -0.5
+		0.5 -0.5 0.5
+		0.5 -0.5 -0.5
+		-0.5 -0.5 -0.5
+		-0.5 -0.5 0.5
+		-0.5 0.5 0.5
+		-0.5 -0.5 0.5
+		-0.5 -0.5 -0.5
+		-0.5 0.5 -0.5
+	</attribute>
+	<attribute index="1" type="float" size="4" > 
+		0 1 0 1
+		0 1 0 1
+		0 1 0 1
+		0 1 0 1
+		0 0 1 1
+		0 0 1 1
+		0 0 1 1
+		0 0 1 1
+		1 0 0 1
+		1 0 0 1
+		1 0 0 1
+		1 0 0 1
+		1 1 0 1
+		1 1 0 1
+		1 1 0 1
+		1 1 0 1
+		0 1 1 1
+		0 1 1 1
+		0 1 1 1
+		0 1 1 1
+		1 0 1 1
+		1 0 1 1
+		1 0 1 1
+		1 0 1 1
+	</attribute>
+	<vao name="color" >
+		<source attrib="0" />
+		<source attrib="1" />
+	</vao>
+	<vao name="flat" >
+		<source attrib="0" />
+	</vao>
+	<indices cmd="triangles" type="ushort" > 
+		0 1 2
+		2 3 0
+		4 5 6
+		6 7 4
+		8 9 10
+		10 11 8
+		12 13 14
+		14 15 12
+		16 17 18
+		18 19 16
+		20 21 22
+		22 23 20
+	</indices>
+</mesh>

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter11/example1/example11.1.UnitCylinder.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 0
+		0.5 0.5 0
+		0.5 -0.5 0
+		0.48907381875731 0.5 0.1039557588888
+		0.48907381875731 -0.5 0.1039557588888
+		0.45677280077542 0.5 0.20336815992623
+		0.45677280077542 -0.5 0.20336815992623
+		0.40450865316151 0.5 0.29389241146627
+		0.40450865316151 -0.5 0.29389241146627
+		0.33456556611288 0.5 0.37157217599218
+		0.33456556611288 -0.5 0.37157217599218
+		0.2500003830126 0.5 0.43301248075957
+		0.2500003830126 -0.5 0.43301248075957
+		0.15450900193016 0.5 0.47552809414644
+		0.15450900193016 -0.5 0.47552809414644
+		0.052264847412855 0.5 0.49726088296277
+		0.052264847412855 -0.5 0.49726088296277
+		-0.052263527886268 0.5 0.49726102165048
+		-0.052263527886268 -0.5 0.49726102165048
+		-0.15450774007312 0.5 0.47552850414828
+		-0.15450774007312 -0.5 0.47552850414828
+		-0.24999923397422 0.5 0.43301314415651
+		-0.24999923397422 -0.5 0.43301314415651
+		-0.33456458011157 0.5 0.37157306379065
+		-0.33456458011157 -0.5 0.37157306379065
+		-0.40450787329018 0.5 0.29389348486527
+		-0.40450787329018 -0.5 0.29389348486527
+		-0.45677226111814 0.5 0.20336937201315
+		-0.45677226111814 -0.5 0.20336937201315
+		-0.48907354289964 0.5 0.10395705668972
+		-0.48907354289964 -0.5 0.10395705668972
+		-0.49999999999824 0.5 1.3267948966764e-006
+		-0.49999999999824 -0.5 1.3267948966764e-006
+		-0.48907409461153 0.5 -0.10395446108714
+		-0.48907409461153 -0.5 -0.10395446108714
+		-0.45677334042948 0.5 -0.20336694783787
+		-0.45677334042948 -0.5 -0.20336694783787
+		-0.40450943302999 0.5 -0.2938913380652
+		-0.40450943302999 -0.5 -0.2938913380652
+		-0.33456655211184 0.5 -0.3715712881911
+		-0.33456655211184 -0.5 -0.3715712881911
+		-0.25000153204922 0.5 -0.43301181735958
+		-0.25000153204922 -0.5 -0.43301181735958
+		-0.15451026378611 0.5 -0.47552768414126
+		-0.15451026378611 -0.5 -0.47552768414126
+		-0.052266166939075 0.5 -0.49726074427155
+		-0.052266166939075 -0.5 -0.49726074427155
+		0.052262208359312 0.5 -0.4972611603347
+		0.052262208359312 -0.5 -0.4972611603347
+		0.15450647821499 0.5 -0.47552891414676
+		0.15450647821499 -0.5 -0.47552891414676
+		0.24999808493408 0.5 -0.4330138075504
+		0.24999808493408 -0.5 -0.4330138075504
+		0.3345635941079 0.5 -0.37157395158649
+		0.3345635941079 -0.5 -0.37157395158649
+		0.40450709341601 0.5 -0.2938945582622
+		0.40450709341601 -0.5 -0.2938945582622
+		0.45677172145764 0.5 -0.20337058409865
+		0.45677172145764 -0.5 -0.20337058409865
+		0.48907326703854 0.5 -0.10395835448992
+		0.48907326703854 -0.5 -0.10395835448992
+		0 -0.5 0
+		0.5 0.5 0
+		0.5 -0.5 0
+		0.48907381875731 0.5 0.1039557588888
+		0.48907381875731 -0.5 0.1039557588888
+		0.45677280077542 0.5 0.20336815992623
+		0.45677280077542 -0.5 0.20336815992623
+		0.40450865316151 0.5 0.29389241146627
+		0.40450865316151 -0.5 0.29389241146627
+		0.33456556611288 0.5 0.37157217599218
+		0.33456556611288 -0.5 0.37157217599218
+		0.2500003830126 0.5 0.43301248075957
+		0.2500003830126 -0.5 0.43301248075957
+		0.15450900193016 0.5 0.47552809414644
+		0.15450900193016 -0.5 0.47552809414644
+		0.052264847412855 0.5 0.49726088296277
+		0.052264847412855 -0.5 0.49726088296277
+		-0.052263527886268 0.5 0.49726102165048
+		-0.052263527886268 -0.5 0.49726102165048
+		-0.15450774007312 0.5 0.47552850414828
+		-0.15450774007312 -0.5 0.47552850414828
+		-0.24999923397422 0.5 0.43301314415651
+		-0.24999923397422 -0.5 0.43301314415651
+		-0.33456458011157 0.5 0.37157306379065
+		-0.33456458011157 -0.5 0.37157306379065
+		-0.40450787329018 0.5 0.29389348486527
+		-0.40450787329018 -0.5 0.29389348486527
+		-0.45677226111814 0.5 0.20336937201315
+		-0.45677226111814 -0.5 0.20336937201315
+		-0.48907354289964 0.5 0.10395705668972
+		-0.48907354289964 -0.5 0.10395705668972
+		-0.49999999999824 0.5 1.3267948966764e-006
+		-0.49999999999824 -0.5 1.3267948966764e-006
+		-0.48907409461153 0.5 -0.10395446108714
+		-0.48907409461153 -0.5 -0.10395446108714
+		-0.45677334042948 0.5 -0.20336694783787
+		-0.45677334042948 -0.5 -0.20336694783787
+		-0.40450943302999 0.5 -0.2938913380652
+		-0.40450943302999 -0.5 -0.2938913380652
+		-0.33456655211184 0.5 -0.3715712881911
+		-0.33456655211184 -0.5 -0.3715712881911
+		-0.25000153204922 0.5 -0.43301181735958
+		-0.25000153204922 -0.5 -0.43301181735958
+		-0.15451026378611 0.5 -0.47552768414126
+		-0.15451026378611 -0.5 -0.47552768414126
+		-0.052266166939075 0.5 -0.49726074427155
+		-0.052266166939075 -0.5 -0.49726074427155
+		0.052262208359312 0.5 -0.4972611603347
+		0.052262208359312 -0.5 -0.4972611603347
+		0.15450647821499 0.5 -0.47552891414676
+		0.15450647821499 -0.5 -0.47552891414676
+		0.24999808493408 0.5 -0.4330138075504
+		0.24999808493408 -0.5 -0.4330138075504
+		0.3345635941079 0.5 -0.37157395158649
+		0.3345635941079 -0.5 -0.37157395158649
+		0.40450709341601 0.5 -0.2938945582622
+		0.40450709341601 -0.5 -0.2938945582622
+		0.45677172145764 0.5 -0.20337058409865
+		0.45677172145764 -0.5 -0.20337058409865
+		0.48907326703854 0.5 -0.10395835448992
+		0.48907326703854 -0.5 -0.10395835448992
+	</attribute>
+	<attribute index="1" type="float" size="4" > 
+		1 1 1 1
+		0.9 0.5 0.5 1
+		0.9 0.5 0.5 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.5 0.1 0.1 1
+		0.5 0.1 0.1 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.9 0.5 0.5 1
+		0.9 0.5 0.5 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.5 0.1 0.1 1
+		0.5 0.1 0.1 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.9 0.5 0.5 1
+		0.9 0.5 0.5 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.5 0.1 0.1 1
+		0.5 0.1 0.1 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		1 1 1 1
+		0.9 0.5 0.5 1
+		0.9 0.5 0.5 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.5 0.1 0.1 1
+		0.5 0.1 0.1 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.9 0.5 0.5 1
+		0.9 0.5 0.5 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.5 0.1 0.1 1
+		0.5 0.1 0.1 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.9 0.5 0.5 1
+		0.9 0.5 0.5 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.5 0.1 0.1 1
+		0.5 0.1 0.1 1
+		0.58 0.18 0.18 1
+		0.58 0.18 0.18 1
+		0.66 0.26 0.26 1
+		0.66 0.26 0.26 1
+		0.74 0.34 0.34 1
+		0.74 0.34 0.34 1
+		0.82 0.42 0.42 1
+		0.82 0.42 0.42 1
+	</attribute>
+	<attribute index="2" type="float" size="3" > 
+		0 1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 1 0
+		0 -1 0
+		0 -1 0
+		1 0 0
+		1 0 0
+		0.97814763751461 0 0.20791151777759
+		0.97814763751461 0 0.20791151777759
+		0.91354560155084 0 0.40673631985245
+		0.91354560155084 0 0.40673631985245
+		0.80901730632302 0 0.58778482293254
+		0.80901730632302 0 0.58778482293254
+		0.66913113222576 0 0.74314435198437
+		0.66913113222576 0 0.74314435198437
+		0.5000007660252 0 0.86602496151913
+		0.5000007660252 0 0.86602496151913
+		0.30901800386032 0 0.95105618829288
+		0.30901800386032 0 0.95105618829288
+		0.10452969482571 0 0.99452176592553
+		0.10452969482571 0 0.99452176592553
+		-0.10452705577254 0 0.99452204330096
+		-0.10452705577254 0 0.99452204330096
+		-0.30901548014624 0 0.95105700829655
+		-0.30901548014624 0 0.95105700829655
+		-0.49999846794844 0 0.86602628831301
+		-0.49999846794844 0 0.86602628831301
+		-0.66912916022314 0 0.7431461275813
+		-0.66912916022314 0 0.7431461275813
+		-0.80901574658037 0 0.58778696973054
+		-0.80901574658037 0 0.58778696973054
+		-0.91354452223627 0 0.40673874402631
+		-0.91354452223627 0 0.40673874402631
+		-0.97814708579929 0 0.20791411337945
+		-0.97814708579929 0 0.20791411337945
+		-0.99999999999648 0 2.6535897933527e-006
+		-0.99999999999648 0 2.6535897933527e-006
+		-0.97814818922305 0 -0.20790892217427
+		-0.97814818922305 0 -0.20790892217427
+		-0.91354668085897 0 -0.40673389567574
+		-0.91354668085897 0 -0.40673389567574
+		-0.80901886605998 0 -0.58778267613041
+		-0.80901886605998 0 -0.58778267613041
+		-0.66913310422368 0 -0.74314257638221
+		-0.66913310422368 0 -0.74314257638221
+		-0.50000306409843 0 -0.86602363471916
+		-0.50000306409843 0 -0.86602363471916
+		-0.30902052757222 0 -0.95105536828251
+		-0.30902052757222 0 -0.95105536828251
+		-0.10453233387815 0 -0.9945214885431
+		-0.10453233387815 0 -0.9945214885431
+		0.10452441671862 0 -0.99452232066939
+		0.10452441671862 0 -0.99452232066939
+		0.30901295642998 0 -0.95105782829353
+		0.30901295642998 0 -0.95105782829353
+		0.49999616986816 0 -0.8660276151008
+		0.49999616986816 0 -0.8660276151008
+		0.66912718821581 0 -0.74314790317299
+		0.66912718821581 0 -0.74314790317299
+		0.80901418683202 0 -0.5877891165244
+		0.80901418683202 0 -0.5877891165244
+		0.91354344291528 0 -0.40674116819729
+		0.91354344291528 0 -0.40674116819729
+		0.97814653407707 0 -0.20791670897984
+		0.97814653407707 0 -0.20791670897984
+	</attribute>
+	<vao name="lit-color" >
+		<source attrib="0" />
+		<source attrib="1" />
+		<source attrib="2" />
+	</vao>
+	<vao name="lit" >
+		<source attrib="0" />
+		<source attrib="2" />
+	</vao>
+	<vao name="color" >
+		<source attrib="0" />
+		<source attrib="1" />
+	</vao>
+	<indices cmd="tri-fan" type="ushort" >0 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 1</indices>
+	<indices cmd="tri-fan" type="ushort" >61 60 58 56 54 52 50 48 46 44 42 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 60</indices>
+	<indices cmd="tri-strip" type="ushort" >62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 62 63</indices>
+</mesh>
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.