public void CalcTangents()
	{
		for(int i = 0; i < m_indices.size(); i += 3)
		{
			int i0 = m_indices.get(i);
			int i1 = m_indices.get(i + 1);
			int i2 = m_indices.get(i + 2);

			Vector3f edge1 = m_positions.get(i1).Sub(m_positions.get(i0));
			Vector3f edge2 = m_positions.get(i2).Sub(m_positions.get(i0));

			float deltaU1 = m_texCoords.get(i1).GetX() - m_texCoords.get(i0).GetX();
			float deltaV1 = m_texCoords.get(i1).GetY() - m_texCoords.get(i0).GetY();
			float deltaU2 = m_texCoords.get(i2).GetX() - m_texCoords.get(i0).GetX();
			float deltaV2 = m_texCoords.get(i2).GetY() - m_texCoords.get(i0).GetY();

			float dividend = (deltaU1*deltaV2 - deltaU2*deltaV1);
			//TODO: The first 0.0f may need to be changed to 1.0f here.
			float f = dividend == 0 ? 0.0f : 1.0f/dividend;

			Vector3f tangent = new Vector3f(0,0,0);
			tangent.SetX(f * (deltaV2 * edge1.GetX() - deltaV1 * edge2.GetX()));
			tangent.SetY(f * (deltaV2 * edge1.GetY() - deltaV1 * edge2.GetY()));
			tangent.SetZ(f * (deltaV2 * edge1.GetZ() - deltaV1 * edge2.GetZ()));

			m_tangents.get(i0).Set(m_tangents.get(i0).Add(tangent));
			m_tangents.get(i1).Set(m_tangents.get(i1).Add(tangent));
			m_tangents.get(i2).Set(m_tangents.get(i2).Add(tangent));
		}

		for(int i = 0; i < m_tangents.size(); i++)
			m_tangents.get(i).Set(m_tangents.get(i).Normalized());
	}