Waitrud Weber’s blog

things and reminders for memories

3D: Step to CurveLine 001: Print Anchor

And we need revicement between every anchors.

class CurveLines has All information of curve lines..

 

427 :// Prototype
428 ://
429 ://
430 ://
431 ://
432 ://
433 :int CurveLines_wmpaint_display_threeD_proc ( HWND hWnd, HDC hDC, PAINTSTRUCT* ps, UINT uMsg, WPARAM wParam, LPARAM lParam ) {
434 : float fx[3], fy[3];
435 : static vLine** l_lines = nullptr;
436 : static char num_str[2048];
437 :
438 : if ( memorized_CurveLines == 0 ) return -1;
439 :
440 : if ( l_lines != nullptr ) return 2; // return 2: means doesn't need to convert models.
441 :
442 : l_lines = (vLine**) malloc( sizeof(vLine*) * 6 );
443 :
444 : get_cooordinate_on_screen ( *(CurveLines->aPS[0]->Anchor), &fx[0], &fy[0] );
445 :
446 : // Allocation vLine which has vPoint p1 and p2.
447 : l_lines[0] = new vLine();
448 : l_lines[ 0 ]->p1->x = fx[0];
449 : l_lines[ 0 ]->p1->y = fy[0];
450 : l_lines[ 0 ]->c1 = copyof("A0");
451 :
452 : for( int i=1; i<6; i++ ) {
453 :  get_cooordinate_on_screen ( *(CurveLines->aPS[i]->Anchor), &fx[0], &fy[0] );
454 :  l_lines[ i - 1 ]->p2->x = fx[0];
455 :  l_lines[ i - 1 ]->p2->y = fy[0];
456 :  l_lines[ i ] = new vLine();
457 :  l_lines[ i ]->p1->x = fx[0];
458 :  l_lines[ i ]->p1->y = fy[0];
459 :  l_lines[ i ]->c1 = copyof( m_concat( copyof("A"), itoa( i, num_str, 10 ) ) );
460 : }
461 :
462 : for( int i=0; i<6; i++ ) {
463 :  GamePaint_011( hDC, l_lines[i] );
464 : }