parameters: (self)
return_statement: return
docstring: // This is the much faster version of the above member 
  		// function, however the speed increase is not gained 
  		// without a cost. If you rotate or translate the projection
  		// matrix then this member will not work correctly. That is acceptable
  		// in my book considering I very rarely do such a thing.
  		// This function has far fewer operations in it and I 
  		// shaved off 2 square root functions by passing in the
  		// near and far values. This member has:
  		// 38 muliplications, 28 additions, 24 divisions, and
  		// 12 subtractions for a total of 102 operations. Still hurts
  		// but at least it is decent now. In practice this will 
  		// run about 2 times faster than the above function.
docstring_summary: // This is the much faster version of the above member 
  		// function, however the speed increase is not gained 
  		// without a cost. If you rotate or translate the projection
  		// matrix then this member will not work correctly. That is acceptable
  		// in my book considering I very rarely do such a thing.
  		// This function has far fewer operations in it and I 
  		// shaved off 2 square root functions by passing in the
  		// near and far values. This member has:
  		// 38 muliplications, 28 additions, 24 divisions, and
  		// 12 subtractions for a total of 102 operations. Still hurts
  		// but at least it is decent now. In practice this will 
  		// run about 2 times faster than the above function.
docstring_tokens: // This is the much faster version of the above member // function however the speed increase is not gained // without a cost . If you rotate or translate the projection // matrix then this member will not work correctly . That is acceptable // in my book considering I very rarely do such a thing . // This function has far fewer operations in it and I // shaved off 2 square root functions by passing in the // near and far values . This member has : // 38 muliplications 28 additions 24 divisions and // 12 subtractions for a total of 102 operations . Still hurts // but at least it is decent now . In practice this will // run about 2 times faster than the above function .
function: def UpdateFrustumFaster (self):
  		""" // This is the much faster version of the above member 
  		// function, however the speed increase is not gained 
  		// without a cost. If you rotate or translate the projection
  		// matrix then this member will not work correctly. That is acceptable
  		// in my book considering I very rarely do such a thing.
  		// This function has far fewer operations in it and I 
  		// shaved off 2 square root functions by passing in the
  		// near and far values. This member has:
  		// 38 muliplications, 28 additions, 24 divisions, and
  		// 12 subtractions for a total of 102 operations. Still hurts
  		// but at least it is decent now. In practice this will 
  		// run about 2 times faster than the above function. """
  
  		# /* Get the current PROJECTION matrix from OpenGL */
  		proj = glGetFloatv( GL_PROJECTION_MATRIX);
  	
  		# /* Get the current MODELVIEW matrix from OpenGL */
  		modl = glGetFloatv( GL_MODELVIEW_MATRIX);
  	
  		# /* Combine the two matrices (multiply projection by modelview) 
  	   	# but keep in mind this function will only work if you do NOT
  	   	# rotate or translate your projection matrix                  */
  		clip = [0,] * 16
  		modl_row1 = modl [0]
  		clip[ 0] = modl [0] [0] * proj[0][0];
  		clip[ 1] = modl  [0][ 1] * proj[1][1];
  		clip[ 2] = modl [0][ 2] * proj[2][2] + modl_row1[ 3] * proj[3][2]
  		clip[ 3] = modl [0][ 2] * proj[2][3]
  	
  		modl_row2 = modl [1]
  		clip[ 4] = modl_row2[ 0] * proj[0][0]
  		clip[ 5] = modl_row2[ 1] * proj[1][1]
  		clip[ 6] = modl_row2[ 2] * proj[2][2] + modl_row2[ 3] * proj[3][2]
  		clip[ 7] = modl_row2[ 2] * proj[2][3]
  	
  		modl_row3 = modl [2]
  		clip[ 8] = modl_row3[ 0] * proj[0][0];
  		clip[ 9] = modl_row3[ 1] * proj[1][1]
  		clip[10] = modl_row3[2] * proj[2][2] + modl_row3[3] * proj[3][2]
  		clip[11] = modl_row3[2] * proj[2][3]
  	
  		modl_row4 = modl [3]
  		clip[12] = modl_row4[0] * proj[0][0]
  		clip[13] = modl_row4[1] * proj[1][1]
  		clip[14] = modl_row4[2] * proj[2][2] + modl_row4[3] * proj[3][2]
  		clip[15] = modl_row4[2] * proj[2][3]
  	
  		# ### Use a shortened name to reference to our camera's Frustum (does 
  		# ### not copy anything, just a ref to make code less wordy
  		Frustum = self.m_Frustum
  
  		# /* Extract the numbers for the RIGHT plane */
  		Frustum[0][0] = clip[ 3] - clip[ 0];
  		Frustum[0][1] = clip[ 7] - clip[ 4];
  		Frustum[0][2] = clip[11] - clip[ 8];
  		Frustum[0][3] = clip[15] - clip[12];
  	
  		# /* Normalize the result */
  		t = sqrt( (Frustum[0][0] * Frustum[0][0]) + (Frustum[0][1] * Frustum[0][1]) + (Frustum[0][2] * Frustum[0][2]) );
  		Frustum[0][0] /= t;
  		Frustum[0][1] /= t;
  		Frustum[0][2] /= t;
  		Frustum[0][3] /= t;
  	
   		# /* Extract the numbers for the LEFT plane */
   		Frustum[1][0] = clip[ 3] + clip[ 0];
   		Frustum[1][1] = clip[ 7] + clip[ 4];
   		Frustum[1][2] = clip[11] + clip[ 8];
   		Frustum[1][3] = clip[15] + clip[12];
  	
      	# /* Normalize the result */
   		t = sqrt( Frustum[1][0] * Frustum[1][0] + Frustum[1][1] * Frustum[1][1] + Frustum[1][2] * Frustum[1][2] );
   		Frustum[1][0] /= t;
   		Frustum[1][1] /= t;
   		Frustum[1][2] /= t;
   		Frustum[1][3] /= t;
  	
  		# /* Extract the BOTTOM plane */
  		Frustum[2][0] = clip[ 3] + clip[ 1];
  		Frustum[2][1] = clip[ 7] + clip[ 5];
  		Frustum[2][2] = clip[11] + clip[ 9];
  		Frustum[2][3] = clip[15] + clip[13];
  	
      	# /* Normalize the result */
  		t = sqrt( Frustum[2][0] * Frustum[2][0] + Frustum[2][1] * Frustum[2][1] + Frustum[2][2] * Frustum[2][2] );
  		Frustum[2][0] /= t;
  		Frustum[2][1] /= t;
  		Frustum[2][2] /= t;
  		Frustum[2][3] /= t;
  	
      	# /* Extract the TOP plane */
   		Frustum[3][0] = clip[ 3] - clip[ 1];
   		Frustum[3][1] = clip[ 7] - clip[ 5];
   		Frustum[3][2] = clip[11] - clip[ 9];
   		Frustum[3][3] = clip[15] - clip[13];
  	
      	# /* Normalize the result */
   		t = sqrt( Frustum[3][0] * Frustum[3][0] + Frustum[3][1] * Frustum[3][1] + Frustum[3][2] * Frustum[3][2] );
   		Frustum[3][0] /= t;
   		Frustum[3][1] /= t;
   		Frustum[3][2] /= t;
   		Frustum[3][3] /= t;
  	
      	# /* Extract the FAR plane */
   		Frustum[4][0] = clip[ 3] - clip[ 2];
   		Frustum[4][1] = clip[ 7] - clip[ 6];
   		Frustum[4][2] = clip[11] - clip[10];
   		Frustum[4][3] = clip[15] - clip[14];
  	
      	# /* Normalize the result */
   		t = sqrt( (Frustum[4][0] * Frustum[4][0]) + (Frustum[4][1] * Frustum[4][1]) + (Frustum[4][2] * Frustum[4][2]) );
   		Frustum[4][0] /= t;
   		Frustum[4][1] /= t;
   		Frustum[4][2] /= t;
   		Frustum[4][3] /= t;
  	
      	# /* Extract the NEAR plane */
   		Frustum[5][0] = clip[ 3] + clip[ 2];
   		Frustum[5][1] = clip[ 7] + clip[ 6];
   		Frustum[5][2] = clip[11] + clip[10];
   		Frustum[5][3] = clip[15] + clip[14];
  	
   		# /* Normalize the result */
   		t = sqrt( Frustum[5][0] * Frustum[5][0] + Frustum[5][1] * Frustum[5][1] + Frustum[5][2] * Frustum[5][2] );
   		Frustum[5][0] /= t;
   		Frustum[5][1] /= t;
   		Frustum[5][2] /= t;
   		Frustum[5][3] /= t;
  
  		return
function_tokens: def UpdateFrustumFaster ( self ) : # /* Get the current PROJECTION matrix from OpenGL */ proj = glGetFloatv ( GL_PROJECTION_MATRIX ) # /* Get the current MODELVIEW matrix from OpenGL */ modl = glGetFloatv ( GL_MODELVIEW_MATRIX ) # /* Combine the two matrices (multiply projection by modelview)  # but keep in mind this function will only work if you do NOT # rotate or translate your projection matrix                  */ clip = [ 0 , ] * 16 modl_row1 = modl [ 0 ] clip [ 0 ] = modl [ 0 ] [ 0 ] * proj [ 0 ] [ 0 ] clip [ 1 ] = modl [ 0 ] [ 1 ] * proj [ 1 ] [ 1 ] clip [ 2 ] = modl [ 0 ] [ 2 ] * proj [ 2 ] [ 2 ] + modl_row1 [ 3 ] * proj [ 3 ] [ 2 ] clip [ 3 ] = modl [ 0 ] [ 2 ] * proj [ 2 ] [ 3 ] modl_row2 = modl [ 1 ] clip [ 4 ] = modl_row2 [ 0 ] * proj [ 0 ] [ 0 ] clip [ 5 ] = modl_row2 [ 1 ] * proj [ 1 ] [ 1 ] clip [ 6 ] = modl_row2 [ 2 ] * proj [ 2 ] [ 2 ] + modl_row2 [ 3 ] * proj [ 3 ] [ 2 ] clip [ 7 ] = modl_row2 [ 2 ] * proj [ 2 ] [ 3 ] modl_row3 = modl [ 2 ] clip [ 8 ] = modl_row3 [ 0 ] * proj [ 0 ] [ 0 ] clip [ 9 ] = modl_row3 [ 1 ] * proj [ 1 ] [ 1 ] clip [ 10 ] = modl_row3 [ 2 ] * proj [ 2 ] [ 2 ] + modl_row3 [ 3 ] * proj [ 3 ] [ 2 ] clip [ 11 ] = modl_row3 [ 2 ] * proj [ 2 ] [ 3 ] modl_row4 = modl [ 3 ] clip [ 12 ] = modl_row4 [ 0 ] * proj [ 0 ] [ 0 ] clip [ 13 ] = modl_row4 [ 1 ] * proj [ 1 ] [ 1 ] clip [ 14 ] = modl_row4 [ 2 ] * proj [ 2 ] [ 2 ] + modl_row4 [ 3 ] * proj [ 3 ] [ 2 ] clip [ 15 ] = modl_row4 [ 2 ] * proj [ 2 ] [ 3 ] # ### Use a shortened name to reference to our camera's Frustum (does  # ### not copy anything, just a ref to make code less wordy Frustum = self . m_Frustum # /* Extract the numbers for the RIGHT plane */ Frustum [ 0 ] [ 0 ] = clip [ 3 ] - clip [ 0 ] Frustum [ 0 ] [ 1 ] = clip [ 7 ] - clip [ 4 ] Frustum [ 0 ] [ 2 ] = clip [ 11 ] - clip [ 8 ] Frustum [ 0 ] [ 3 ] = clip [ 15 ] - clip [ 12 ] # /* Normalize the result */ t = sqrt ( ( Frustum [ 0 ] [ 0 ] * Frustum [ 0 ] [ 0 ] ) + ( Frustum [ 0 ] [ 1 ] * Frustum [ 0 ] [ 1 ] ) + ( Frustum [ 0 ] [ 2 ] * Frustum [ 0 ] [ 2 ] ) ) Frustum [ 0 ] [ 0 ] /= t Frustum [ 0 ] [ 1 ] /= t Frustum [ 0 ] [ 2 ] /= t Frustum [ 0 ] [ 3 ] /= t # /* Extract the numbers for the LEFT plane */ Frustum [ 1 ] [ 0 ] = clip [ 3 ] + clip [ 0 ] Frustum [ 1 ] [ 1 ] = clip [ 7 ] + clip [ 4 ] Frustum [ 1 ] [ 2 ] = clip [ 11 ] + clip [ 8 ] Frustum [ 1 ] [ 3 ] = clip [ 15 ] + clip [ 12 ] # /* Normalize the result */ t = sqrt ( Frustum [ 1 ] [ 0 ] * Frustum [ 1 ] [ 0 ] + Frustum [ 1 ] [ 1 ] * Frustum [ 1 ] [ 1 ] + Frustum [ 1 ] [ 2 ] * Frustum [ 1 ] [ 2 ] ) Frustum [ 1 ] [ 0 ] /= t Frustum [ 1 ] [ 1 ] /= t Frustum [ 1 ] [ 2 ] /= t Frustum [ 1 ] [ 3 ] /= t # /* Extract the BOTTOM plane */ Frustum [ 2 ] [ 0 ] = clip [ 3 ] + clip [ 1 ] Frustum [ 2 ] [ 1 ] = clip [ 7 ] + clip [ 5 ] Frustum [ 2 ] [ 2 ] = clip [ 11 ] + clip [ 9 ] Frustum [ 2 ] [ 3 ] = clip [ 15 ] + clip [ 13 ] # /* Normalize the result */ t = sqrt ( Frustum [ 2 ] [ 0 ] * Frustum [ 2 ] [ 0 ] + Frustum [ 2 ] [ 1 ] * Frustum [ 2 ] [ 1 ] + Frustum [ 2 ] [ 2 ] * Frustum [ 2 ] [ 2 ] ) Frustum [ 2 ] [ 0 ] /= t Frustum [ 2 ] [ 1 ] /= t Frustum [ 2 ] [ 2 ] /= t Frustum [ 2 ] [ 3 ] /= t # /* Extract the TOP plane */ Frustum [ 3 ] [ 0 ] = clip [ 3 ] - clip [ 1 ] Frustum [ 3 ] [ 1 ] = clip [ 7 ] - clip [ 5 ] Frustum [ 3 ] [ 2 ] = clip [ 11 ] - clip [ 9 ] Frustum [ 3 ] [ 3 ] = clip [ 15 ] - clip [ 13 ] # /* Normalize the result */ t = sqrt ( Frustum [ 3 ] [ 0 ] * Frustum [ 3 ] [ 0 ] + Frustum [ 3 ] [ 1 ] * Frustum [ 3 ] [ 1 ] + Frustum [ 3 ] [ 2 ] * Frustum [ 3 ] [ 2 ] ) Frustum [ 3 ] [ 0 ] /= t Frustum [ 3 ] [ 1 ] /= t Frustum [ 3 ] [ 2 ] /= t Frustum [ 3 ] [ 3 ] /= t # /* Extract the FAR plane */ Frustum [ 4 ] [ 0 ] = clip [ 3 ] - clip [ 2 ] Frustum [ 4 ] [ 1 ] = clip [ 7 ] - clip [ 6 ] Frustum [ 4 ] [ 2 ] = clip [ 11 ] - clip [ 10 ] Frustum [ 4 ] [ 3 ] = clip [ 15 ] - clip [ 14 ] # /* Normalize the result */ t = sqrt ( ( Frustum [ 4 ] [ 0 ] * Frustum [ 4 ] [ 0 ] ) + ( Frustum [ 4 ] [ 1 ] * Frustum [ 4 ] [ 1 ] ) + ( Frustum [ 4 ] [ 2 ] * Frustum [ 4 ] [ 2 ] ) ) Frustum [ 4 ] [ 0 ] /= t Frustum [ 4 ] [ 1 ] /= t Frustum [ 4 ] [ 2 ] /= t Frustum [ 4 ] [ 3 ] /= t # /* Extract the NEAR plane */ Frustum [ 5 ] [ 0 ] = clip [ 3 ] + clip [ 2 ] Frustum [ 5 ] [ 1 ] = clip [ 7 ] + clip [ 6 ] Frustum [ 5 ] [ 2 ] = clip [ 11 ] + clip [ 10 ] Frustum [ 5 ] [ 3 ] = clip [ 15 ] + clip [ 14 ] # /* Normalize the result */ t = sqrt ( Frustum [ 5 ] [ 0 ] * Frustum [ 5 ] [ 0 ] + Frustum [ 5 ] [ 1 ] * Frustum [ 5 ] [ 1 ] + Frustum [ 5 ] [ 2 ] * Frustum [ 5 ] [ 2 ] ) Frustum [ 5 ] [ 0 ] /= t Frustum [ 5 ] [ 1 ] /= t Frustum [ 5 ] [ 2 ] /= t Frustum [ 5 ] [ 3 ] /= t return