OpenGL.arrays.numarrays | index /home/mcfletch/pylive/OpenGL/arrays/numarrays.py

`NumArray implementation of the OpenGL-ctypes array interfaces`

Modules
`` |  |
OpenGL.constant OpenGL.constants | OpenGL.arrays.formathandler OpenGL.arrays._numarray_1_3_1 | numarray OpenGL.arrays.numericnames | operator

Classes
`` |  | FormatHandler(object) NumarrayHandler
class NumarrayHandler(FormatHandler)
`` | `Numarray-specific data-type handler for OpenGL`
| Method resolution order: NumarrayHandler FormatHandler object Methods defined here: arraySize(self, value, typeCode=None) `Given a data-value, calculate dimensions for the array` arrayToGLType(self, value) `Given a value, guess OpenGL type of the corresponding pointer` asArray(self, value, typecode=None) `Convert given value to an array value of given typecode` contiguous(self, source, typecode=None) `Get contiguous array from source source -- numarray Python array (or compatible object) for use as the data source. If this is not a contiguous array of the given typecode, a copy will be made, otherwise will just be returned unchanged. typecode -- optional 1-character typecode specifier for the numarray.array function. All gl*Pointer calls should use contiguous arrays, as non- contiguous arrays will be re-copied on every rendering pass. Although this doesn't raise an error, it does tend to slow down rendering.` dimensions(self, value, typeCode=None) `Determine dimensions of the passed array value (if possible)` ones(self, dims, typeCode='d') `Return Numpy array of ones in given size` unitSize(self, value, typeCode=None) `Determine unit size of an array (if possible)` voidDataPointer(cls, value) `Given value in a known data-pointer type, return void_p for pointer` zeros(self, dims, typeCode) `Return Numpy array of zeros in given size` Static methods defined here: dataPointer(...) `dataPointer( array ) Retrieve data-pointer value as a Python integer array -- Numarray Array pointer` from_param = dataPointer(...) `dataPointer( array ) Retrieve data-pointer value as a Python integer array -- Numarray Array pointer` Methods inherited from FormatHandler: register(self, types) `Register this class as handler for given set of types` registerEquivalent(self, typ, base) `Register a sub-class for handling as the base-type` registerReturn(self) `Register this handler as the default return-type handler` Data and other attributes inherited from FormatHandler: RETURN_HANDLER = <OpenGL.arrays.numpymodule.NumpyHandler object> TYPE_REGISTRY = {<class 'ctypes.c_short'>: <OpenGL.arrays.numbers.NumberHandler object>, <class 'ctypes.c_ushort'>: <OpenGL.arrays.numbers.NumberHandler object>, <class 'ctypes.c_int'>: <OpenGL.arrays.numbers.NumberHandler object>, <class 'ctypes.c_uint'>: <OpenGL.arrays.numbers.NumberHandler object>, <class 'ctypes.c_float'>: <OpenGL.arrays.numbers.NumberHandler object>, <class 'ctypes.c_double'>: <OpenGL.arrays.numbers.NumberHandler object>, <class 'numarray.numarraycore.NumArray'>: <OpenGL.arrays.numarrays.NumarrayHandler object>, <type 'array'>: <OpenGL.arrays.numeric.NumericHandler object>, <type 'numpy.ndarray'>: <OpenGL.arrays.numpymodule.NumpyHandler object>, <type 'float'>: <OpenGL.arrays.numbers.NumberHandler object>, ...} __dict__ = <dictproxy object> `dictionary for instance variables (if defined)` __weakref__ = <attribute '__weakref__' of 'FormatHandler' objects> `list of weak references to the object (if defined)` baseType = None typeConstant = None

Functions
`` |  | dataPointer(...) `dataPointer( array ) Retrieve data-pointer value as a Python integer array -- Numarray Array pointer`

Data
`` |  | ARRAY_TO_GL_TYPE_MAPPING = {'I': GL_UNSIGNED_INT, 'b': GL_BYTE, 'c': GL_UNSIGNED_BYTE, 'd': GL_DOUBLE, 'f': GL_FLOAT, 'i': GL_INT, 's': GL_SHORT} GL_TYPE_TO_ARRAY_MAPPING = {GL_BYTE: 'b', GL_UNSIGNED_BYTE: 'c', GL_SHORT: 's', GL_UNSIGNED_SHORT: 's', GL_INT: 'i', GL_UNSIGNED_INT: 'i', GL_FLOAT: 'f', GL_DOUBLE: 'd'} HANDLER = <OpenGL.arrays.numarrays.NumarrayHandler object> implementationModuleName = 'OpenGL.arrays._numarray_1_3_1'