Waitrud Weber’s blog

things and reminders for memories

3d: windows-make: The C function memorized the class parameter as new, But the memorization was changed in the function C++ class.

1  The C function memorized the class parameter as new, But the memorization was changed in the function C++ class.      
2
int display_threeD_screen_initialize () {
	vPoint* eye = nullptr;
	printf("display_threeD_screen_initialize:memorized_CurveLines=%d starts.\r\n", memorized_CurveLines );

	if ( call_once_display_threeD_initialize == 0 ) {
		call_once_display_threeD_initialize = 1;
	} else {
		printf("exit because call_once_display_threeD_initialize = %d\r\n", call_once_display_threeD_initialize );
		return 1;
	}

	eye = new vPoint();
	eye->setPoint( 1000.0f, 1000.0f, -1000.0f);
	screen = new vScreen ();
	vPoint* U= new vPoint ( 160.0f, 0.0f, 0.0f );
	vPoint* V= new vPoint ( 0, 90.0f, 0 );
	screen->put_U ( *U );
	screen->put_V ( *V );

	vPoint* up = memorizevPoint( -10.0f, 10.0f, 0.0f );
	screen->put_Up ( *up );

	screen->setWidth ( 640 );
	screen->setHeight ( 480 );
	screen->setEye ( *eye );
	screen->LookAt ( *(new vPoint( 0.0f, 0.0f, 0.0f )) );
	screen->HowFarFromEye = 320.0f;

	printf("screen->HowFarFromEye=%f\r\n", screen->HowFarFromEye);

	screen->calculation_up_UV();
	screen->OntheScreen( &g_x, &g_y );

	if ( memorized_CurveLines == 0 ) {
		curve_initialization();
		memorized_CurveLines = 1;
	}

	printf("display_threeD_screen_initialize:memorized_CurveLines=%d ends.\r\n", memorized_CurveLines );
}
     
3 --- execution 001 ---
main starts.
v3dCalculation:: calculation_thread_020 () startss.
display_threeD_screen_initialize:memorized_CurveLines=0 starts.
memorizevPoint starts: -10.000000 10.000000 0.000000 dummy_vPoint_index 0 dummy_vPoint_max 0
dummy_vPoint_max = 0 allocation starts.
dummy_vPoint_max = 8 allocation ends.
aNew: 0/8 dummy_vPoint=0057AEB8
screen->HowFarFromEye=320.000000
void vScreen::calculation_up_UV () starts.
this->eye= p|00570518|( 1000.000000, 1000.000000, -1000.000000)
lookat= p|00570530|( 0.000000, 0.000000, 0.000000)
this->HowFarFromEye=0
int vCalculation::subtract starts p1|00570530| p2|00570518| p3|0028FDF0|
p1->x 0.000000
--- execution 001 ---
     
4 download: 

https://github.com/WaitrudWeber/source_zip/blob/master/display-20210930-001-03.zip

     
5

I chosed a different function and it was the reason of this error.

waitrudweber.hatenablog.com

     
6        
7        
8