We can not print p2 as a pointer but print p1.
---
WM_MESSG 004: 20 *(p_evt->uMsg):20 uMsg:20 p_evt->uMsg: 2685344 &uMsg: 2685344
fDisplayControls_wmpaint_display_threeD_proc: starts.
memorizevPoint starts: 200.000000 200.000000 0.000000 dummy_vPoint_index 0 dummy_vPoint_max 0
Reallocation array only starts.
Reallocation array only ends.
aNew: 0/8 dummy_vPoint=03913830
memorizevPoint starts: 300.000000 300.000000 0.000000 dummy_vPoint_index 1 dummy_vPoint_max 8
Reallocation array only starts.
Reallocation array only ends.
aNew: 1/8 dummy_vPoint=03913800
vLine* to_screen_line( vLine* ll ) starts.
get_cooordinate_on_screen starts.
int vCalculation::subtract starts p1|0028FAC0| p2|00000060| p3|B0A94E1A|
>
---
And we channed the program anyway to stop it and limited the part of it, which is Param "screen->eye".
---
wButtonController::Process: END 20 / 15<-WM_PAINT wParam -1878979112 lParam 0 this->event->uMsg:2685344 *(this->event->
Msg)=20 this->event->Type=258
WM_MESSG 004: 20 *(p_evt->uMsg):20 uMsg:20 p_evt->uMsg: 2685344 &uMsg: 2685344
fDisplayControls_wmpaint_display_threeD_proc: starts.
memorizevPoint starts: 200.000000 200.000000 0.000000 dummy_vPoint_index 0 dummy_vPoint_max 0
Reallocation array only starts.
Reallocation array only ends.
aNew: 0/8 dummy_vPoint=03803818
memorizevPoint starts: 300.000000 300.000000 0.000000 dummy_vPoint_index 1 dummy_vPoint_max 8
Reallocation array only starts.
Reallocation array only ends.
aNew: 1/8 dummy_vPoint=038037E8
vLine* to_screen_line( vLine* ll ) starts.
get_cooordinate_on_screen starts.
We can not memory screen params so that the program could exit in get_cooordinate_on_screen.
---
336 :// 337 :int get_cooordinate_on_screen ( vPoint lp, float* lx, float* ly ) { 338 : vCalculation calc; 339 :// vTriangle screen_tri; 340 : 341 : printf("get_cooordinate_on_screen starts.\r\n"); 342 : 343 : if ( screen == nullptr ) { 344 : printf ("We can not memory screen params so that the program could exit in get_cooordinate_on_screen.\r\n"); 345 : exit(-1); 346 : } 347 : 348 : calc.subtract( &lp, &(screen->eye), &ray); 349 : calc.normal( &ray ); 350 : // if ( ray.x == 0 && ray.y == 0 && ray.z == 0 ) return -1; 351 : 352 : screen_tri.p1 = screen->C;