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

Simple utility functions that should really be in a C module

 
Modules
            
copy
copy_reg
math
multiarray
pickle
string
types
OpenGLContext.vectorutilities
 
Functions
            
crossProduct(first, second)
Given 2 4-item vectors, return the cross product as a 4-item vector
magnitude(vector)
Given a 3 or 4-item vector, return the vector's magnitude
normalise(vector)
Given a 3 or 4-item vector, return a 3-item unit vector
plane2PointNormal((a, b, c, d))
Get a point and normal from a plane equation
pointNormal2Plane(point, normal)
Create parametric equation of plane from point and normal
rotMatrix((x, y, z, a))
Given rotation as x,y,z,a (a in radians), return rotation matrix
 
Returns a 4x4 rotation matrix for the given rotation,
the matrix is a Numeric Python array.
 
x,y,z should be a unit vector.