Skip to content

Commit acdc742

Browse files
Robert Braunadeas31
authored andcommitted
Some comments and code cleanup.
1 parent ef3a48f commit acdc742

File tree

1 file changed

+60
-26
lines changed

1 file changed

+60
-26
lines changed

OMEdit/OMEditGUI/Animation/AnimationWindow.cpp

Lines changed: 60 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,11 @@ void AnimationWindow::cameraPositionIsometric()
502502
mpSceneView->getCameraManipulator()->setByMatrix(mat);
503503
}
504504

505+
506+
/*!
507+
* \brief AnimationWindow::cameraPositionLeft1
508+
* sets the camera position to Left 1
509+
*/
505510
void AnimationWindow::cameraPositionLeft1()
506511
{
507512
double d = computeDistanceToOrigin();
@@ -513,34 +518,23 @@ void AnimationWindow::cameraPositionLeft1()
513518
}
514519

515520
/*!
516-
* \brief AnimationWindow::cameraPositionXY
517-
* sets the camera position to XY
521+
* \brief AnimationWindow::cameraPositionLeft2
522+
* sets the camera position to Left 2
518523
*/
519524
void AnimationWindow::cameraPositionLeft2()
520525
{
521-
//the new orientation
522-
//osg::Matrix3 newOrient = osg::Matrix3(1, 0, 0, 0, 0, 1, 0, -1, 0);
523-
osg::ref_ptr<osgGA::CameraManipulator> manipulator = mpSceneView->getCameraManipulator();
524-
osg::Matrixd mat2 = manipulator->getMatrix();
525-
526-
std::stringstream ss;
527-
ss << "Matrix:\n" << mat2(0,0) << ", " << mat2(0,1) << ", " << mat2(0,2) << ", " << mat2(0,3) << "\n"
528-
<< mat2(1,0) << ", " << mat2(1,1) << ", " << mat2(1,2) << ", " << mat2(1,3) << "\n"
529-
<< mat2(2,0) << ", " << mat2(2,1) << ", " << mat2(2,2) << ", " << mat2(2,3) << "\n"
530-
<< mat2(3,0) << ", " << mat2(3,1) << ", " << mat2(3,2) << ", " << mat2(3,3) << "\n\n";
531-
MessagesWidget::instance()->addGUIMessage(MessageItem(MessageItem::MetaModel, "", false, 0, 0, 0, 0, QString(ss.str().c_str()),
532-
Helper::scriptingKind, Helper::errorLevel));
533-
534-
535-
536526
double d = computeDistanceToOrigin();
537527
osg::Matrixd mat = osg::Matrixd(-1, 0, 0, 0,
538-
0, 1, 0, 0,
539-
0, 0,-1, 0,
540-
0, 0,-d, 1);
528+
0, 1, 0, 0,
529+
0, 0,-1, 0,
530+
0, 0,-d, 1);
541531
mpSceneView->getCameraManipulator()->setByMatrix(mat);
542532
}
543533

534+
/*!
535+
* \brief AnimationWindow::cameraPositionRight1
536+
* sets the camera position to Right 1
537+
*/
544538
void AnimationWindow::cameraPositionRight1()
545539
{
546540
double d = computeDistanceToOrigin();
@@ -552,8 +546,8 @@ void AnimationWindow::cameraPositionRight1()
552546
}
553547

554548
/*!
555-
* \brief AnimationWindow::cameraPositionXY
556-
* sets the camera position to XY
549+
* \brief AnimationWindow::cameraPositionRight2
550+
* sets the camera position to Right 2
557551
*/
558552
void AnimationWindow::cameraPositionRight2()
559553
{
@@ -565,6 +559,10 @@ void AnimationWindow::cameraPositionRight2()
565559
mpSceneView->getCameraManipulator()->setByMatrix(mat);
566560
}
567561

562+
/*!
563+
* \brief AnimationWindow::cameraPositionFront1
564+
* sets the camera position to Front 1
565+
*/
568566
void AnimationWindow::cameraPositionFront1()
569567
{
570568
double d = computeDistanceToOrigin();
@@ -575,6 +573,10 @@ void AnimationWindow::cameraPositionFront1()
575573
mpSceneView->getCameraManipulator()->setByMatrix(mat);
576574
}
577575

576+
/*!
577+
* \brief AnimationWindow::cameraPositionFront2
578+
* sets the camera position to Front 2
579+
*/
578580
void AnimationWindow::cameraPositionFront2()
579581
{
580582
double d = computeDistanceToOrigin();
@@ -585,6 +587,10 @@ void AnimationWindow::cameraPositionFront2()
585587
mpSceneView->getCameraManipulator()->setByMatrix(mat);
586588
}
587589

590+
/*!
591+
* \brief AnimationWindow::cameraPositionFront3
592+
* sets the camera position to Front 3
593+
*/
588594
void AnimationWindow::cameraPositionFront3()
589595
{
590596
double d = computeDistanceToOrigin();
@@ -595,6 +601,10 @@ void AnimationWindow::cameraPositionFront3()
595601
mpSceneView->getCameraManipulator()->setByMatrix(mat);
596602
}
597603

604+
/*!
605+
* \brief AnimationWindow::cameraPositionBack1
606+
* sets the camera position to Back 1
607+
*/
598608
void AnimationWindow::cameraPositionBack1()
599609
{
600610
double d = computeDistanceToOrigin();
@@ -606,8 +616,8 @@ void AnimationWindow::cameraPositionBack1()
606616
}
607617

608618
/*!
609-
* \brief AnimationWindow::cameraPositionXZ
610-
* sets the camera position to XZ
619+
* \brief AnimationWindow::cameraPositionBack2
620+
* sets the camera position to Back 2
611621
*/
612622
void AnimationWindow::cameraPositionBack2()
613623
{
@@ -619,6 +629,10 @@ void AnimationWindow::cameraPositionBack2()
619629
mpSceneView->getCameraManipulator()->setByMatrix(mat);
620630
}
621631

632+
/*!
633+
* \brief AnimationWindow::cameraPositionBack3
634+
* sets the camera position to Back 3
635+
*/
622636
void AnimationWindow::cameraPositionBack3()
623637
{
624638
double d = computeDistanceToOrigin();
@@ -629,6 +643,10 @@ void AnimationWindow::cameraPositionBack3()
629643
mpSceneView->getCameraManipulator()->setByMatrix(mat);
630644
}
631645

646+
/*!
647+
* \brief AnimationWindow::cameraPositionTop1
648+
* sets the camera position to Top 1
649+
*/
632650
void AnimationWindow::cameraPositionTop1()
633651
{
634652
double d = computeDistanceToOrigin();
@@ -640,8 +658,8 @@ void AnimationWindow::cameraPositionTop1()
640658
}
641659

642660
/*!
643-
* \brief AnimationWindow::cameraPositionYZ
644-
* sets the camera position to YZ
661+
* \brief AnimationWindow::cameraPositionTop2
662+
* sets the camera position to Top 2
645663
*/
646664
void AnimationWindow::cameraPositionTop2()
647665
{
@@ -653,6 +671,10 @@ void AnimationWindow::cameraPositionTop2()
653671
mpSceneView->getCameraManipulator()->setByMatrix(mat);
654672
}
655673

674+
/*!
675+
* \brief AnimationWindow::cameraPositionTop3
676+
* sets the camera position to Top 3
677+
*/
656678
void AnimationWindow::cameraPositionTop3()
657679
{
658680
double d = computeDistanceToOrigin();
@@ -663,6 +685,10 @@ void AnimationWindow::cameraPositionTop3()
663685
mpSceneView->getCameraManipulator()->setByMatrix(mat);
664686
}
665687

688+
/*!
689+
* \brief AnimationWindow::cameraPositionBottom1
690+
* sets the camera position to Bottom 1
691+
*/
666692
void AnimationWindow::cameraPositionBottom1()
667693
{
668694
double d = computeDistanceToOrigin();
@@ -673,6 +699,10 @@ void AnimationWindow::cameraPositionBottom1()
673699
mpSceneView->getCameraManipulator()->setByMatrix(mat);
674700
}
675701

702+
/*!
703+
* \brief AnimationWindow::cameraPositionBottom2
704+
* sets the camera position to Bottom 2
705+
*/
676706
void AnimationWindow::cameraPositionBottom2()
677707
{
678708
double d = computeDistanceToOrigin();
@@ -683,6 +713,10 @@ void AnimationWindow::cameraPositionBottom2()
683713
mpSceneView->getCameraManipulator()->setByMatrix(mat);
684714
}
685715

716+
/*!
717+
* \brief AnimationWindow::cameraPositionBottom3
718+
* sets the camera position to Bottom 3
719+
*/
686720
void AnimationWindow::cameraPositionBottom3()
687721
{
688722
double d = computeDistanceToOrigin();

0 commit comments

Comments
 (0)