Wiki > TV3D65 Index > TVMathLibrary
Project3DPointTo2D
DESCRIPTION
Projects point from 3D world onto 2D screen.
DECLARATION
| VB.NET | Project3DPointTo2D(vPoint As TV_3DVECTOR , ret_x As Single , ret_y As Single , bFrontOnly As Boolean) As Boolean |
| C++ | bool Project3DPointTo2D(cTV_3DVECTOR* vPoint , float* ret_x , float* ret_y , bool bFrontOnly ) |
PARAMETERS
| NAME | OPTIONAL | DESCRIPTION |
| vPoint | No | Point in 3D |
| bFrontOnly | No | If true, projects only points in front of camera. |
RETURN VALUE
| NAME | DESCRIPTION |
| bool | True on success |
| ret_x | Reference to calculated X coordinate |
| ret_y | Reference to calculated Y coordinate |
EXAMPLES
TIPS
- Use for projecting 3D points to 2D for drawing 2D health bars or text above objects in 3D