parameters: (self, block, points, velocities, masses, outputForce)
docstring: Compute output force in the case that the useMaxDistance is not set.
docstring_summary: Compute output force in the case that the useMaxDistance is not set.
docstring_tokens: Compute output force in the case that the useMaxDistance is not set .
function: def __applyNoMaxDist(self, block, points, velocities, masses, outputForce):
  		"""
  		Compute output force in the case that the useMaxDistance is not set.
  		"""
  		# points and velocities should have the same length. If not return.
  		#
  		if points.length() != velocities.length():
  			return
  
  		# clear the output force array
  		#
  		outputForce.clear()
  
  		# get field parameters.
  		#
  		magValue = self.__magnitudeValue(block)
  		minDist = self.__minDistanceValue(block)
  		attractDist = self.__attractDistanceValue(block)
  		repelDist = self.__repelDistanceValue(block)
  		dragMag = self.__dragValue(block)
  		swarmAmp = self.__swarmAmplitudeValue(block)
  
  		# get owner's data. posArray may have only one point which is the centroid
  		# (if this has owner) or field position(if without owner). Or it may have
  		# a list of points if with owner and applyPerVertex.
  		#
  		posArray = self.__ownerPosition(block)
  
  		fieldPosCount = posArray.length()
  		receptorSize = points.length()
  
  		# With this model,if max distance isn't set then we
  		# also don't attenuate, because 1 - dist/maxDist isn't
  		# meaningful. No max distance and no attenuation.
  		#
  		for ptIndex in range(receptorSize):
  			forceV = OpenMaya.MVector(0.0,0.0,0.0)
  			receptorPoint = points[ptIndex]
  
  			# Apply from every field position to every receptor position.
  			#
  			distance = 0.0
  			for i in range(fieldPosCount-1, -1, -1):
  				difference = receptorPoint - posArray[i]
  				distance = difference.length()
  
  				if distance < minDist:
  					continue
  
  				if distance <= repelDist:
  					forceV += difference * magValue
  				elif distance >= attractDist:
  					forceV += -difference * magValue
  
  			# Apply drag/swarm only if the object is inside the zone
  			# the repulsion-attraction is pushing the object to.
  			#
  			if distance >= repelDist and distance <= attractDist:
  				if dragMag > 0:
  					if fieldPosCount > 0:
  						dragForceV = velocities[ptIndex] * (-dragMag) * fieldPosCount
  						forceV += dragForceV
  
  				if swarmAmp > 0:
  					frequency = self.__swarmFrequencyValue(block)
  					phase = OpenMaya.MVector(0.0, 0.0, frequency)
  
  					# Add swarm in here
  					#
  					for i in range(fieldPosCount-1, -1, -1):
  						difference = receptorPoint - posArray[i]
  						difference = (difference + phase) * frequency
  
  						noiseEffect = [ difference[i] for i in range(3) ]
  						if( (noiseEffect[0] < -2147483647.0) or
  							(noiseEffect[0] >  2147483647.0) or
  							(noiseEffect[1] < -2147483647.0) or
  							(noiseEffect[1] >  2147483647.0) or
  							(noiseEffect[2] < -2147483647.0) or
  							(noiseEffect[2] >  2147483647.0) ):
  							continue
  
  						noiseOut = self.__noiseFunction(noiseEffect)
  						swarmForce = OpenMaya.MVector(noiseOut[0] * swarmAmp,
  														noiseOut[1] * swarmAmp,
  														noiseOut[2] * swarmAmp)
  						forceV += swarmForce
  
  			outputForce.append(forceV)
function_tokens: def __applyNoMaxDist ( self , block , points , velocities , masses , outputForce ) : # points and velocities should have the same length. If not return. # if points . length ( ) != velocities . length ( ) : return # clear the output force array # outputForce . clear ( ) # get field parameters. # magValue = self . __magnitudeValue ( block ) minDist = self . __minDistanceValue ( block ) attractDist = self . __attractDistanceValue ( block ) repelDist = self . __repelDistanceValue ( block ) dragMag = self . __dragValue ( block ) swarmAmp = self . __swarmAmplitudeValue ( block ) # get owner's data. posArray may have only one point which is the centroid # (if this has owner) or field position(if without owner). Or it may have # a list of points if with owner and applyPerVertex. # posArray = self . __ownerPosition ( block ) fieldPosCount = posArray . length ( ) receptorSize = points . length ( ) # With this model,if max distance isn't set then we # also don't attenuate, because 1 - dist/maxDist isn't # meaningful. No max distance and no attenuation. # for ptIndex in range ( receptorSize ) : forceV = OpenMaya . MVector ( 0.0 , 0.0 , 0.0 ) receptorPoint = points [ ptIndex ] # Apply from every field position to every receptor position. # distance = 0.0 for i in range ( fieldPosCount - 1 , - 1 , - 1 ) : difference = receptorPoint - posArray [ i ] distance = difference . length ( ) if distance < minDist : continue if distance <= repelDist : forceV += difference * magValue elif distance >= attractDist : forceV += - difference * magValue # Apply drag/swarm only if the object is inside the zone # the repulsion-attraction is pushing the object to. # if distance >= repelDist and distance <= attractDist : if dragMag > 0 : if fieldPosCount > 0 : dragForceV = velocities [ ptIndex ] * ( - dragMag ) * fieldPosCount forceV += dragForceV if swarmAmp > 0 : frequency = self . __swarmFrequencyValue ( block ) phase = OpenMaya . MVector ( 0.0 , 0.0 , frequency ) # Add swarm in here # for i in range ( fieldPosCount - 1 , - 1 , - 1 ) : difference = receptorPoint - posArray [ i ] difference = ( difference + phase ) * frequency noiseEffect = [ difference [ i ] for i in range ( 3 ) ] if ( ( noiseEffect [ 0 ] < - 2147483647.0 ) or ( noiseEffect [ 0 ] > 2147483647.0 ) or ( noiseEffect [ 1 ] < - 2147483647.0 ) or ( noiseEffect [ 1 ] > 2147483647.0 ) or ( noiseEffect [ 2 ] < - 2147483647.0 ) or ( noiseEffect [ 2 ] > 2147483647.0 ) ) : continue noiseOut = self . __noiseFunction ( noiseEffect ) swarmForce = OpenMaya . MVector ( noiseOut [ 0 ] * swarmAmp , noiseOut [ 1 ] * swarmAmp , noiseOut [ 2 ] * swarmAmp ) forceV += swarmForce outputForce . append ( forceV )