src/gui_editactions.cc

changeset 590
7aec744ce97b
parent 587
507e5d5c348c
child 595
b6b39c1721a1
equal deleted inserted replaced
589:1417828920e6 590:7aec744ce97b
356 356
357 // ============================================================================= 357 // =============================================================================
358 // ----------------------------------------------------------------------------- 358 // -----------------------------------------------------------------------------
359 void doMoveObjects (vertex vect) 359 void doMoveObjects (vertex vect)
360 { // Apply the grid values 360 { // Apply the grid values
361 vect[X] *= currentGrid().confs[Grid::X]->value; 361 vect[X] *= *currentGrid().confs[Grid::X];
362 vect[Y] *= currentGrid().confs[Grid::Y]->value; 362 vect[Y] *= *currentGrid().confs[Grid::Y];
363 vect[Z] *= currentGrid().confs[Grid::Z]->value; 363 vect[Z] *= *currentGrid().confs[Grid::Z];
364 364
365 for (LDObject* obj : selection()) 365 for (LDObject* obj : selection())
366 { obj->move (vect); 366 { obj->move (vect);
367 g_win->R()->compileObject (obj); 367 g_win->R()->compileObject (obj);
368 } 368 }
421 // ----------------------------------------------------------------------------- 421 // -----------------------------------------------------------------------------
422 static void doRotate (const int l, const int m, const int n) 422 static void doRotate (const int l, const int m, const int n)
423 { QList<LDObject*> sel = selection(); 423 { QList<LDObject*> sel = selection();
424 QList<vertex*> queue; 424 QList<vertex*> queue;
425 const vertex rotpoint = rotPoint (sel); 425 const vertex rotpoint = rotPoint (sel);
426 const double angle = (pi * currentGrid().confs[Grid::Angle]->value) / 180, 426 const double angle = (pi * *currentGrid().confs[Grid::Angle]) / 180,
427 cosangle = cos (angle), 427 cosangle = cos (angle),
428 sinangle = sin (angle); 428 sinangle = sin (angle);
429 429
430 // ref: http://en.wikipedia.org/wiki/Transformation_matrix#Rotation_2 430 // ref: http://en.wikipedia.org/wiki/Transformation_matrix#Rotation_2
431 matrix transform ( 431 matrix transform (

mercurial