Method GLU.gluLookAt()
- Method gluLookAt
void
gluLookAt(float
eyex
,float
eyey
,float
eyez
,float
centerx
,float
centery
,float
centerz
,float
upx
,float
upy
,float
upz
)
void
gluLookAt(Math.Matrix
eye
,Math.Matrix
center
,Math.Matrix
up
)- Description
gluLookAt creates a viewing matrix derived from an
eye
point, a reference point indicating thecenter
of the scene, and anup
vector. The matrix maps the reference point to the negative z axis and the eye point to the origin, so that, when a typical projection matrix is used, the center of the scene maps to the center of the viewport. Similarly, the direction described by the up vector projected onto the viewing plane is mapped to the positive y axis so that it points upward in the viewport. The up vector must not be parallel to the line of sight from the eye to the reference point.The matrix generated by gluLookAt postmultiplies the current matrix.
The relation between the matrix objects and the float values are
Math.Matrix eye = Math.Matrix( ({ eyex, eyey, eyez }) );
- See also