Geometry package
Bases: object
Defines an orientation by maintaining a forward and up vector (and a derived right, orthogonal to both.)
Constructs an orientation looking along the forward vector. If none is given then defaul to the negative Z axis.
If up is specified, it must lie at right angles to forward. If none is given then a default is chosen, the vector at right angles to forward which lies closest to the positive Y axis.
Orientation.Identity, which results in zero rotation, is with forward pointing along the negative Z axis, up along the positive Y axis (and hence right along the positive X axis.)
The forward vector
The matrix that the OpenGL modelview matrix should be multiplied by to represent this orientation. It’s likely that this method will disappear in later releases of Gloopy.
Rotate new Orientation, rotated about the ‘forward’ axis (ie. +ve angle rolls to the right.)
The up vector
alias of c_float_Array_16
Bases: gloopy.geom.vector.VectorBase
3-component named tuple: (x, y, z), with some methods, including value type equality semantics.
Arithmetic operators are supported:
A new random Vector, evenly distributed within a cube of size sides.
A new random Vector, evenly distributed on surface a sphere of radius.
A new random Vector, evenly distributed within a sphere of radius.
Return a new vector, the cross product a x b = (a2b3 - a3b2, a3b1 - a1b3, a1b2 - a2b1) http://en.wikipedia.org/wiki/Cross_product