glScene function to convert object's 3D coordinates to viewport 2D coordinates

StackOverflow https://stackoverflow.com/questions/23231358

  •  07-07-2023
  •  | 
  •  

문제

Is there any build-in function in glScene (Delphi) for converting 3D (xyz) position coordinates of the object to a screen 2D (xy) coordinates of that object shown on GlSceneViewer?

Thank you!

도움이 되었습니까?

해결책

gluProject from the glu library is usually used to perform this function.

http://www.opengl.org/sdk/docs/man2/xhtml/gluProject.xml

I am unfamiliar with glScene, but it appears that gluProject is used in TGLSceneBuffer.WorldToScreen(const aPoint : TAffineVector) : TAffineVector;. This should do what you want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top