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.Project (gb.opengl.glu)

Static Function Project ( ObjectX As Float, ObjectY As Float, ObjectZ As Float, Modelview As Float[], Projection As Float[], Viewport As Integer[] ) As Float[]

Map object coordinates to window coordinates.

Parameters

objX, objY, objZ

Specify the object coordinates.
model

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

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

Specifies the current viewport (as from a Gl.GetIntegerv call).
winX, winY, winZ

Return the computed window coordinates.

Description

Glu.Project transforms the specified object coordinates into window coordinates using model, proj, and view. The result is stored in winX, winY, and winZ. A return value of Glu.TRUE indicates success, a return value of Glu.FALSE indicates failure.

To compute the coordinates, let v objX objY objZ 1.0 represented as a matrix with 4 rows and 1 column. Then Glu.Project computes v as follows:

v P × M × v

where P is the current projection matrix proj and M is the current modelview matrix model (both represented as 4 × 4 matrices in column-major order).

The window coordinates are then computed as follows:

winX view 0 + view 2 × v 0 + 1 2

winY view 1 + view 3 × v 1 + 1 2

winZ v 2 + 1 2

See also

Glu.UnProject Gl.Get

See original documentation on OpenGL website