[cig-commits] r11246 - cs/benchmark/cigma/trunk/scratch/cg/src
luis at geodynamics.org
luis at geodynamics.org
Tue Feb 26 04:51:57 PST 2008
Author: luis
Date: 2008-02-26 04:51:57 -0800 (Tue, 26 Feb 2008)
New Revision: 11246
Added:
cs/benchmark/cigma/trunk/scratch/cg/src/OrientationAxes.h
Log:
Added function for adding orientation axes to existing renderer
Added: cs/benchmark/cigma/trunk/scratch/cg/src/OrientationAxes.h
===================================================================
--- cs/benchmark/cigma/trunk/scratch/cg/src/OrientationAxes.h (rev 0)
+++ cs/benchmark/cigma/trunk/scratch/cg/src/OrientationAxes.h 2008-02-26 12:51:57 UTC (rev 11246)
@@ -0,0 +1,30 @@
+#ifndef __ORIENTATION_AXES_H__
+#define __ORIENTATION_AXES_H__
+
+#include <cassert>
+#include "QVTKWidget.h"
+
+#include "vtkAxesActor.h"
+#include "vtkOrientationMarkerWidget.h"
+#include "vtkRenderWindowInteractor.h"
+
+void AddOrientationAxes(QVTKWidget *qvtkWidget)
+{
+ assert(qvtkWidget != 0);
+
+ vtkRenderWindowInteractor *interactor = qvtkWidget->GetInteractor();
+
+ vtkAxesActor *axesActor = vtkAxesActor::New();
+ axesActor->SetNormalizedTipLength(0.4, 0.4, 0.4);
+ axesActor->SetNormalizedShaftLength(0.6, 0.6, 0.6);
+ axesActor->SetShaftTypeToCylinder();
+
+ vtkOrientationMarkerWidget *marker = vtkOrientationMarkerWidget::New();
+ marker->SetInteractor(interactor);
+ marker->SetOrientationMarker(axesActor);
+ marker->SetEnabled(true);
+ //marker->SetViewPort(0.0, 0.8, 0.2, 0.10);
+ marker->InteractiveOn();
+}
+
+#endif
More information about the cig-commits
mailing list