 			
 			var vertexStream 	: IVertexStream = getVertexStream(0);
 			
-			var xyzVertexStream : VertexStream 	= vertexStream.getStreamByComponent(VertexComponent.XYZ);
-			var format 			: VertexFormat 	= xyzVertexStream.format;
+			var xyzStream 		: VertexStream 	= vertexStream.getStreamByComponent(VertexComponent.XYZ);
+			var format 			: VertexFormat 	= xyzStream.format;
 			var xyzVertexSize 	: uint 			= format.numBytesPerVertex;
 			var offset			: uint 			= format.getOffsetForComponent(VertexComponent.XYZ);
 			

			return this;				
		}
		
		public function flipNormals(flipTangents : Boolean = true) : Geometry
		{
			var numStreams 	: uint 		= this.numVertexStreams;

				{
					minDistance = t;
					triangleIndice = verticeIndex;
					
					if (hitUV)
					{
						lambda.x = u
						lambda.y = v
					}
				}
			}
			
			if (triangleIndice >= 0)
			{
				if (hitXYZ)
				{
					var origin 		: Vector4 	= ray.origin;
					var direction 	: Vector4	= ray.direction;
					
					hitXYZ.x = origin.x + minDistance * direction.x;
					hitXYZ.y = origin.y + minDistance * direction.y;
					hitXYZ.z = origin.z + minDistance * direction.z;
				}
				
				if (hitUV)
				{
					var uvStream : VertexStream = vertexStream.getStreamByComponent(VertexComponent.UV);
					
					if (!uvStream)
						throw new Error('Missing vertex component: u, v');
					
					var uvData 			: ByteArray = uvStream == xyzStream ? xyzData : uvStream.lock();
					var uvVertexSize 	: uint 		= uvStream.format.numBytesPerVertex;
					var uvOffset 		: uint 		= uvStream.format.getOffsetForComponent(VertexComponent.UV);
					
					indicesData.position = triangleIndice * 2;
					
					uvData.position = indicesData.readUnsignedShort() * uvVertexSize + uvOffset;
					var u0  : Number = uvData.readFloat();
					var v0  : Number = uvData.readFloat();
					
					uvData.position = indicesData.readUnsignedShort() * uvVertexSize + uvOffset;
					var u1  : Number = uvData.readFloat();
					var v1  : Number = uvData.readFloat();
					
					uvData.position = indicesData.readUnsignedShort() * uvVertexSize + uvOffset;
					var u2  : Number = uvData.readFloat();
					var v2  : Number = uvData.readFloat(); 
					
					lambda.z = 1 - lambda.x - lambda.y;
					
					hitUV.x = lambda.z * u0 + lambda.x*u1 + lambda.y * u2;
					hitUV.y = lambda.z * v0 + lambda.x*v1 + lambda.y * v2;
					
					if (uvStream != xyzStream)
						uvStream.unlock(false);
				}
			}
			
			_indexStream.unlock(false);
			xyzStream.unlock(false);
			
			return triangleIndice / 3;				
		}
		
		/**
		 * Invert the winding of the triangles by rewritting the IndexStream. Inverting the winding
		 * means that the front faces will become back faces and vice versa.
		 *  
		 * @param flipNormals
		 * @param flipTangents
		 * @return 
		 * 
		 */
		public function invertWinding(flipNormals : Boolean = true, flipTangents : Boolean = true) : Geometry
		{
			var numIndices		: uint		= indexStream.length;
