OpenGLContext.vectorutilities
index
p:\openglcontext\vectorutilities.py

Utilities for processing arrays of vectors

 
Functions
            
crossProduct(set1, set2)
Compute element-wise cross-product of two arrays of vectors.
 
set1, set2 -- sequence objects with 1 or more
        3-item vector values.  If both sets are
        longer than 1 vector, they must be the same
        length.
 
returns a double array with x elements,
where x is the number of 3-element vectors
in the longer set
magnitude(vectors)
Calculate the magnitudes of the given vectors
 
vectors -- sequence object with 1 or more
        3-item vector values.
 
returns a double array with x elements,
where x is the number of 3-element vectors
normalise(vectors)
Get normalised versions of the vectors.
 
vectors -- sequence object with 1 or more
        3-item vector values.
 
returns a double array with x 3-element vectors,
where x is the number of 3-element vectors in "vectors"
 
Will raise ZeroDivisionError if there are 0-magnitude
vectors in the set.

 
Data
             __file__ = r'p:\OpenGLContext\vectorutilities.pyc'
__name__ = 'OpenGLContext.vectorutilities'