OpenGL.GLU.glunurbs
index
/build/buildd/pyopengl-3.0.0~b3/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: <CFunctionType object at 0x86bbbf4>, GLU_NURBS_BEGIN: <CFunctionType object at 0x86bb644>, GLU_NURBS_VERTEX: <CFunctionType object at 0x86bb77c>, GLU_NURBS_NORMAL: <CFunctionType object at 0x86bb7e4>, GLU_NURBS_COLOR: <CFunctionType object at 0x86bb84c>, GLU_NURBS_TEXTURE_COORD: <CFunctionType object at 0x86bb8b4>, GLU_NURBS_END: <CFunctionType object at 0x86bb91c>, GLU_NURBS_BEGIN_DATA: <CFunctionType object at 0x86bb984>, GLU_NURBS_VERTEX_DATA: <CFunctionType object at 0x86bb9ec>, GLU_NURBS_NORMAL_DATA: <CFunctionType object at 0x86bba54>, ...}
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 0x4026ac00>
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
gluNewNurbsRenderer()
Return a new nurbs renderer for the system (dereferences pointer)
gluNurbsCallback(nurb, which, CallBackFunc)
Dispatch to the nurb's callback operation
gluNurbsCallbackData(nurb, userData)
Note the Python object for use as userData by the nurb
gluNurbsCallbackDataEXT(nurb, userData)
Note the Python object for use as userData by the nurb
gluNurbsCurve(nurb, knots, control, type)
Pythonic version of gluNurbsCurve
 
Calculates knotCount, stride, and order automatically
gluNurbsSurface(nurb, sKnots, tKnots, control, type)
Pythonic version of gluNurbsSurface
 
Calculates knotCount, stride, and order automatically
gluPwlCurve(nurb, data, type)
gluPwlCurve -- piece-wise linear curve within GLU context
 
data -- the data-array 
type -- determines number of elements/data-point

 
Data
        PLATFORM = <OpenGL.platform.glx.GLXPlatform object at 0x836942c>
__all__ = ('GLUnurbs', 'gluNewNurbsRenderer', 'gluNurbsCallback', 'gluNurbsCallbackData', 'gluNurbsCallbackDataEXT', 'gluNurbsCurve', 'gluNurbsSurface', 'gluPwlCurve')
__file__ = '/build/buildd/pyopengl-3.0.0~b3/OpenGL/GLU/glunurbs.py'
__name__ = 'OpenGL.GLU.glunurbs'