-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
if(theMapper){
int anId = 0;
- myPassFilter[ anId ]->SetInput( theMapper->GetInput() );
- myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId ]->SetInputData( theMapper->GetInput() );
+ myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 1
myGeomFilter->SetStoreMapping( myStoreMapping );
- myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myGeomFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 2
- myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() );
- myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myGeomFilter->GetOutputPort() );
+ myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 3
- myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 4
- myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
- myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
+ myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 5
- if(vtkDataSetMapper* aMapper = dynamic_cast<vtkDataSetMapper*>(theMapper)){
- aMapper->SetInput(myPassFilter[anId]->GetOutput());
- }else if(vtkPolyDataMapper* aMapper = dynamic_cast<vtkPolyDataMapper*>(theMapper)){
- aMapper->SetInput(myPassFilter[anId]->GetPolyDataOutput());
- }
+ theMapper->SetInputConnection(myPassFilter[anId]->GetOutputPort());
}
Superclass::SetMapper(theMapper);
}
::Render(vtkRenderer *ren, vtkMapper* m)
{
if(vtkDataSet* aDataSet = GetInput()){
- static vtkFloatingPointType PERCENTS_OF_DETAILS = 0.50;
+ static double PERCENTS_OF_DETAILS = 0.50;
vtkIdType aNbOfPoints = vtkIdType(aDataSet->GetNumberOfPoints()*PERCENTS_OF_DETAILS);
if(aNbOfPoints > 0)
SetNumberOfCloudPoints(aNbOfPoints);
}
+ int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
if(myIsResolveCoincidentTopology){
- int aResolveCoincidentTopology = vtkMapper::GetResolveCoincidentTopology();
- vtkFloatingPointType aFactor, aUnit;
+ double aFactor, aUnit;
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
Superclass::Render(ren,m);
vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
- vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology);
}else{
+ vtkMapper::SetResolveCoincidentTopologyToOff();
Superclass::Render(ren,m);
}
+ vtkMapper::SetResolveCoincidentTopology(aResolveCoincidentTopology);
}
/*!
*/
void
VTKViewer_Actor
-::SetPolygonOffsetParameters(vtkFloatingPointType factor,
- vtkFloatingPointType units)
+::SetPolygonOffsetParameters(double factor,
+ double units)
{
myPolygonOffsetFactor = factor;
myPolygonOffsetUnits = units;
*/
void
VTKViewer_Actor
-::GetPolygonOffsetParameters(vtkFloatingPointType& factor,
- vtkFloatingPointType& units)
+::GetPolygonOffsetParameters(double& factor,
+ double& units)
{
factor = myPolygonOffsetFactor;
units = myPolygonOffsetUnits;
/*!
\return shrink factor
*/
-vtkFloatingPointType
+double
VTKViewer_Actor
::GetShrinkFactor()
{
/*!
Get coordinates of a node for given object index
*/
-vtkFloatingPointType*
+double*
VTKViewer_Actor
::GetNodeCoord(int theObjID)
{
if(myIsInfinite)
return true;
- static vtkFloatingPointType MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
- vtkFloatingPointType aBounds[6];
+ static double MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
+ double aBounds[6];
GetBounds(aBounds);
for(int i = 0; i < 6; i++)
if(fabs(aBounds[i]) > MAX_DISTANCE)
return true;
- static vtkFloatingPointType MIN_DISTANCE = 1.0/VTK_LARGE_FLOAT;
+ static double MIN_DISTANCE = 1.0/VTK_LARGE_FLOAT;
if(GetLength() < MIN_DISTANCE)
return true;
/*!
\return current bounding box
*/
-vtkFloatingPointType*
+double*
VTKViewer_Actor
::GetBounds()
{
*/
void
VTKViewer_Actor
-::GetBounds(vtkFloatingPointType theBounds[6])
+::GetBounds(double theBounds[6])
{
Superclass::GetBounds(theBounds);
}
void
VTKViewer_Actor
-::SetSize( const vtkFloatingPointType )
+::SetSize( const double )
{}
void
VTKViewer_Actor
-::SetOpacity(vtkFloatingPointType theOpacity)
+::SetOpacity(double theOpacity)
{
myOpacity = theOpacity;
GetProperty()->SetOpacity(theOpacity);
}
-vtkFloatingPointType
+double
VTKViewer_Actor
::GetOpacity()
{
*/
void
VTKViewer_Actor
-::SetColor(vtkFloatingPointType r,
- vtkFloatingPointType g,
- vtkFloatingPointType b)
+::SetColor(double r,
+ double g,
+ double b)
{
GetProperty()->SetColor(r,g,b);
}
*/
void
VTKViewer_Actor
-::SetColor(const vtkFloatingPointType theRGB[3])
+::SetColor(const double theRGB[3])
{
SetColor(theRGB[0],theRGB[1],theRGB[2]);
}
*/
void
VTKViewer_Actor
-::GetColor(vtkFloatingPointType& r,
- vtkFloatingPointType& g,
- vtkFloatingPointType& b)
+::GetColor(double& r,
+ double& g,
+ double& b)
{
- vtkFloatingPointType aColor[3];
+ double aColor[3];
GetProperty()->GetColor(aColor);
r = aColor[0];
g = aColor[1];
}
/*!
- Get current material
-*/
-vtkProperty*
-VTKViewer_Actor
-::GetMaterial()
-{
- return NULL;
+ Get current front material\r
+*/\r
+vtkProperty* \r
+VTKViewer_Actor\r
+::GetFrontMaterial()\r
+{\r
+ return NULL;\r
+}\r
+\r
+/*!\r
+ Get current back material\r
+*/\r
+vtkProperty* \r
+VTKViewer_Actor\r
+::GetBackMaterial()\r
+{\r
+ return NULL;\r
}
/*!
/*!
* Set Max angle for representation 2D quadratic element as arked polygon
*/
-void VTKViewer_Actor::SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle){
+void VTKViewer_Actor::SetQuadraticArcAngle(double theMaxAngle){
myGeomFilter->SetQuadraticArcAngle(theMaxAngle);
}
/*!
* Return Max angle of the representation 2D quadratic element as arked polygon
*/
-vtkFloatingPointType VTKViewer_Actor::GetQuadraticArcAngle() const{
+double VTKViewer_Actor::GetQuadraticArcAngle() const{
return myGeomFilter->GetQuadraticArcAngle();
}