We reassemble the calculation of the coordinates.
It worked well and next we can use it for the models.
download:
https://github.com/WaitrudWeber/source_zip/blob/master/display-20211007.zip
int v3dCalculation::calculation_thread_029() { float x, y; vPoint p1( 50.0f, 50.0f, 50.0f ); vPoint* eye = nullptr; vBox box( 0.0f, 0.0f, 0.0f, 100.0f, 100.0f, 100.0f); printf("v3dCalculation:: calculation_thread_029 () starts.\r\n"); eye = new vPoint(); eye->setPoint( 1000.0f, 1000.0f, -1000.0f); vPoint* U= new vPoint ( 160.0f, 0.0f, 0.0f ); vPoint* V= new vPoint ( 0, 90.0f, 0 ); screen_005.put_U ( *U ); screen_005.put_V ( *V ); vPoint* up = memorizevPoint( -10.0f, 10.0f, 0.0f ); screen_005.put_Up ( *up ); screen_005.setWidth ( 640 ); screen_005.setHeight ( 480 ); screen_005.setEye ( *eye ); screen_005.LookAt ( *(new vPoint( 0.0f, 0.0f, 0.0f )) ); screen_005.Set_HowFarFromEye ( 320.0f ); screen_005.printParams(); printf("screen_005.HowFarFromEye=%f\r\n", screen_005.HowFarFromEye); screen_005.calculation_up_UV(); int a = screen_005.get_cooordinate_on_screen ( p1, &x, &y ); printf("v3dCalculation:: calculation_thread_029 () ends.\r\n"); }
---
intersection_001 = p|008BAE58|( 821.510742, 821.510742, -802.722351)
int vCalculation::subtract starts p1|0028FD80| p2|008B04F4| p3|0028FD54|
p1->x 821.510742
vCalculation::subtract:111 starts.
|0028FD04|0028FD08|0028FD0C|
|821.510742|821.510742|-802.722351|854.314087|514.902832|-1076.526855|
|0028FD04|0028FD08|0028FD0C|
|0028FD04|=-32.803345 |0028FD08|=306.607910 |0028FD0C|=273.804504
vCalculation::subtract:111 ends.
int vCalculation::subtract ends and set |0028FD54| return 0.
lp = p|0028FD80|( 821.510742, 821.510742, -802.722351)
C = p|008B04F4|( 854.314087, 514.902832, -1076.526855)
result_001 = p|0028FD54|( -32.803345, 306.607910, 273.804504)
up= p|008B0524|( -0.707107, 0.707107, 0.000000)
right= p|008B04D4|( 0.408248, 0.408248, 0.816497)
001 x, y = 335.340698 , 240.000000
get_cooordinate_on_screen ends. 001
get_cooordinate_on_screen ends. 002 OtherSide=0
v3dCalculation:: calculation_thread_029 () ends.
main ends.
---