Wiki > TV3D65 Index > TVMathLibrary

Project2DPointTo3D

DESCRIPTION

Projects a 2D point from screen coordinates to 3D world coordinates.
The distance from screen is given by ratio (Distance_From_Near_Plane/Viewing_Depth): 0 = Near plane, 1 = Far plane.

DECLARATION

VB.NET Project2DPointTo3D(fX As Single , fY As Single , fFarPlaneRatio As Single , retvVector As TV_3DVECTOR) As Boolean
C++ bool Project2DPointTo3D(float fX , float fY , float fFarPlaneRatio , cTV_3DVECTOR* retvVector)

PARAMETERS

NAMEOPTIONALDESCRIPTION
fXNoX coordinate (in screen space)
fYNoY coordinate (in screen space)
fFarPlaneRatioNoFar Plane Ratio

RETURN VALUE

NAMEDESCRIPTION
boolTrue on success
retvVectorReference to return vector

EXAMPLES

ExampleBasic example.

TIPS

  • Can be used for mouse-picking or 3D selection
 
tvmathlibrary/project2dpointto3d.txt · Last modified: 2010/05/07 13:16 by 129.215.4.85