myIsInfinite = false;
myIsResolveCoincidentTopology = true;
-
- vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
- myPolygonOffsetUnits);
+
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
+ float a = myPolygonOffsetFactor ;
+ float b = myPolygonOffsetUnits ;
+#else
+ double a = myPolygonOffsetFactor ;
+ double b = myPolygonOffsetUnits ;
+#endif
+ vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(a, b);
+ myPolygonOffsetFactor = a ;
+ myPolygonOffsetUnits = b ;
+
myStoreMapping = false;
myGeomFilter = SALOME_GeometryFilter::New();
void SALOME_Actor::Render(vtkRenderer *ren, vtkMapper* m){
if(myIsResolveCoincidentTopology){
int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
float aFactor, aUnit;
+#else
+ double aFactor, aUnit;
+#endif
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
}
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
float* SALOME_Actor::GetNodeCoord(int theObjID){
+#else
+double* SALOME_Actor::GetNodeCoord(int theObjID){
+#endif
return GetInput()->GetPoint(theObjID);
}
}
void SALOME_Actor::GetColor(float& r,float& g,float& b){
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
float aColor[3];
+#else
+ double aColor[3];
+#endif
GetProperty()->GetColor(aColor);
r = aColor[0];
g = aColor[1];
// For selection mapping purpose
virtual int GetNodeObjId(int theVtkID) { return theVtkID;}
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
virtual float* GetNodeCoord(int theObjID);
+#else
+ virtual double* GetNodeCoord(int theObjID);
+#endif
virtual int GetElemObjId(int theVtkID) { return theVtkID;}
virtual vtkCell* GetElemCell(int theObjID);
}
}
if((aNbElems = aConnectivity->GetNumberOfCells())){
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+#else
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
+#endif
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbElems);
aConnectivity->InitTraversal();
}
}
if((aNbElems = aConnectivity->GetNumberOfCells())){
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+#else
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
+#endif
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbElems);
aConnectivity->InitTraversal();
char *cellVis;
vtkIdType newCellId;
int faceId, *faceVerts, numFacePts;
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
float *x;
+#else
+ double *x;
+#endif
int PixelConvert[4], aNewPts[VTK_CELL_SIZE];
// ghost cell stuff
unsigned char updateLevel = (unsigned char)(output->GetUpdateGhostLevel());
int i, j, numIds, abort=0;
vtkIdType cellId, numCells, numPts;
vtkIdType oldId, newId;
- float center[3], *p, pt[3];
+ float center[3], pt[3];
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
+ float *p;
+#else
+ double *p;
+#endif
vtkPointData *pd, *outPD;;
vtkIdList *ptIds, *newPtIds;
vtkDataSet *input= this->GetInput();
}
int SALOME_Transform::IsIdentity(){
+#if ((VTK_MAJOR_VERSION == 4)&&(VTK_MINOR_VERSION <= 2))
float* aScale = GetScale();
+#else
+ double* aScale = GetScale();
+#endif
return (aScale[0] == 1.0 && aScale[1] == 1.0 && aScale[2] == 1.0);
}