!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/pyshared/OpenGL/GLU/   drwxr-xr-x
Free 130 GB of 142.11 GB (91.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     projection.py (3.15 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""glu[Un]Project[4] convenience wrappers"""
from OpenGL.platform import GL
from OpenGL.raw import GLU as simple
from OpenGL import GL, arrays
from OpenGL.lazywrapper import lazy
import ctypes 
POINTER = ctypes.POINTER

@lazy( simple.gluProject )
def gluProject( baseFunction, objX, objY, objZ, model=None, proj=None, view=None ):
    """Convenience wrapper for gluProject
    
    Automatically fills in the model, projection and viewing matrices
    if not provided.
    
    returns (winX,winY,winZ) doubles
    """
    if model is None:
        model = GL.glGetDoublev( GL.GL_MODELVIEW_MATRIX )
    if proj is None:
        proj = GL.glGetDoublev( GL.GL_PROJECTION_MATRIX )
    if view is None:
        view = GL.glGetIntegerv( GL.GL_VIEWPORT )
    winX = simple.GLdouble( 0.0 )
    winY = simple.GLdouble( 0.0 )
    winZ = simple.GLdouble( 0.0 )
    result = baseFunction( 
        objX,objY,objZ,
        model,proj,view,
        winX,winY,winZ,
    )
    # On Ubuntu 9.10 we see a None come out of baseFunction,
    # despite it having a return-type specified of GLint!
    if result is not None and result != simple.GLU_TRUE:
        raise ValueError( """Projection failed!""" )
    return winX.value, winY.value, winZ.value 

@lazy( simple.gluUnProject )
def gluUnProject( baseFunction, winX, winY, winZ, model=None, proj=None, view=None ):
    """Convenience wrapper for gluUnProject
    
    Automatically fills in the model, projection and viewing matrices
    if not provided.
    
    returns (objX,objY,objZ) doubles
    """
    if model is None:
        model = GL.glGetDoublev( GL.GL_MODELVIEW_MATRIX )
    if proj is None:
        proj = GL.glGetDoublev( GL.GL_PROJECTION_MATRIX )
    if view is None:
        view = GL.glGetIntegerv( GL.GL_VIEWPORT )
    objX = simple.GLdouble( 0.0 )
    objY = simple.GLdouble( 0.0 )
    objZ = simple.GLdouble( 0.0 )
    result = baseFunction( 
        winX,winY,winZ,
        model,proj,view,
        ctypes.byref(objX),ctypes.byref(objY),ctypes.byref(objZ),
    )
    if not result:
        raise ValueError( """Projection failed!""" )
    return objX.value, objY.value, objZ.value 
@lazy( simple.gluUnProject4 )
def gluUnProject4(
    baseFunction,
    winX, winY, winZ, clipW, 
    model=None, proj=None, view=None, 
    near=0.0, far=1.0
):
    """Convenience wrapper for gluUnProject
    
    Automatically fills in the model, projection and viewing matrices
    if not provided.
    
    returns (objX,objY,objZ) doubles
    """
    if model is None:
        model = GL.glGetDoublev( GL.GL_MODELVIEW_MATRIX )
    if proj is None:
        proj = GL.glGetDoublev( GL.GL_PROJECTION_MATRIX )
    if view is None:
        view = GL.glGetIntegerv( GL.GL_VIEWPORT )
    objX = simple.GLdouble( 0.0 )
    objY = simple.GLdouble( 0.0 )
    objZ = simple.GLdouble( 0.0 )
    objW = simple.GLdouble( 0.0 )
    result = baseFunction( 
        winX,winY,winZ,
        model,proj,view,
        ctypes.byref(objX),ctypes.byref(objY),ctypes.byref(objZ),ctypes.byref(objW)
    )
    if not result:
        raise ValueError( """Projection failed!""" )
    return objX.value, objY.value, objZ.value, objW.value

__all__ = (
    'gluProject',
    'gluUnProject',
    'gluUnProject4',
)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0354 ]--