Scroll to navigation

GLUPROJECT(3G) GLUPROJECT(3G)

̾??

gluProject ???֥??????Ⱥ?ɸ?Ϥ򥦥????ɥ???ɸ?Ϥ˥ޥåפ???

????

GLint gluProject( GLdouble objX,

	GLdouble objY,
	GLdouble objZ,
	const GLdouble *model,
	const GLdouble *proj,
	const GLint *view,
	GLdouble* winX,
	GLdouble* winY,
	GLdouble* winZ )

??????

???֥??????Ⱥ?ɸ?????ꤹ?롣
???ߤΥ??ǥ??ӥ塼?????????ꤹ??(glGetDoublev ?ؿ???????????????)??
???ߤμͱƹ????????ꤹ??(glGetDoublev ?ؿ???????????????)??
???ߤΥӥ塼?ݡ??Ȥ????ꤹ??(glGetIntegerv ?ؿ???????????????)??
???Ф??줿???????ɥ???ɸ???֤????롣

????

gluProject ?ϻ??ꤵ?줿???֥??????Ⱥ?ɸ???? model, proj, view ???Ȥäƥ??????ɥ???ɸ???Ѵ????롣 ?Ѵ????̤? winX, winY, winZ ?˳?Ǽ?????롣 ?֤??? GL_TRUE ????????ɽ?????֤??? GL_FALSE ?? ???Ԥ?ɽ????

v=(objX,objY,objZ,1.0) ??ɸ???׻??ϼ??Τ褦?˹Ԥ??? ?ޤ? v=(objX,objY,objZ,1.0) ?? 4 ?? 1 ???ι????????롣 v ???? gluProject ?? v ?򼡤Τ褦?˷׻?????:

v=P×M×v

P is the current projection matrix proj, M is the current 4×4 matrices in column-major order) and ' × ' represents ?????ǡ? P ?ϸ??ߤμͱƹ??? proj, M ?ϸ??ߤ? ???ǥ??ӥ塼???? model ?Ǥ???(?ɤ????? 4×4 ?????ǡ? ?????Ǥ?Ϣ³???????Ȥʤ?)?? ' × ' ?Ϲ??????Ѥ?ɽ????

?????ȡ????????ɥ???ɸ?ϼ??Τ褦?˻??Ф?????:

winX=view(0)+view(2)*(v(0)+1)/2

winY=view(1)+view(3)*(v(1)+1)/2.EN.sp.EQwinZ=(v(2)+1)/2

??Ϣ????

glGet, gluUnProject