src/canvas.cpp

changeset 1390
3eace926af7f
parent 1380
bc799b965418
child 1392
0541d9b21968
equal deleted inserted replaced
1389:3fb8ad4d27b1 1390:3eace926af7f
345 return currentCamera().axisZ(); 345 return currentCamera().axisZ();
346 } 346 }
347 347
348 // ============================================================================= 348 // =============================================================================
349 // 349 //
350 void Canvas::setDepthValue (double depth) 350 void Canvas::setDrawPlane(const Plane& plane)
351 { 351 {
352 if (camera() < Camera::Free) 352 m_drawPlane = plane;
353 m_depthValues[static_cast<int>(camera())] = depth;
354 } 353 }
355 354
356 // ============================================================================= 355 // =============================================================================
357 // 356 //
358 double Canvas::getDepthValue() const 357 const Plane& Canvas::drawPlane() const
359 { 358 {
360 if (camera() < Camera::Free) 359 return m_drawPlane;
361 return m_depthValues[static_cast<int>(camera())];
362 else
363 return 0.0;
364 } 360 }
365 361
366 void Canvas::contextMenuEvent(QContextMenuEvent* event) 362 void Canvas::contextMenuEvent(QContextMenuEvent* event)
367 { 363 {
368 m_window->spawnContextMenu(event->globalPos()); 364 m_window->spawnContextMenu(event->globalPos());

mercurial