Waitrud Weber’s blog

things and reminders for memories

3d: windows-make: creation of functions and considered another function.

3d: windows-make:

We are going to ignore the function of display_threeD_screen_initialize in the get_cooordinate_on_screen because it can create Screen parameter also.
So we could create the three functions also like the below for printing models, considered the function of display_threeD_screen_initialize.

// 20210306
int convert_model_lines( vLine **lines, vLine **line_2D, int *line_index, int max_num ) ;
int create_model_lines( vLine **lines, int *line_index, int max_num ) ;
int create_curve_lines ( int num ) ;

 

 

int convert_model_lines( vLine **lines, vLine **lines_2D, int *line_index, int max_num ) ; 

 x

 v

3/7

3/10 

 int create_model_lines( vLine **lines, int line_index, int max_num ) ;  3/10
3  int create_curve_lines ( int num ) ;    
4

 vPoint* vCalculation::scalize ( vPoint* p1, float w_scale) ;
 

3d: windows-make: the reason that we can not display is nothing on the code. - Waitrud Weber’s blog (hatenablog.com)

 v  3/10

 

(20210307)

convert_model_lines can not return (vLine*) or  can not memorize array.

1st, we think, array can not keep in sub-lootin but  its message is like the below.

int convert_model_lines( vLine **lines, vLine **lines_2D, int *line_index, int max_num ) ends. *line_index = 0

1 : https://github.com/WaitrudWeber/source_zip/blob/master/display-20210307-001-05.zip

 

(20210307)

For memorization in sub-lootin, we changed the literatures ovbious like the below, however, we can not set the &line_index in sub-lootin.
*line_index++ -> ++(*line_index)
We might think, we have to set the parameter alternative like the below.
int b = convert_model_lines( lines, lines_2D, &line_index, 4 );

|

-> int b = convert_model_lines( lines, lines_2D, line_index, 4, &another_line_index );

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

 

(20210307)
After create_model_lines, they can increase line_index like the below.

And in the case of convert_model_lines, we failed that.
---
p( 1025.000000, 250.000000, 1375.000000)
p( 1025.000000, 250.000000, 1375.000000)
i = 2
p( 1025.000000, 250.000000, 1375.000000)
p( 1025.000000, 250.000000, 1375.000000)
i = 3
p( 1025.000000, 250.000000, 1375.000000)
p( 1025.000000, 250.000000, 1375.000000)
int create_model_lines( vLine **lines, int *line_index, int max_num ) ends. *line_index=43
line_index = 43 returned from create_model_lines.
---

 3: https://github.com/WaitrudWeber/source_zip/blob/master/display-20210308-001-04.zip