Waitrud Weber’s blog

things and reminders for memories

3d: windows-make: Move Operation.

1. Press "l" as an arbitary operation.
2. Press "a" to select the point which you'd rather love to move like by use of cursol.
3. Press "n" to run "MoveSelectedPoint" for the move operation.

f:id:Waitrud_Weber:20211221122858p:plain

is centered

is centered.

---
int vDisplayController::MoveSelectedPoint ( int number, int direction ) starts.
memorizevPoint starts: 0.000000 0.000000 0.000000 dummy_vPoint_index 31 dummy_vPoint_max 32
Reallocation array only starts.
dummy_vPoint_max 64 we found.
dummy_vPoint_max 64 reallocated.
Reallocation array only ends.
aNew: 31/64 dummy_vPoint=01F15A88
vCalculation::add starts
memorizevPoint starts: 0.000000 0.000000 0.000000 dummy_vPoint_index 32 dummy_vPoint_max 64
aNew: 32/64 dummy_vPoint=0077ABF0
vCalculation::add returns |0077ABF0|
selected_point=p|0043E728|( 0.000000, 0.000000, 0.000000)
up_001=p|0043E6A4|( -0.707107, 0.707107, 0.000000)
moved_point=p|0077ABF0|( -3.535534, 3.535534, 0.000000)
get_cooordinate_on_screen starts.
int vCalculation::subtract starts p1|0028FC1C| p2|0043E698| p3|0028FBD8|
p1->x -3.535534
vCalculation::subtract:111 starts.
|0028FB60|0028FB64|0028FB68|
|-3.535534|3.535534|0.000000|1000.000000|1000.000000|-1000.000000|
|0028FB60|0028FB64|0028FB68|
|0028FB60|=-1003.535522 |0028FB64|=-996.464478 |0028FB68|=1000.000000
vCalculation::subtract:111 ends.
int vCalculation::subtract ends and set |0028FBD8| return 0.
void vTriangle::print() starts.
p1= p|0028FBE4|( 854.314087, 514.902832, -1076.526855)
p2= p|0028FBF0|( 1115.593018, 776.181763, -553.968994)
p3= p|0028FBFC|( 514.902832, 854.314087, -1076.526855)
void vTriangle::print() ends.
vPoint* vIntersection_001::Intersect ( vTriangle tri, vPoint eye, vPoint ray ) starts.
eye= p|0028FBB4|( 1000.000000, 1000.000000, -1000.000000)
ray= p|0028FBC0|( -0.579389, -0.575307, 0.577348)
vPoint vCalculation::subtract:
memorizevPoint starts: 0.000000 0.000000 0.000000 dummy_vPoint_index 33 dummy_vPoint_max 64
aNew: 33/64 dummy_vPoint=01F08E38
vCalculation::subtract:111 starts.
|01F08E38|01F08E3C|01F08E40|
|1115.593018|776.181763|-553.968994|854.314087|514.902832|-1076.526855|
|01F08E38|01F08E3C|01F08E40|
|01F08E38|=261.278931 |01F08E3C|=261.278931 |01F08E40|=522.557861
vCalculation::subtract:111 ends.
vPoint vCalculation::subtract ends: 01F08E38
vPoint vCalculation::subtract:
memorizevPoint starts: 0.000000 0.000000 0.000000 dummy_vPoint_index 34 dummy_vPoint_max 64
aNew: 34/64 dummy_vPoint=01F1E218
vCalculation::subtract:111 starts.
|01F1E218|01F1E21C|01F1E220|
|514.902832|854.314087|-1076.526855|854.314087|514.902832|-1076.526855|
|01F1E218|01F1E21C|01F1E220|
|01F1E218|=-339.411255 |01F1E21C|=339.411255 |01F1E220|=0.000000
vCalculation::subtract:111 ends.
vPoint vCalculation::subtract ends: 01F1E218
memorizevPoint starts: 0.000000 0.000000 0.000000 dummy_vPoint_index 35 dummy_vPoint_max 64
aNew: 35/64 dummy_vPoint=01F1E140
free_point starts. |01F08E38| dummy_vPoint_index|36|
free_point ends. |01F08E38| dummy_vPoint_index{35}
free_point starts. |01F1E218| dummy_vPoint_index|35|
free_point ends. |01F1E218| dummy_vPoint_index{34}
normal= p|01F1E140|( 0.577350, 0.577350, -0.577350)
vCalculation::scale starts. |0028FB4C| 320.001312
memorizevPoint starts: 0.000000 0.000000 0.000000 dummy_vPoint_index 34 dummy_vPoint_max 64
aReuse: 34/64 dummy_vPoint=01F1E218
vCalculation::scale ends. return |0028FB38|
vPoint vCalculation::add: starts. |0028FB4C| |0028FB58|
memorizevPoint starts: 0.000000 0.000000 0.000000 dummy_vPoint_index 35 dummy_vPoint_max 64
aReuse: 35/64 dummy_vPoint=01F1E140
vPoint vCalculation::add: returns |01F1E140|.
depth=320.001308
vPoint* vIntersection_001::Intersect ( vTriangle tri, vPoint eye, vPoint ray ) ends.
intersection_001 = p|01F1E140|( 814.594727, 815.901123, -815.247925)
int vCalculation::subtract starts p1|0028FB8C| p2|0043E674| p3|0028FB60|
p1->x 814.594727
vCalculation::subtract:111 starts.
|0028FB10|0028FB14|0028FB18|
|814.594727|815.901123|-815.247925|854.314087|514.902832|-1076.526855|
|0028FB10|0028FB14|0028FB18|
|0028FB10|=-39.719360 |0028FB14|=300.998291 |0028FB18|=261.278931
vCalculation::subtract:111 ends.
int vCalculation::subtract ends and set |0028FB60| return 0.
lp = p|0028FB8C|( 814.594727, 815.901123, -815.247925)
C = p|0043E674|( 854.314087, 514.902832, -1076.526855)
result_001 = p|0028FB60|( -39.719360, 300.998291, 261.278931)
up= p|0043E6A4|( -0.707107, 0.707107, 0.000000)
right= p|0043E654|( 0.408248, 0.408248, 0.816497)
001 x, y = 320.000031 , 240.923752
get_cooordinate_on_screen ends. 001
get_cooordinate_on_screen ends. 002 OtherSide=0
1001 x, y = 320.000031, 240.923752
int vDisplayController::MoveSelectedPoint ( int number, int direction ) ends.
---

download: 

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

// Press "l" -> and "n".
//
// 1: direction 1:down, 2:up, 3: right, 4: left
// 2: find fixed up.
// 3:
int vDisplayController::MoveSelectedPoint ( int number, int direction ) {
	float x, y;
	vCalculation calc;
	const float c = 5.0f;
	vPoint* range_001;

	printf("int vDisplayController::MoveSelectedPoint ( int number, int direction ) starts.\r\n");

	vPoint* up_001 = &(screen_006.up);
	int selected = this->canvas->AXEX_2D_002_Index_Selected;
	vPoint* selected_point = &( this->bones[selected] );

	//scalize * = *, *
//	int b = calc.scale ( selected_point, c, range_001 );
	range_001 = calc.scalize ( up_001, c );

	// ADD calculation * = * , *
	vPoint* moved_point = calc.add ( selected_point, range_001 );

	printf("selected_point=");
	selected_point->print();

	printf("up_001=");
	up_001->print();


	printf("moved_point=");
	moved_point->print();

	// convert value, p, p
	int a = screen_006.get_cooordinate_on_screen ( *moved_point, &x, &y );
	int stored = this->canvas->AXEX_2D_002_Index;
	this->canvas->AXEX_2D_002_Index = selected;
	this->canvas->Set_vAxex_2D( x, y );
//	this->canvas->Set_vAxex_2D( 300, 300 );
	this->canvas->AXEX_2D_002_Index = stored;

	printf("1001 x, y = %f, %f\r\n", x, y);

	printf("int vDisplayController::MoveSelectedPoint ( int number, int direction ) ends.\r\n");
//	exit(-1);
	return 0;
}