Gambas Documentation
Aperçu du Langage
À traduire
Code Snippets
Comment faire ...
Compilation et installation
Composants
gb
gb.args
gb.cairo
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.db
gb.db.form
gb.dbus
gb.debug
gb.desktop
gb.desktop.gnome.keyring
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.mdi
gb.gmp
gb.gsl
gb.gtk
gb.gtk3
gb.gui
gb.image
gb.image.effect
gb.image.imlib
gb.image.io
gb.inotify
gb.libxml
gb.media
gb.mysql
gb.net
gb.net.curl
gb.net.smtp
gb.openal
gb.opengl
gb.opengl.glsl
gb.opengl.glu
Glu
AUTO_LOAD_MATRIX
Build1DMipmaps
CULLING
Cylinder
DISPLAY_MODE
FILL
FLAT
INSIDE
INVALID_ENUM
INVALID_VALUE
LINE
LookAt
NewNurbsRenderer
NewQuadric
NONE
NURBS_MODE
Ortho2D
OUT_OF_MEMORY
OUTSIDE
PARAMETRIC_TOLERANCE
PartialDisk
Perspective
PickMatrix
POINT
QuadricDrawStyle
QuadricNormals
QuadricOrientation
QuadricTexture
SAMPLING_METHOD
SAMPLING_TOLERANCE
SILHOUETTE
SMOOTH
Sphere
U_STEP
V_STEP
GluNurb
GluQuadric
gb.opengl.sge
gb.option
gb.pcre
gb.pdf
gb.qt4
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt5
gb.qt5.opengl
gb.report
gb.scanner
gb.sdl
gb.sdl.sound
gb.settings
gb.signal
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
Controls pictures
Derniers changements
Dépôt d'applications
Documentation de l'Environnement de développement
Documentation des développeurs
Documents
Indenter
Index de tous les Documents
Index du langage
Lexique
LISEZ-MOI
Manuel du wiki
Messages d'erreur
Tutoriels
Wiki License

Glu.UnProject4 (gb.opengl.glu)

Static Function UnProject4 ( WindowX As Float, WindowY As Float, WindowZ As Float, ClipW As Float, Modelview As Float[], Projection As Float[], Viewport As Integer[], NearValue As Float, FarValue As Float ) As Float[]

Map window and clip coordinates to object coordinates.

Parameters

winX, winY, winZ

Specify the window coordinates to be mapped.
clipW

Specify the clip w coordinate to be mapped.
model

Specifies the modelview matrix (as from a Gl.GetDoublev call).
proj

Specifies the projection matrix (as from a Gl.GetDoublev call).
view

Specifies the viewport (as from a Gl.GetIntegerv call).
nearVal, farVal

Specifies the near and far planes (as from a Gl.GetDoublev call).
objX, objY, objZ, objW

Returns the computed object coordinates.

Description

Glu.UnProject4 maps the specified window coordinatesi: winX, winY, and winZ and its clip w coordinate clipW into object coordinates objX objY objZ objW using model, proj, and view. clipW can be other than 1 as for vertices in Gl.FeedbackBuffer when data type Glu.4D_COLOR_TEXTURE is returned. This also handles the case where the nearVal and farVal planes are different from the default, 0 and 1, respectively. A return value of Glu.TRUE indicates success; a return value of Glu.FALSE indicates failure.

To compute the coordinates objX objY objZ objW , Glu.UnProject4 multiplies the normalized device coordinates by the inverse of model proj as follows:

objX objY objZ objW INV P M 2 winX - view 0 view 2 - 1 2 winY - view 1 view 3 - 1 2 winZ - nearVal farVal - nearVal - 1 clipW

INV denotes matrix inversion.

Glu.UnProject4 is equivalent to Glu.UnProject when clipW is 1, nearVal is 0, and farVal is 1.

Notes

Glu.UnProject4 is available only if the GLU version is 1.3 or greater.

See also

Glu.Project Glu.UnProject Gl.FeedbackBuffer Gl.Get

See original documentation on OpenGL website