OpenGL.GL.selection
index
/var/pylive/OpenGL-ctypes/OpenGL/GL/selection.py

Selection-buffer handling code
 
This code is resonsible for turning gluint *
arrays into structured representations for use
by Python-level code.

 
Classes
       
object
GLSelectRecord

 
class GLSelectRecord(object)
    Minimalist object for storing an OpenGL selection-buffer record
 
Provides near and far as *float* values by dividing by 
self.DISTANCE_DIVISOR (2**32-1)
From the spec:
        Depth values (which are in the range [0,1]) are multiplied by 
        2^32 - 1, before being placed in the hit record.
 
Names are unmodified, so normally are slices of the array passed in 
to GLSelectRecord.fromArray( array )
 
  Methods defined here:
__getitem__(self, key)
Allow for treating the record as a three-tuple
__init__(self, near, far, names)
Initialise/store the values
convertDistance(self, value)
Convert a distance value from array uint to 0.0-1.0 range float

Class methods defined here:
fromArray(cls, array, total) from type
Produce list with all records from the array

Data and other attributes defined here:
DISTANCE_DIVISOR = 4294967295.0
__slots__ = ('near', 'far', 'names')
far = <member 'far' of 'GLSelectRecord' objects>
names = <member 'names' of 'GLSelectRecord' objects>
near = <member 'near' of 'GLSelectRecord' objects>

 
Functions
       
uintToLong(value)