Axiom.Serialization.MeshSerializerImplv12.ReadGeometryBinormals C# (CSharp) Метод

ReadGeometryBinormals() защищенный Метод

protected ReadGeometryBinormals ( short bindIdx, BinaryReader reader, VertexData data ) : void
bindIdx short
reader System.IO.BinaryReader
data Axiom.Graphics.VertexData
Результат void
		protected virtual void ReadGeometryBinormals( short bindIdx, BinaryReader reader, VertexData data )
		{
			// add an element for normals
			data.vertexDeclaration.AddElement( bindIdx, 0, VertexElementType.Float3, VertexElementSemantic.Binormal );

			HardwareVertexBuffer vBuffer = HardwareBufferManager.Instance.CreateVertexBuffer( data.vertexDeclaration.Clone( bindIdx ), data.vertexCount, mesh.VertexBufferUsage, mesh.UseVertexShadowBuffer );

			// lock the buffer for editing
			IntPtr buf = vBuffer.Lock( BufferLocking.Discard );

			// stuff the floats into the buffer
			ReadFloats( reader, data.vertexCount * 3, buf );

			// unlock the buffer to commit
			vBuffer.Unlock();

			// bind this buffer
			data.vertexBufferBinding.SetBinding( bindIdx, vBuffer );
		}