0026109: Visualization - add ChangeAxisAspect(int) method to Graphic3d_GraduatedTrihedron
authorvsr <vsr@opencascade.com>
Mon, 20 Apr 2015 12:21:23 +0000 (15:21 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Apr 2015 13:09:35 +0000 (16:09 +0300)
src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx

index 13a46a7..13eb392 100644 (file)
@@ -147,6 +147,12 @@ public:
   Graphic3d_AxisAspect& ChangeYAxisAspect() { return myAxes(1); }
   Graphic3d_AxisAspect& ChangeZAxisAspect() { return myAxes(2); }
 
+  Graphic3d_AxisAspect& ChangeAxisAspect (const Standard_Integer theIndex)
+  {
+    Standard_OutOfRange_Raise_if (theIndex < 0 || theIndex > 2, "Graphic3d_GraduatedTrihedron::ChangeAxisAspect: theIndex is out of bounds [0,2].");
+    return myAxes (theIndex);
+  }
+
   const Graphic3d_AxisAspect& XAxisAspect() const { return myAxes(0); }
   const Graphic3d_AxisAspect& YAxisAspect() const { return myAxes(1); }
   const Graphic3d_AxisAspect& ZAxisAspect() const { return myAxes(2); }