1 // SALOME OBJECT : kernel of SALOME component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SVTK_CubeAxesActor2D.cxx
25 // Author : Eugeny Nikolaev
29 #include "SVTK_CubeAxesActor2D.h"
30 #include "VTKViewer_Transform.h"
32 #include <vtkPolyDataMapper.h>
33 #include <vtkRectilinearGridGeometryFilter.h>
35 #include <vtkCubeAxesActor2D.h>
36 #include <vtkAxisActor2D.h>
37 #include <vtkCamera.h>
38 #include <vtkDataSet.h>
40 #include <vtkObjectFactory.h>
41 #include <vtkTextProperty.h>
42 #include <vtkViewport.h>
43 #include <vtkFloatArray.h>
44 #include <vtkRectilinearGrid.h>
45 #include <vtkProperty.h>
46 #include <vtkProperty2D.h>
48 vtkCxxRevisionMacro(SVTK_CubeAxesActor2D, "$Revision$");
49 vtkStandardNewMacro(SVTK_CubeAxesActor2D);
51 // Instantiate this object.
52 SVTK_CubeAxesActor2D::SVTK_CubeAxesActor2D()
54 this->wireActorXY = vtkActor::New();
55 this->wireActorYZ = vtkActor::New();
56 this->wireActorXZ = vtkActor::New();
58 this->planeXY = vtkRectilinearGridGeometryFilter::New();
59 this->planeYZ = vtkRectilinearGridGeometryFilter::New();
60 this->planeXZ = vtkRectilinearGridGeometryFilter::New();
62 this->rgridMapperXY = vtkPolyDataMapper::New();
63 this->rgridMapperYZ = vtkPolyDataMapper::New();
64 this->rgridMapperXZ = vtkPolyDataMapper::New();
66 this->rgridMapperXY->SetInput(this->planeXY->GetOutput());
67 this->rgridMapperYZ->SetInput(this->planeYZ->GetOutput());
68 this->rgridMapperXZ->SetInput(this->planeXZ->GetOutput());
70 this->wireActorXY->SetMapper(rgridMapperXY);
71 this->wireActorYZ->SetMapper(rgridMapperYZ);
72 this->wireActorXZ->SetMapper(rgridMapperXZ);
74 this->wireActorXY->GetProperty()->SetRepresentationToWireframe();
75 this->wireActorYZ->GetProperty()->SetRepresentationToWireframe();
76 this->wireActorXZ->GetProperty()->SetRepresentationToWireframe();
78 // setting ambient to 1 (if no - incorrect reaction on light)
79 this->wireActorXY->GetProperty()->SetAmbient(1);
80 this->wireActorYZ->GetProperty()->SetAmbient(1);
81 this->wireActorXZ->GetProperty()->SetAmbient(1);
83 this->XAxis->SetTitle(this->XLabel);
84 this->YAxis->SetTitle(this->YLabel);
85 this->ZAxis->SetTitle(this->ZLabel);
87 this->XAxis->SetNumberOfLabels(this->NumberOfLabels);
88 this->YAxis->SetNumberOfLabels(this->NumberOfLabels);
89 this->ZAxis->SetNumberOfLabels(this->NumberOfLabels);
91 this->XAxis->SetLabelFormat(this->LabelFormat);
92 this->YAxis->SetLabelFormat(this->LabelFormat);
93 this->ZAxis->SetLabelFormat(this->LabelFormat);
95 this->XAxis->SetFontFactor(this->FontFactor);
96 this->YAxis->SetFontFactor(this->FontFactor);
97 this->ZAxis->SetFontFactor(this->FontFactor);
99 this->XAxis->SetProperty(this->GetProperty());
100 this->YAxis->SetProperty(this->GetProperty());
101 this->ZAxis->SetProperty(this->GetProperty());
103 vtkTextProperty* aTLProp = vtkTextProperty::New();
105 aTLProp->SetItalic(0);
106 aTLProp->SetShadow(0);
107 aTLProp->SetFontFamilyToArial();
108 aTLProp->SetColor(1,0,0);
109 if (this->XAxis->GetLabelTextProperty())
110 this->XAxis->GetLabelTextProperty()->ShallowCopy(aTLProp);
111 aTLProp->SetColor(0,1,0);
112 if (this->YAxis->GetLabelTextProperty())
113 this->YAxis->GetLabelTextProperty()->ShallowCopy(aTLProp);
114 aTLProp->SetColor(0,0,1);
115 if (this->ZAxis->GetLabelTextProperty())
116 this->ZAxis->GetLabelTextProperty()->ShallowCopy(aTLProp);;
118 aTLProp->SetColor(1,0,0);
119 if (this->XAxis->GetLabelTextProperty())
120 this->XAxis->GetTitleTextProperty()->ShallowCopy(aTLProp);
121 aTLProp->SetColor(0,1,0);
122 if (this->YAxis->GetLabelTextProperty())
123 this->YAxis->GetTitleTextProperty()->ShallowCopy(aTLProp);
124 aTLProp->SetColor(0,0,1);
125 if (this->ZAxis->GetLabelTextProperty())
126 this->ZAxis->GetTitleTextProperty()->ShallowCopy(aTLProp);
132 SVTK_CubeAxesActor2D::~SVTK_CubeAxesActor2D()
134 this->wireActorXY->Delete();
135 this->wireActorYZ->Delete();
136 this->wireActorXZ->Delete();
138 this->planeXY->Delete();
139 this->planeYZ->Delete();
140 this->planeXZ->Delete();
142 this->rgridMapperXY->Delete();
143 this->rgridMapperYZ->Delete();
144 this->rgridMapperXZ->Delete();
147 // Static variable describes connections in cube.
148 static int Conn[8][3] = {{1,2,4}, {0,3,5}, {3,0,6}, {2,1,7},
149 {5,6,0}, {4,7,1}, {7,4,2}, {6,5,3}};
151 // Project the bounding box and compute edges on the border of the bounding
152 // cube. Determine which parts of the edges are visible via intersection
153 // with the boundary of the viewport (minus borders).
154 int SVTK_CubeAxesActor2D::RenderOverlay(vtkViewport *viewport)
156 int renderedSomething=0;
159 if ( ! this->RenderSomething )
165 if ( this->XAxisVisibility )
167 renderedSomething += this->XAxis->RenderOverlay(viewport);
169 if ( this->YAxisVisibility )
171 renderedSomething += this->YAxis->RenderOverlay(viewport);
173 if ( this->ZAxisVisibility )
175 renderedSomething += this->ZAxis->RenderOverlay(viewport);
178 bool RX=false,RY=false;
179 if (this->XAxisVisibility){
180 this->wireActorXY->RenderOverlay(viewport);
181 this->wireActorXZ->RenderOverlay(viewport);
184 if (this->YAxisVisibility){
185 if(!RX) this->wireActorXY->RenderOverlay(viewport);
186 this->wireActorYZ->RenderOverlay(viewport);
189 if (this->ZAxisVisibility){
190 if(!RX) this->wireActorXZ->RenderOverlay(viewport);
191 if(!RY) this->wireActorYZ->RenderOverlay(viewport);
194 return renderedSomething;
197 static void ChangeValues(vtkFloatingPointType* aArray1,
198 vtkFloatingPointType* aArray2,
199 vtkFloatingPointType *aRange1,
200 vtkFloatingPointType* aRange2,
203 vtkFloatingPointType tmp=-1000;
205 for (int i=0; i<4; i++){
206 tmp = aArray1[i]; aArray1[i] = aArray2[i]; aArray2[i] = tmp;
209 for(int i=0;i<2; i++){
213 tmp = aRange1[i]; aRange1[i] = aRange2[i]; aRange2[i] = tmp;
217 tmp = aArray1[2]; aArray1[2] = aArray2[0]; aArray2[0] = tmp;
218 tmp = aArray1[3]; aArray1[3] = aArray2[1]; aArray2[1] = tmp;
219 tmp = aArray1[0]; aArray1[0] = aArray2[2]; aArray2[2] = tmp;
220 tmp = aArray1[1]; aArray1[1] = aArray2[3]; aArray2[3] = tmp;
222 tmp = aRange1[0]; aRange1[0] = aRange2[1]; aRange2[1] = tmp;
223 tmp = aRange1[1]; aRange1[1] = aRange2[0]; aRange2[0] = tmp;
227 static void ChangeArrays(vtkFloatingPointType* xCoords,
228 vtkFloatingPointType* yCoords,
229 vtkFloatingPointType* zCoords,
230 vtkFloatingPointType* xRange,
231 vtkFloatingPointType* yRange,
232 vtkFloatingPointType* zRange,
237 if ( xAxes == 0 && yAxes == 2 && zAxes == 1)
238 ChangeValues(yCoords,zCoords,yRange,zRange,true);
239 else if (xAxes == 1 && yAxes == 0 && zAxes == 2)
240 ChangeValues(xCoords,yCoords,xRange,yRange,true);
241 else if (xAxes == 1 && yAxes == 2 && zAxes == 0){
242 ChangeValues(xCoords,zCoords,xRange,zRange,false);
243 // xAxes == 0 && yAxes == 2 && zAxes == 1
244 ChangeValues(yCoords,zCoords,yRange,zRange,true);
245 } else if (xAxes == 2 && yAxes == 0 && zAxes == 1){
246 ChangeValues(xCoords,yCoords,xRange,yRange,true);
247 // xAxes == 0 && yAxes == 2 && zAxes == 1
248 ChangeValues(zCoords,yCoords,zRange,yRange,true);
249 } else if (xAxes == 2 && yAxes == 1 && zAxes == 0)
250 ChangeValues(zCoords,xCoords,zRange,xRange,false);
253 // Project the bounding box and compute edges on the border of the bounding
254 // cube. Determine which parts of the edges are visible via intersection
255 // with the boundary of the viewport (minus borders).
256 int SVTK_CubeAxesActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
258 vtkFloatingPointType bounds[6], slope = 0.0, minSlope, num, den;
259 vtkFloatingPointType pts[8][3], d2, d2Min, min;
261 int xIdx, yIdx = 0, zIdx = 0, zIdx2, renderedSomething=0;
262 int xAxes = 0, yAxes, zAxes;
267 vtkErrorMacro(<<"No camera!");
268 this->RenderSomething = 0;
272 this->RenderSomething = 1;
274 // determine the bounds to use
275 this->GetBounds(bounds);
277 // Build the axes (almost always needed so we don't check mtime)
278 // Transform all points into display coordinates
279 this->TransformBounds(viewport, bounds, pts);
281 // Find the portion of the bounding box that fits within the viewport,
282 if ( this->ClipBounds(viewport, pts, bounds) == 0 )
284 this->RenderSomething = 0;
288 // Take into account the inertia. Process only so often.
289 if ( this->RenderCount++ == 0 || !(this->RenderCount % this->Inertia) )
291 // Okay, we have a bounding box, maybe clipped and scaled, that is visible.
292 // We setup the axes depending on the fly mode.
293 if ( this->FlyMode == VTK_FLY_CLOSEST_TRIAD )
295 // Loop over points and find the closest point to the camera
296 min = VTK_LARGE_FLOAT;
297 for (i=0; i < 8; i++)
299 if ( pts[i][2] < min )
306 // Setup the three axes to be drawn
313 zIdx2 = Conn[idx][2];
317 vtkFloatingPointType e1[2], e2[2], e3[2];
319 // Find distance to origin
320 d2Min = VTK_LARGE_FLOAT;
321 for (i=0; i < 8; i++)
323 d2 = pts[i][0]*pts[i][0] + pts[i][1]*pts[i][1];
331 // find minimum slope point connected to closest point and on
332 // right side (in projected coordinates). This is the first edge.
333 minSlope = VTK_LARGE_FLOAT;
334 for (xIdx=0, i=0; i<3; i++)
336 num = (pts[Conn[idx][i]][1] - pts[idx][1]);
337 den = (pts[Conn[idx][i]][0] - pts[idx][0]);
342 if ( slope < minSlope && den > 0 )
345 yIdx = Conn[idx][(i+1)%3];
346 zIdx = Conn[idx][(i+2)%3];
352 // find edge (connected to closest point) on opposite side
355 e1[i] = (pts[xIdx][i] - pts[idx][i]);
356 e2[i] = (pts[yIdx][i] - pts[idx][i]);
357 e3[i] = (pts[zIdx][i] - pts[idx][i]);
359 vtkMath::Normalize2D(e1);
360 vtkMath::Normalize2D(e2);
361 vtkMath::Normalize2D(e3);
363 if ( vtkMath::Dot2D(e1,e2) < vtkMath::Dot2D(e1,e3) )
365 yAxes = (xAxes + 1) % 3;
370 yAxes = (xAxes + 2) % 3;
373 // Find the final point by determining which global x-y-z axes have not
374 // been represented, and then determine the point closest to the viewer.
375 zAxes = (xAxes != 0 && yAxes != 0 ? 0 :
376 (xAxes != 1 && yAxes != 1 ? 1 : 2));
377 if ( pts[Conn[xIdx][zAxes]][2] < pts[Conn[yIdx][zAxes]][2] )
380 zIdx2 = Conn[xIdx][zAxes];
385 zIdx2 = Conn[yIdx][zAxes];
387 }//else boundary edges fly mode
388 this->InertiaAxes[0] = idx;
389 this->InertiaAxes[1] = xIdx;
390 this->InertiaAxes[2] = yIdx;
391 this->InertiaAxes[3] = zIdx;
392 this->InertiaAxes[4] = zIdx2;
393 this->InertiaAxes[5] = xAxes;
394 this->InertiaAxes[6] = yAxes;
395 this->InertiaAxes[7] = zAxes;
399 idx = this->InertiaAxes[0];
400 xIdx = this->InertiaAxes[1];
401 yIdx = this->InertiaAxes[2];
402 zIdx = this->InertiaAxes[3];
403 zIdx2 = this->InertiaAxes[4];
404 xAxes = this->InertiaAxes[5];
405 yAxes = this->InertiaAxes[6];
406 zAxes = this->InertiaAxes[7];
409 // Setup the axes for plotting
410 vtkFloatingPointType xCoords[4], yCoords[4], zCoords[4], xRange[2], yRange[2], zRange[2];
411 this->AdjustAxes(pts, bounds, idx, xIdx, yIdx, zIdx, zIdx2,
413 xCoords, yCoords, zCoords, xRange, yRange, zRange);
416 this->Labels[0] = this->XLabel;
417 this->Labels[1] = this->YLabel;
418 this->Labels[2] = this->ZLabel;
420 // correct XAxis, YAxis, ZAxis, which must be
421 // parallel OX, OY, OZ system coordinates
422 // if xAxes=0 yAxes=1 zAxes=2 - good situation
423 if (!(xAxes == 0 && yAxes == 1 && zAxes == 2))
424 ChangeArrays(xCoords,yCoords,zCoords,
425 xRange,yRange,zRange,
429 if(m_Transform.GetPointer() != NULL)
430 m_Transform->GetMatrixScale(aTScale);
432 this->XAxis->GetPositionCoordinate()->SetValue(xCoords[0], xCoords[1]);
433 this->XAxis->GetPosition2Coordinate()->SetValue(xCoords[2], xCoords[3]);
434 if(m_Transform.GetPointer() != NULL) this->XAxis->SetRange(xRange[0]/aTScale[0], xRange[1]/aTScale[0]);
435 else this->XAxis->SetRange(xRange[0], xRange[1]);
437 this->YAxis->GetPositionCoordinate()->SetValue(yCoords[2], yCoords[3]);
438 this->YAxis->GetPosition2Coordinate()->SetValue(yCoords[0], yCoords[1]);
439 if(m_Transform.GetPointer() != NULL) this->YAxis->SetRange(yRange[1]/aTScale[1], yRange[0]/aTScale[1]);
440 else this->YAxis->SetRange(yRange[1], yRange[0]);
442 this->ZAxis->GetPositionCoordinate()->SetValue(zCoords[0], zCoords[1]);
443 this->ZAxis->GetPosition2Coordinate()->SetValue(zCoords[2], zCoords[3]);
444 if(m_Transform.GetPointer() != NULL) this->ZAxis->SetRange(zRange[0]/aTScale[2], zRange[1]/aTScale[2]);
445 else this->ZAxis->SetRange(zRange[0], zRange[1]);
447 int numOfLabelsX = this->XAxis->GetNumberOfLabels();
448 int numOfLabelsY = this->YAxis->GetNumberOfLabels();
449 int numOfLabelsZ = this->ZAxis->GetNumberOfLabels();
451 // XCoords coordinates for X grid
452 vtkFloatArray *XCoords = vtkFloatArray::New();
454 for(int i=0;i<numOfLabelsX;i++){
456 for(i=0;i<numOfLabelsX;i++){
458 vtkFloatingPointType val = bounds[0]+i*(bounds[1]-bounds[0])/(numOfLabelsX-1);
459 XCoords->InsertNextValue(val);
461 // YCoords coordinates for Y grid
462 vtkFloatArray *YCoords = vtkFloatArray::New();
464 for(int i=0;i<numOfLabelsX;i++){
466 for(i=0;i<numOfLabelsX;i++){
468 vtkFloatingPointType val = bounds[2]+i*(bounds[3]-bounds[2])/(numOfLabelsY-1);
469 YCoords->InsertNextValue(val);
471 // ZCoords coordinates for Z grid
472 vtkFloatArray *ZCoords = vtkFloatArray::New();
474 for(int i=0;i<numOfLabelsZ;i++){
476 for(i=0;i<numOfLabelsZ;i++){
478 vtkFloatingPointType val = bounds[4]+i*(bounds[5]-bounds[4])/(numOfLabelsZ-1);
479 ZCoords->InsertNextValue(val);
482 vtkRectilinearGrid *rgrid = vtkRectilinearGrid::New();
483 rgrid->SetDimensions(numOfLabelsX,numOfLabelsY,numOfLabelsZ);
484 rgrid->SetXCoordinates(XCoords);
485 rgrid->SetYCoordinates(YCoords);
486 rgrid->SetZCoordinates(ZCoords);
488 this->planeXY->SetInput(rgrid);
489 this->planeYZ->SetInput(rgrid);
490 this->planeXZ->SetInput(rgrid);
494 vtkFloatingPointType aCPosition[3];
495 vtkFloatingPointType aCDirection[3];
496 this->Camera->GetPosition(aCPosition);
497 this->Camera->GetDirectionOfProjection(aCDirection);
499 // culculate placement of XY
500 bool replaceXY=false;
501 bool replaceYZ=false;
502 bool replaceXZ=false;
503 vtkFloatingPointType p[6][3]; // centers of planes
504 vtkFloatingPointType vecs[6][3]; // 6 vectors from camera position to centers
506 vtkFloatingPointType aMiddleX = (XCoords->GetValue(0) + XCoords->GetValue(numOfLabelsX-1))/2;
507 vtkFloatingPointType aMiddleY = (YCoords->GetValue(0) + YCoords->GetValue(numOfLabelsY-1))/2;
508 vtkFloatingPointType aMiddleZ = (ZCoords->GetValue(0) + ZCoords->GetValue(numOfLabelsZ-1))/2;
511 p[0][0] = aMiddleX; // plane X=0.5 Y=0.5 Z=0
513 p[0][2] = ZCoords->GetValue(0);
515 p[1][0] = aMiddleX; // plane X=0.5 Y=0.5 Z=1
517 p[1][2] = ZCoords->GetValue(numOfLabelsZ-1);
520 p[2][0] = XCoords->GetValue(0); // plane X=0 Y=0.5 Z=0.5
524 p[3][0] = XCoords->GetValue(numOfLabelsX-1);
529 p[4][0] = aMiddleX; // plane X=0.5 Y=0 Z=0.5
530 p[4][1] = YCoords->GetValue(0);
533 p[5][0] = aMiddleX; // plane X=0.5 Y=1 Z=0.5
534 p[5][1] = YCoords->GetValue(numOfLabelsY-1);
542 for(int j=0;j<6;j++) vecs[j][i] = p[j][i] - aCPosition[i];
544 if ( vtkMath::Dot(vecs[0],aCDirection) < vtkMath::Dot(vecs[1],aCDirection))
546 if ( vtkMath::Dot(vecs[2],aCDirection) < vtkMath::Dot(vecs[3],aCDirection))
548 if ( vtkMath::Dot(vecs[4],aCDirection) < vtkMath::Dot(vecs[5],aCDirection))
551 if(replaceXY) this->planeXY->SetExtent(0,numOfLabelsX, 0,numOfLabelsY, numOfLabelsZ,numOfLabelsZ);
552 else this->planeXY->SetExtent(0,numOfLabelsX, 0,numOfLabelsY, 0,0);
554 if(replaceYZ) this->planeYZ->SetExtent(numOfLabelsX,numOfLabelsX, 0,numOfLabelsY, 0,numOfLabelsZ);
555 else this->planeYZ->SetExtent(0,0, 0,numOfLabelsY, 0,numOfLabelsZ);
557 if(replaceXZ) this->planeXZ->SetExtent(0,numOfLabelsX, numOfLabelsY,numOfLabelsY, 0,numOfLabelsZ);
558 else this->planeXZ->SetExtent(0,numOfLabelsX, 0,0, 0,numOfLabelsZ);
564 vtkFloatingPointType color[3];
566 this->GetProperty()->GetColor(color);
567 this->wireActorXY->GetProperty()->SetColor(color);
568 this->wireActorYZ->GetProperty()->SetColor(color);
569 this->wireActorXZ->GetProperty()->SetColor(color);
573 // Perform shallow copy here since each individual axis can be
574 // accessed through the class API (i.e. each individual axis text prop
575 // can be changed). Therefore, we can not just assign pointers otherwise
576 // each individual axis text prop would point to the same text prop.
578 if (this->AxisLabelTextProperty &&
579 this->AxisLabelTextProperty->GetMTime() > this->BuildTime)
581 if (this->XAxis->GetLabelTextProperty())
583 this->XAxis->GetLabelTextProperty()->ShallowCopy(
584 this->AxisLabelTextProperty);
586 if (this->YAxis->GetLabelTextProperty())
588 this->YAxis->GetLabelTextProperty()->ShallowCopy(
589 this->AxisLabelTextProperty);
591 if (this->ZAxis->GetLabelTextProperty())
593 this->ZAxis->GetLabelTextProperty()->ShallowCopy(
594 this->AxisLabelTextProperty);
598 if (this->AxisTitleTextProperty &&
599 this->AxisTitleTextProperty->GetMTime() > this->BuildTime)
601 if (this->XAxis->GetLabelTextProperty())
603 this->XAxis->GetTitleTextProperty()->ShallowCopy(
604 this->AxisTitleTextProperty);
606 if (this->YAxis->GetLabelTextProperty())
608 this->YAxis->GetTitleTextProperty()->ShallowCopy(
609 this->AxisTitleTextProperty);
611 if (this->ZAxis->GetLabelTextProperty())
613 this->ZAxis->GetTitleTextProperty()->ShallowCopy(
614 this->AxisTitleTextProperty);
618 this->BuildTime.Modified();
621 if ( this->XAxisVisibility )
623 renderedSomething += this->XAxis->RenderOpaqueGeometry(viewport);
625 if ( this->YAxisVisibility )
627 renderedSomething += this->YAxis->RenderOpaqueGeometry(viewport);
629 if ( this->ZAxisVisibility )
631 renderedSomething += this->ZAxis->RenderOpaqueGeometry(viewport);
634 bool RX=false,RY=false;
635 if (this->XAxisVisibility){
636 this->wireActorXY->RenderOpaqueGeometry(viewport);
637 this->wireActorXZ->RenderOpaqueGeometry(viewport);
640 if (this->YAxisVisibility){
641 if(!RX) this->wireActorXY->RenderOpaqueGeometry(viewport);
642 this->wireActorYZ->RenderOpaqueGeometry(viewport);
645 if (this->ZAxisVisibility){
646 if(!RX) this->wireActorXZ->RenderOpaqueGeometry(viewport);
647 if(!RY) this->wireActorYZ->RenderOpaqueGeometry(viewport);
650 return renderedSomething;
653 // Release any graphics resources that are being consumed by this actor.
654 // The parameter window could be used to determine which graphic
655 // resources to release.
656 void SVTK_CubeAxesActor2D::ReleaseGraphicsResources(vtkWindow *win)
658 this->XAxis->ReleaseGraphicsResources(win);
659 this->YAxis->ReleaseGraphicsResources(win);
660 this->ZAxis->ReleaseGraphicsResources(win);
662 this->wireActorXY->ReleaseGraphicsResources(win);
663 this->wireActorYZ->ReleaseGraphicsResources(win);
664 this->wireActorXZ->ReleaseGraphicsResources(win);
667 void SVTK_CubeAxesActor2D::SetTransform(VTKViewer_Transform* theTransform){
668 this->m_Transform = theTransform;
671 VTKViewer_Transform* SVTK_CubeAxesActor2D::GetTransform(){
672 return (this->m_Transform.GetPointer());