OpenGL.GLU.glunurbs
index
/build/buildd/pyopengl-3.0.0~b6/OpenGL/GLU/glunurbs.py

Implementation of GLU Nurbs structure and callback methods
 
Same basic pattern as seen with the gluTess* functions, just need to
add some bookkeeping to the structure class so that we can keep the
Python function references alive during the calling process.

 
Modules
       
OpenGL.arrays
OpenGL.converters
ctypes
OpenGL.GLU.glustruct
OpenGL.platform
OpenGL.raw.GLU
weakref
OpenGL.wrapper

 
Classes
       
GLUStruct(object)
GLUnurbs(GLUStruct, GLUnurbs)
GLUnurbs(Structure)
GLUnurbs(GLUStruct, GLUnurbs)

 
class GLUnurbs(GLUStruct, GLUnurbs)
    GLU Nurbs structure with oor and callback storage support
 
IMPORTANT NOTE: the texture coordinate callback receives a raw ctypes 
data-pointer, as without knowing what type of evaluation is being done 
(1D or 2D) we cannot safely determine the size of the array to convert 
it.  This is a limitation of the C implementation.  To convert to regular 
data-pointer, just call yourNurb.ptrAsArray( ptr, size, arrays.GLfloatArray )
with the size of data you expect.
 
 
Method resolution order:
GLUnurbs
GLUStruct
GLUnurbs
Structure
_ctypes._CData
object

Methods defined here:
FUNCTION_TYPE = CFUNCTYPE(restype, *argtypes)
CFUNCTYPE(restype, *argtypes) -> function prototype.
 
restype: the result type
argtypes: a sequence specifying the argument types
 
The function prototype can be called in different ways to create a
callable object:
 
prototype(integer address) -> foreign function
prototype(callable) -> create and return a C callable function from callable
prototype(integer index, method name[, paramflags]) -> foreign function calling a COM method
prototype((ordinal number, dll object)[, paramflags]) -> foreign function exported by ordinal
prototype((function name, dll object)[, paramflags]) -> foreign function exported by name

Data and other attributes defined here:
CALLBACK_FUNCTION_REGISTRARS = {GLU_NURBS_ERROR: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856934c>, GLU_NURBS_BEGIN: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856904c>, GLU_NURBS_VERTEX: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856908c>, GLU_NURBS_NORMAL: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x85690cc>, GLU_NURBS_COLOR: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856910c>, GLU_NURBS_TEXTURE_COORD: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856914c>, GLU_NURBS_END: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856918c>, GLU_NURBS_BEGIN_DATA: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x85691cc>, GLU_NURBS_VERTEX_DATA: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856920c>, GLU_NURBS_NORMAL_DATA: <OpenGL.platform.baseplatform.gluNurbsCallback object at 0x856924c>, ...}
CALLBACK_TYPES = {GLU_NURBS_ERROR: <class 'ctypes.CFunctionType'>, GLU_NURBS_BEGIN: <class 'ctypes.CFunctionType'>, GLU_NURBS_VERTEX: <class 'ctypes.CFunctionType'>, GLU_NURBS_NORMAL: <class 'ctypes.CFunctionType'>, GLU_NURBS_COLOR: <class 'ctypes.CFunctionType'>, GLU_NURBS_TEXTURE_COORD: <class 'ctypes.CFunctionType'>, GLU_NURBS_END: <class 'ctypes.CFunctionType'>, GLU_NURBS_BEGIN_DATA: <class 'ctypes.CFunctionType'>, GLU_NURBS_VERTEX_DATA: <class 'ctypes.CFunctionType'>, GLU_NURBS_NORMAL_DATA: <class 'ctypes.CFunctionType'>, ...}
WRAPPER_METHODS = {GLU_NURBS_ERROR: None, GLU_NURBS_BEGIN: None, GLU_NURBS_VERTEX: '_vec3', GLU_NURBS_NORMAL: '_vec3', GLU_NURBS_COLOR: '_vec4', GLU_NURBS_TEXTURE_COORD: '_tex', GLU_NURBS_END: None, GLU_NURBS_BEGIN_DATA: '_justOOR', GLU_NURBS_VERTEX_DATA: '_vec3', GLU_NURBS_NORMAL_DATA: '_vec3', ...}

Methods inherited from GLUStruct:
addCallback(self, which, function)
Register a callback for this structure object
getAsParam(self)
Gets as a ctypes pointer to the underlying structure
noteObject(self, object)
Note object for later retrieval as a Python object pointer
 
This is the registration point for "original object return", returns 
a void pointer to the Python object, though this is, effectively, an 
opaque value.
originalObject(self, voidPointer)
Given a void-pointer, try to find our original Python object
ptrAsArray(self, ptr, length, type)
Copy length values from ptr into new array of given type

Data descriptors inherited from GLUStruct:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Methods inherited from Structure:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from Structure:
__new__ = <built-in method __new__ of _ctypes.StructType object at 0x40271c00>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(...)
__hash__(...)
x.__hash__() <==> hash(x)

 
Functions
       
_callbackWithType(funcType)
Get gluNurbsCallback function with set last arg-type
gluNurbsCallback(nurb, which, CallBackFunc)
Dispatch to the nurb's addCallback operation

 
Data
        PLATFORM = <OpenGL.platform.glx.GLXPlatform object at 0x8377eac>
__all__ = ('GLUnurbs', 'gluNewNurbsRenderer', 'gluNurbsCallback', 'gluNurbsCallbackData', 'gluNurbsCallbackDataEXT', 'gluNurbsCurve', 'gluNurbsSurface', 'gluPwlCurve')
__file__ = '/build/buildd/pyopengl-3.0.0~b6/OpenGL/GLU/glunurbs.py'
__name__ = 'OpenGL.GLU.glunurbs'
gluNewNurbsRenderer = <OpenGL.lazywrapper.gluNewNurbsRenderer object at 0x85693ac>
gluNurbsCallbackData = <OpenGL.lazywrapper.gluNurbsCallbackData object at 0x856944c>
gluNurbsCallbackDataEXT = <OpenGL.lazywrapper.gluNurbsCallbackDataEXT object at 0x85694ec>
gluNurbsCurve = <OpenGL.lazywrapper.gluNurbsCurve object at 0x856958c>
gluNurbsSurface = <OpenGL.lazywrapper.gluNurbsSurface object at 0x856962c>
gluPwlCurve = <OpenGL.lazywrapper.gluPwlCurve object at 0x85696cc>