for(int anCellId = 0; anCellId < aNbCells; anCellId++){
VISU::TGaussPointID anObjID = aGaussMesh->GetObjID(anCellId);
cout<<anObjID.first<<"; "<<anObjID.second<<"; "<<aGaussMesh->GetNodeVTKID(anObjID.first)<<endl;
- vtkFloatingPointType* aCoord = aGaussMesh->GetNodeCoord(anCellId);
+ double* aCoord = aGaussMesh->GetNodeCoord(anCellId);
cout<<aCoord[0]<<"; "<<aCoord[1]<<"; "<<aCoord[2]<<endl;
}
#endif
#include <vtkObjectFactory.h>
//---------------------------------------------------------------
-vtkCxxRevisionMacro(VISU_AppendFilter, "$Revision$");
vtkStandardNewMacro(VISU_AppendFilter);
*/
static VISU_AppendFilter *New();
- /*! \fn vtkTypeRevisionMacro(VISU_AppendFilter, vtkAppendFilter)
+ /*! \fn vtkTypeMacro(VISU_AppendFilter, vtkAppendFilter)
* \brief VTK type revision macros.
*/
- vtkTypeRevisionMacro(VISU_AppendFilter, vtkAppendFilter);
+ vtkTypeMacro(VISU_AppendFilter, vtkAppendFilter);
protected:
/*! \fn VISU_AppendFilter();
#include <vtkObjectFactory.h>
//---------------------------------------------------------------
-vtkCxxRevisionMacro(VISU_AppendPolyData, "$Revision$");
vtkStandardNewMacro(VISU_AppendPolyData);
*/
static VISU_AppendPolyData *New();
- /*! \fn vtkTypeRevisionMacro(VTKViewer_AppendFilter, vtkAppendFilter)
+ /*! \fn vtkTypeMacro(VTKViewer_AppendFilter, vtkAppendFilter)
* \brief VTK type revision macros.
*/
- vtkTypeRevisionMacro(VISU_AppendPolyData, vtkAppendPolyData);
+ vtkTypeMacro(VISU_AppendPolyData, vtkAppendPolyData);
protected:
/*! \fn VTKViewer_AppendFilter();
#include <vtkIdList.h>
#include <vtkFloatArray.h>
#include <vtkCell.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
// STL
#include <algorithm>
VISU_CommonCellsFilter
::SetProfileUG(vtkUnstructuredGrid *input)
{
- this->SetInput(input);
+ this->SetInputData(0, input);
}
vtkUnstructuredGrid*
VISU_CommonCellsFilter
::GetProfileUG()
{
- return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput());
+ return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(0));
}
void
VISU_CommonCellsFilter
::SetCellsUG(vtkUnstructuredGrid *input)
{
- this->vtkProcessObject::SetNthInput(1, input);
+ this->SetInputData(1, input);
}
vtkUnstructuredGrid*
VISU_CommonCellsFilter
::GetCellsUG()
{
- if (this->NumberOfInputs < 2)
- {
- return NULL;
- }
- return dynamic_cast<vtkUnstructuredGrid*>(this->Inputs[1]);
+ return dynamic_cast<vtkUnstructuredGrid*>(this->GetInput(1));
}
-void
+int
VISU_CommonCellsFilter
-::Execute()
+::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
{
VISU::TTimerLog aTimerLog(MYDEBUG,"VISU_CommonCellsFilter::Execute");
- vtkUnstructuredGrid* anInputProfileUG = this->GetProfileUG();
- vtkUnstructuredGrid* anInputCellsUG = this->GetCellsUG();
- vtkUnstructuredGrid* anOutput = this->GetOutput();
+ // get the info objects
+ vtkInformation *inInfo1 = inputVector[0]->GetInformationObject(0);
+ vtkInformation *inInfo2 = inputVector[1]->GetInformationObject(0); // OUV_PORTING: to check
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkUnstructuredGrid *anInputProfileUG = vtkUnstructuredGrid::SafeDownCast(
+ inInfo1->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *anInputCellsUG = vtkUnstructuredGrid::SafeDownCast(
+ inInfo2->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
+ // OUV_PORTING: to delete
+ //vtkUnstructuredGrid* anInputProfileUG = this->GetProfileUG();
+ //vtkUnstructuredGrid* anInputCellsUG = this->GetCellsUG();
+
+ //vtkUnstructuredGrid* anOutput = this->GetOutput();
if(anInputCellsUG == NULL){
anOutput->ShallowCopy(anInputProfileUG);
else
anOutput->ShallowCopy(anInputProfileUG);
}
+ return 1;
}
#ifndef VISU_CommonCellsFilter_HeaderFile
#define VISU_CommonCellsFilter_HeaderFile
-#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
-class VISU_CommonCellsFilter: public vtkUnstructuredGridToUnstructuredGridFilter
+class VISU_CommonCellsFilter: public vtkUnstructuredGridAlgorithm
{
public:
static VISU_CommonCellsFilter *New();
- vtkTypeMacro(VISU_CommonCellsFilter,vtkUnstructuredGridToUnstructuredGridFilter);
+ vtkTypeMacro(VISU_CommonCellsFilter,vtkUnstructuredGridAlgorithm);
// Description:
// Specify the Unstructured Grid which overview
VISU_CommonCellsFilter();
~VISU_CommonCellsFilter();
- void Execute(); //generate output data
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); //generate output data
private:
VISU_CommonCellsFilter(const VISU_CommonCellsFilter&); // Lock copy
vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New();
//aWriter->SetFileType(VTK_BINARY);
aWriter->SetFileName(theFileName.c_str());
- aWriter->SetInput(theDataSet);
+ aWriter->SetInputData(theDataSet);
aWriter->Write();
aWriter->Delete();
}
vtkPolyDataWriter* aWriter = vtkPolyDataWriter::New();
//aWriter->SetFileType(VTK_BINARY);
aWriter->SetFileName(theFileName.c_str());
- aWriter->SetInput(theDataSet);
+ aWriter->SetInputData(theDataSet);
aWriter->Write();
aWriter->Delete();
}
bool
IsDataOnPoints(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING (see the same below)
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
}
bool
IsDataOnCells(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
return aDataSetAttributes->GetArray("VISU_FIELD") != NULL;
}
bool
IsElnoData(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update();
if ( vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData() )
if ( aDataSetAttributes->GetArray( "ELNO_FIELD" ) != NULL )
vtkIdType
GetElemVTKID(vtkDataSet *theDataSet, vtkIdType theID, int theEntity)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
if(theEntity < 0){
vtkIdType
GetElemObjID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER"))
return GetObjectID(aDataArray, theID);
vtkIdType
GetNodeVTKID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER"))
return GetVTKID(aDataArray, theID, VISU::NODE_ENTITY);
vtkIdType
GetNodeObjID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER"))
return GetObjectID(aDataArray, theID);
//---------------------------------------------------------------
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkDataSet *theDataSet, vtkIdType theObjID)
{
vtkIdType aVTKID = GetNodeVTKID(theDataSet, theObjID);
TGaussPointID
GetObjID(vtkDataSet *theDataSet, vtkIdType theID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_CELLS_MAPPER")){
if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
TInputCellID
GetInputCellID(vtkDataSet *theDataSet, vtkIdType theObjID)
{
- theDataSet->Update();
+ //theDataSet->Update();
vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetCellData();
if(vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_INPUTS_MAPPER")){
if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
//---------------------------------------------------------------
VISU_CONVERTOR_EXPORT
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkDataSet *theDataSet, vtkIdType theObjID);
//---------------------------------------------------------------
#include <memory>
-static vtkFloatingPointType ERR_SIZE_CALC = 1.00;
+static double ERR_SIZE_CALC = 1.00;
static int MYVTKDEBUG = 0;
if(theProfile->myIsAll){
vtkUnstructuredGrid* aDataSet = theMeshOnEntity->GetUnstructuredGridOutput();
- anAppendFilter->AddInput(aDataSet);
+ anAppendFilter->AddInputData(aDataSet);
}else{
const VISU::TGeom2SubProfile& aGeom2SubProfile = theProfile->myGeom2SubProfile;
checkEntity);
const VISU::PUnstructuredGrid& aSource = aSubProfile->GetSource();
- anAppendFilter->AddInput(aSource.GetPointer());
+ anAppendFilter->AddInputData(aSource.GetPointer());
vtkIdType aNbCells = aSource->GetNumberOfCells();
for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){
const VISU::PPolyData& aSource = aGaussSubMesh->GetSource();
aStartID += aSource->GetNumberOfCells();
- anAppendFilter->AddInput(aSource.GetPointer());
+ anAppendFilter->AddInputData(aSource.GetPointer());
}
anAppendFilter->Update(); // Fix on VTK
- theMeshOnEntity->GetOutput()->Update();
+ //theMeshOnEntity->GetOutput()->Update(); // OUV_PORTING
vtkDataSet* aSource = anAppendFilter->GetOutput();
INITMSGA(MYDEBUG,0,"aNbPoints - "<<aSource->GetNumberOfPoints()<<endl);
void
PrintMemorySize(vtkUnstructuredGrid* theDataSet)
{
- theDataSet->Update();
- BEGMSG(1,"GetPoints() = "<<vtkFloatingPointType(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCells() = "<<vtkFloatingPointType(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCellTypesArray() = "<<vtkFloatingPointType(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCellLocationsArray() = "<<vtkFloatingPointType(theDataSet->GetCellLocationsArray()->GetActualMemorySize()*1000)<<endl);
+ //theDataSet->Update(); // OUV_PORTING
+ BEGMSG(1,"GetPoints() = "<<double(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCells() = "<<double(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellTypesArray() = "<<double(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellLocationsArray() = "<<double(theDataSet->GetCellLocationsArray()->GetActualMemorySize()*1000)<<endl);
theDataSet->BuildLinks();
- BEGMSG(1,"GetCellLinks() = "<<vtkFloatingPointType(theDataSet->GetCellLinks()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetPointData() = "<<vtkFloatingPointType(theDataSet->GetPointData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCellData() = "<<vtkFloatingPointType(theDataSet->GetCellData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetActualMemorySize() = "<<vtkFloatingPointType(theDataSet->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellLinks() = "<<double(theDataSet->GetCellLinks()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetPointData() = "<<double(theDataSet->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellData() = "<<double(theDataSet->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetActualMemorySize() = "<<double(theDataSet->GetActualMemorySize()*1000)<<endl);
}
}
const VISU::PUnstructuredGrid& aSource = aSubMesh->GetSource();
GetCellsOnSubMesh(aSource, aMeshOnEntity, aSubMesh, aVGeom);
- anAppendFilter->AddInput(aSource.GetPointer());
+ anAppendFilter->AddInputData(aSource.GetPointer());
vtkIdType aNbCells = aSource->GetNumberOfCells();
for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){
VISU::PIDMapper anIDMapper = GetFamilyOnEntity(theMeshName,anEntity,aFamilyName);
vtkDataSet* anOutput = anIDMapper->GetOutput();
- anAppendFilter->AddInput(anOutput);
+ anAppendFilter->AddInputData(anOutput);
vtkIdType aStartID = anElemObj2VTKID.size();
vtkIdType aNbCells = anOutput->GetNumberOfCells();
}
if(MYVTKDEBUG){
GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
if(theEntity == VISU::NODE_ENTITY)
- BEGMSG(MYVTKDEBUG,"GetPointData() = "<<vtkFloatingPointType(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
- BEGMSG(MYVTKDEBUG,"GetCellData() = "<<vtkFloatingPointType(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<vtkFloatingPointType(anOutput->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetCellData() = "<<double(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<double(anOutput->GetActualMemorySize()*1000)<<endl);
}
}
#ifndef _DEXCEPT_
}
if(MYVTKDEBUG){
GetTimeStampSize(theMeshName, theEntity, theFieldName, theStampsNum);
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
if(theEntity == VISU::NODE_ENTITY)
- BEGMSG(MYVTKDEBUG,"GetPointData() = "<<vtkFloatingPointType(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetPointData() = "<<double(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
- BEGMSG(MYVTKDEBUG,"GetCellData() = "<<vtkFloatingPointType(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<vtkFloatingPointType(anOutput->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetCellData() = "<<double(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<double(anOutput->GetActualMemorySize()*1000)<<endl);
}
}
#ifndef _DEXCEPT_
aResult += GetMeshOnEntitySize(aMeshName,anEntity);
}
}
- MSG(MYDEBUG,"GetSize - aResult = "<<vtkFloatingPointType(aResult));
+ MSG(MYDEBUG,"GetSize - aResult = "<<double(aResult));
return aResult;
}
size_t aConnectivitySize = aCellsSize*sizeof(vtkIdType);
size_t aTypesSize = aNbCells*sizeof(char);
size_t aLocationsSize = aNbCells*sizeof(int);
- vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+ double aNbCellsPerPoint = aCellsSize / aNbCells - 1;
size_t aLinksSize = aMesh->GetNbPoints() *
(vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link));
aLinksSize = 0;
size_t aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize;
MSG(MYDEBUG,"GetMeshOnEntitySize "<<
- "- aResult = "<<vtkFloatingPointType(aResult)<<
+ "- aResult = "<<double(aResult)<<
"; theMeshName = '"<<theMeshName<<"'"<<
"; theEntity = "<<theEntity);
if(MYDEBUG){
- INITMSG(MYVTKDEBUG,"- aPointsSize = "<<vtkFloatingPointType(aPointsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<vtkFloatingPointType(aConnectivitySize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<vtkFloatingPointType(aTypesSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<vtkFloatingPointType(aLocationsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<vtkFloatingPointType(aLinksSize)<<"\n");
+ INITMSG(MYVTKDEBUG,"- aPointsSize = "<<double(aPointsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<double(aConnectivitySize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<double(aTypesSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<double(aLocationsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<double(aLinksSize)<<"\n");
}
aResult = size_t(aResult*ERR_SIZE_CALC);
size_t aConnectivitySize = aCellsSize*sizeof(vtkIdType);
size_t aTypesSize = aNbCells*sizeof(char);
size_t aLocationsSize = aNbCells*sizeof(int);
- vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+ double aNbCellsPerPoint = aCellsSize / aNbCells - 1;
size_t aLinksSize = aMesh->GetNbPoints() *
(vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link));
aLinksSize = 0;
size_t aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize;
MSG(MYDEBUG,"GetFamilyOnEntitySize "<<
- "- aResult = "<<vtkFloatingPointType(aResult)<<
+ "- aResult = "<<double(aResult)<<
"; theMeshName = '"<<theMeshName<<"'"<<
"; theEntity = "<<theEntity<<
"; theFamilyName = '"<<theFamilyName<<"'");
if(MYDEBUG){
- INITMSG(MYVTKDEBUG,"- aPointsSize = "<<vtkFloatingPointType(aPointsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<vtkFloatingPointType(aConnectivitySize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<vtkFloatingPointType(aTypesSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<vtkFloatingPointType(aLocationsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<vtkFloatingPointType(aLinksSize)<<"\n");
+ INITMSG(MYVTKDEBUG,"- aPointsSize = "<<double(aPointsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<double(aConnectivitySize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<double(aTypesSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<double(aLocationsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<double(aLinksSize)<<"\n");
}
aResult = size_t(aResult*ERR_SIZE_CALC);
size_t aCellsSize = aNbASizeCells.second;
size_t aConnectivityAndTypesSize = aCellsSize*sizeof(vtkIdType);
size_t aLocationsSize = aNbCells*sizeof(int);
- vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+ double aNbCellsPerPoint = aCellsSize / aNbCells - 1;
size_t aLinksSize = aMesh->GetNbPoints() *
(vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(short));
aLinksSize = 0;
size_t aResult = aPointsSize + aConnectivityAndTypesSize + aLocationsSize + aLinksSize;
if(MYDEBUG){
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<<vtkFloatingPointType(aPointsSize));
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aConnectivityAndTypesSize = "<<vtkFloatingPointType(aConnectivityAndTypesSize));
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLocationsSize = "<<vtkFloatingPointType(aLocationsSize));
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLinksSize = "<<vtkFloatingPointType(aLinksSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<<double(aPointsSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aConnectivityAndTypesSize = "<<double(aConnectivityAndTypesSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLocationsSize = "<<double(aLocationsSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLinksSize = "<<double(aLinksSize));
}
- MSG(MYDEBUG,"GetMeshOnGroupSize - aResult = "<<vtkFloatingPointType(aResult)<<"; theMeshName = '"
+ MSG(MYDEBUG,"GetMeshOnGroupSize - aResult = "<<double(aResult)<<"; theMeshName = '"
<<theMeshName<<"'; theGroupName = '"<<theGroupName<<"'");
aResult = size_t(aResult*ERR_SIZE_CALC);
VISU::PFieldImpl aField = boost::get<3>(aFindField);
size_t aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity);
- size_t aFieldOnMeshSize = size_t(aField->myDataSize*sizeof(vtkFloatingPointType)*aField->myValField.size()*ERR_SIZE_CALC);
+ size_t aFieldOnMeshSize = size_t(aField->myDataSize*sizeof(double)*aField->myValField.size()*ERR_SIZE_CALC);
size_t aResult = aMeshSize + aFieldOnMeshSize;
if(MYDEBUG)
- MSG(MYVTKDEBUG,"GetFieldOnMeshSize - aFieldOnMeshSize = "<<vtkFloatingPointType(aFieldOnMeshSize));
- MSG(MYDEBUG,"GetFieldOnMeshSize - aResult = "<<vtkFloatingPointType(aResult)<<"; theMeshName = '"<<theMeshName<<
+ MSG(MYVTKDEBUG,"GetFieldOnMeshSize - aFieldOnMeshSize = "<<double(aFieldOnMeshSize));
+ MSG(MYDEBUG,"GetFieldOnMeshSize - aResult = "<<double(aResult)<<"; theMeshName = '"<<theMeshName<<
"'; theEntity = "<<theEntity<<"; theFieldName = '"<<theFieldName<<"'");
return aResult;
VISU::PFieldImpl aField = boost::get<3>(aFindTimeStamp);
size_t aMeshSize = GetMeshOnEntitySize(theMeshName, aVTKMeshOnEntity->myEntity);
- size_t aTimeStampSize = size_t(aField->myDataSize*sizeof(vtkFloatingPointType) * ERR_SIZE_CALC);
+ size_t aTimeStampSize = size_t(aField->myDataSize*sizeof(double) * ERR_SIZE_CALC);
size_t aResult = aMeshSize + aTimeStampSize;
- MSG(MYDEBUG && MYVTKDEBUG,"GetTimeStampSize - aTimeStampSize = "<<vtkFloatingPointType(aTimeStampSize));
- MSG(MYDEBUG,"GetTimeStampSize - aResult = "<<vtkFloatingPointType(aResult)<<
+ MSG(MYDEBUG && MYVTKDEBUG,"GetTimeStampSize - aTimeStampSize = "<<double(aTimeStampSize));
+ MSG(MYDEBUG,"GetTimeStampSize - aResult = "<<double(aResult)<<
"; theMeshName = '"<<theMeshName<<"'; theEntity = "<<theEntity<<
"; theFieldName = '"<<theFieldName<<"'; theStampsNum = "<<theStampsNum);
#ifndef VISU_ExtractUnstructuredGrid_HeaderFile
#define VISU_ExtractUnstructuredGrid_HeaderFile
-#include <vtkUnstructuredGridToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
#include <set>
-class VISU_ExtractUnstructuredGrid : public vtkUnstructuredGridToUnstructuredGridFilter{
+class VISU_ExtractUnstructuredGrid : public vtkUnstructuredGridAlgorithm{
public:
- vtkTypeMacro(VISU_ExtractUnstructuredGrid,vtkUnstructuredGridToUnstructuredGridFilter);
+ vtkTypeMacro(VISU_ExtractUnstructuredGrid,vtkUnstructuredGridAlgorithm);
// Description:
// Construct with all types of clipping turned off.
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetGeometry(vtkDataSet *input)
{
- this->Superclass::SetInput(input);
+ this->Superclass::SetInputData(input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetScalars(vtkDataSet *input)
{
- this->SetInput(1, input);
+ this->SetInputData(1, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetVectors(vtkDataSet *input)
{
- this->SetInput(2, input);
+ this->SetInputData(2, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetNormals(vtkDataSet *input)
{
- this->SetInput(3, input);
+ this->SetInputData(3, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetTCoords(vtkDataSet *input)
{
- this->SetInput(4, input);
+ this->SetInputData(4, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_GaussMergeFilter::SetTensors(vtkDataSet *input)
{
- this->SetInput(5, input);
+ this->SetInputData(5, input);
}
//------------------------------------------------------------------------------
anOutputPointData->CopyAllocate(anInputPointData,aNbTuples);
vtkIdList *aCellIds = vtkIdList::New();
- vtkFloatingPointType aCoords[3];
+ double aCoords[3];
for(int aTupleId=0, aNewTupleId=0; aTupleId<anIntersection.size(); aTupleId++){
VISU::TObjectId& anObjectId = anIntersection[aTupleId];
VISU::TCellIdArray aCellIdArray = aDataCellId2TupleGaussIdMap[anObjectId.first];
//---------------------------------------------------------------
- vtkFloatingPointType*
+ double*
TIDMapper
::GetNodeCoord(vtkIdType theObjID)
{
#include "MED_Vector.hxx"
#include "VTKViewer.h"
+#include <vtkType.h>
+
#include <string>
#include <map>
//! Get coordinates of node for corresponding object ID
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
//! Get cell object ID for corresponding VTK ID
const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iComp];
VISU::TMinMax& aMinMax = aComp2MinMax[iComp+1];
- vtkFloatingPointType& aMin = aMinMax.first;
- vtkFloatingPointType& aMax = aMinMax.second;
+ double& aMin = aMinMax.first;
+ double& aMax = aMinMax.second;
VISU::TMinMax& anAverageMinMax = aComp2AverageMinMax[iComp+1];
- vtkFloatingPointType& anAverageMin = anAverageMinMax.first;
- vtkFloatingPointType& anAverageMax = anAverageMinMax.second;
- vtkFloatingPointType anAverageValue = aBaseAverageValues[aGaussMetric];
+ double& anAverageMin = anAverageMinMax.first;
+ double& anAverageMax = anAverageMinMax.second;
+ double anAverageValue = aBaseAverageValues[aGaussMetric];
VISU::TGroup2MinMax& aGroup2MinMax = aComp2Group2MinMax[iComp+1];
VISU::TGroup2MinMax& aGroup2AverageMinMax = aComp2Group2AverageMinMax[iComp+1];
- std::map<VISU::TName,vtkFloatingPointType> aGroup2AverageValue;
+ std::map<VISU::TName,double> aGroup2AverageValue;
// get names of groups, to which the element belongs
VISU::TNames aGroupNames;
}
for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
- const vtkFloatingPointType& aVal = aMValueSlice[iGauss];
+ const double& aVal = aMValueSlice[iGauss];
aMin = isnan(aVal) ? aVal : std::min(aMin,aVal);
aMax = isnan(aVal) ? aVal : std::max(aMax,aVal);
if(isAverageByGaussPoints){
VISU::TName aGroupName = *aGroupIter;
bool isGroupFound = aGroup2MinMax.find(aGroupName) != aGroup2MinMax.end();
VISU::TMinMax& aGroupMinMax = aGroup2MinMax[aGroupName];
- vtkFloatingPointType& aGroupMin = aGroupMinMax.first;
- vtkFloatingPointType& aGroupMax = aGroupMinMax.second;
+ double& aGroupMin = aGroupMinMax.first;
+ double& aGroupMax = aGroupMinMax.second;
aGroupMin = isGroupFound ? std::min(aGroupMin,aVal) : aVal;
aGroupMax = isGroupFound ? std::max(aGroupMax,aVal) : aVal;
}
else {
VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
- vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
- vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+ double& aGroupAverageMin = aGroupAverageMinMax.first;
+ double& aGroupAverageMax = aGroupAverageMinMax.second;
aGroupAverageMin = aGroupMin;
aGroupAverageMax = aGroupMax;
}
VISU::TNames::const_iterator aGroupIter = aGroupNames.begin();
for(; aGroupIter != aGroupNames.end(); aGroupIter++){
VISU::TName aGroupName = *aGroupIter;
- vtkFloatingPointType aGroupAverageValue = aGroup2AverageValue[aGroupName];
+ double aGroupAverageValue = aGroup2AverageValue[aGroupName];
if(aGaussMetric == VISU::AVERAGE_METRIC)
aGroupAverageValue /= aNbGauss;
bool isGroupFound = aGroup2AverageMinMax.find(aGroupName) != aGroup2AverageMinMax.end();
VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
- vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
- vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+ double& aGroupAverageMin = aGroupAverageMinMax.first;
+ double& aGroupAverageMax = aGroupAverageMinMax.second;
aGroupAverageMin = isGroupFound ? std::min(aGroupAverageMin,aGroupAverageValue) : aGroupAverageValue;
aGroupAverageMax = isGroupFound ? std::max(aGroupAverageMax,aGroupAverageValue) : aGroupAverageValue;
}
VISU::TComp2Group2MinMax& aComp2Group2AverageMinMax = theMetric2Comp2Group2AverageMinMax[aGaussMetric];
VISU::TMinMax& aMinMax = aComp2MinMax[0];
- vtkFloatingPointType& aMin = aMinMax.first;
- vtkFloatingPointType& aMax = aMinMax.second;
+ double& aMin = aMinMax.first;
+ double& aMax = aMinMax.second;
VISU::TMinMax& anAverageMinMax = aComp2AverageMinMax[0];
- vtkFloatingPointType& anAverageMin = anAverageMinMax.first;
- vtkFloatingPointType& anAverageMax = anAverageMinMax.second;
+ double& anAverageMin = anAverageMinMax.first;
+ double& anAverageMax = anAverageMinMax.second;
VISU::TGroup2MinMax& aGroup2MinMax = aComp2Group2MinMax[0];
VISU::TGroup2MinMax& aGroup2AverageMinMax = aComp2Group2AverageMinMax[0];
for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[iGauss];
- vtkFloatingPointType aValue = 0.0;
+ double aValue = 0.0;
for(TInt iComp = 0; iComp < theNbComp2; iComp++){
- vtkFloatingPointType aVal = aMValueSlice[iComp];
+ double aVal = aMValueSlice[iComp];
aValue += aVal*aVal;
}
aValue = sqrt(aValue);
VISU::TName aGroupName = *aGroupIter;
bool isGroupFound = aGroup2MinMax.find(aGroupName) != aGroup2MinMax.end();
VISU::TMinMax& aGroupMinMax = aGroup2MinMax[aGroupName];
- vtkFloatingPointType& aGroupMin = aGroupMinMax.first;
- vtkFloatingPointType& aGroupMax = aGroupMinMax.second;
+ double& aGroupMin = aGroupMinMax.first;
+ double& aGroupMax = aGroupMinMax.second;
aGroupMin = isGroupFound ? std::min(aGroupMin,aValue) : aValue;
aGroupMax = isGroupFound ? std::max(aGroupMax,aValue) : aValue;
}
}
if(isAverageByGaussPoints){
typename TimeStampValueType::TTMeshValue::TCValueSliceArr aMCompValueSliceArr = aMMeshValue.GetCompValueSliceArr(iElem);
- vtkFloatingPointType aValue = 0.0;
+ double aValue = 0.0;
for(TInt iComp = 0; iComp < theNbComp2; iComp++){
const typename TimeStampValueType::TTMeshValue::TCValueSlice& aMCompValueSlice = aMCompValueSliceArr[iComp];
- vtkFloatingPointType anAverageValue = aBaseAverageValues[aGaussMetric];
+ double anAverageValue = aBaseAverageValues[aGaussMetric];
for(TInt iGauss = 0; iGauss < aNbGauss; iGauss++){
- const vtkFloatingPointType& aVal = aMCompValueSlice[iGauss];
+ const double& aVal = aMCompValueSlice[iGauss];
switch(aGaussMetric) {
case VISU::AVERAGE_METRIC: anAverageValue += aVal; break;
case VISU::MINIMUM_METRIC: anAverageValue = std::min(anAverageValue, aVal); break;
VISU::TName aGroupName = *aGroupIter;
bool isGroupFound = aGroup2AverageMinMax.find(aGroupName) != aGroup2AverageMinMax.end();
VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
- vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
- vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+ double& aGroupAverageMin = aGroupAverageMinMax.first;
+ double& aGroupAverageMax = aGroupAverageMinMax.second;
aGroupAverageMin = isGroupFound ? std::min(aGroupAverageMin,aValue) : aValue;
aGroupAverageMax = isGroupFound ? std::max(aGroupAverageMax,aValue) : aValue;
}
for(; aGroupIter != aGroupNames.end(); aGroupIter++){
VISU::TName aGroupName = *aGroupIter;
VISU::TMinMax& aGroupAverageMinMax = aGroup2AverageMinMax[aGroupName];
- vtkFloatingPointType& aGroupAverageMin = aGroupAverageMinMax.first;
- vtkFloatingPointType& aGroupAverageMax = aGroupAverageMinMax.second;
+ double& aGroupAverageMin = aGroupAverageMinMax.first;
+ double& aGroupAverageMax = aGroupAverageMinMax.second;
aGroupAverageMin = aGroup2MinMax[aGroupName].first;
aGroupAverageMax = aGroup2MinMax[aGroupName].second;
}
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetGeometry(vtkDataSet *input)
{
- this->Superclass::SetInput(input);
+ this->Superclass::SetInputData(input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetScalars(vtkDataSet *input)
{
- this->SetInput(1, input);
+ this->SetInputData(1, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetVectors(vtkDataSet *input)
{
- this->SetInput(2, input);
+ this->SetInputData(2, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetNormals(vtkDataSet *input)
{
- this->SetInput(3, input);
+ this->SetInputData(3, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetTCoords(vtkDataSet *input)
{
- this->SetInput(4, input);
+ this->SetInputData(4, input);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void VISU_MergeFilter::SetTensors(vtkDataSet *input)
{
- this->SetInput(5, input);
+ this->SetInputData(5, input);
}
//------------------------------------------------------------------------------
#include <vtkIdList.h>
#include <vtkCell.h>
+#include <vtkVersion.h>
#include <algorithm>
#include <vector>
if(anIter != aGeomObjectId2TupleIdMap.end()){
// If the point exists in the geometry put it to output
int aGeometryPointId = anIter->second;
- vtkFloatingPointType aCoords[3];
+ double aCoords[3];
anGeometryPoints->GetPoint(aGeometryPointId, aCoords);
anOutputPoints->SetPoint(aPointId, aCoords);
}else{
// If no, the point from data should be used
- vtkFloatingPointType aCoords[3];
+ double aCoords[3];
aDataPoints->GetPoint(aPointId, aCoords);
anOutputPoints->SetPoint(aPointId, aCoords);
}
for(vtkIdType aPointId = 0; aPointId < aNbPoints; aPointId++){
TCCoordSlice aSlice = GetCoordSlice(aPointId);
- vtkFloatingPointType aCoords[3] = {0.0, 0.0, 0.0};
+ double aCoords[3] = {0.0, 0.0, 0.0};
for(vtkIdType aDimId = 0; aDimId < aDim; aDimId++)
aCoords[aDimId] = aSlice[aDimId];
//---------------------------------------------------------------
typedef std::map<vtkIdType, PValForTime> TValField;
- typedef std::pair<vtkFloatingPointType, vtkFloatingPointType> TMinMax;
+ typedef std::pair<double, double> TMinMax;
//! Define a basic class for MED FIELD entity
struct VISU_CONVERTOR_EXPORT TField: virtual TIntId
size_t aPointsSize = 3*theNbOfPoints*sizeof(VISU::TCoord);
size_t aConnectivityAndTypesSize = theCellsSize*sizeof(vtkIdType);
size_t aLocationsSize = theNbOfCells*sizeof(int);
- vtkFloatingPointType aNbCellsPerPoint = theCellsSize / theNbOfCells - 1;
+ double aNbCellsPerPoint = theCellsSize / theNbOfCells - 1;
size_t aLinksSize = theNbOfPoints * (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(short));
if(!theComputeLinks)
aLinksSize = 0;
::GetMemorySize()
{
if(vtkDataSet* anOutput = GetPolyDataOutput()){
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
if(myIsDone){
::GetMemorySize()
{
if(vtkDataSet* anOutput = GetUnstructuredGridOutput()){
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
if(myIsDone){
{
if(myIsVTKDone){
if(vtkDataSet* anOutput = GetOutput()){
- anOutput->Update();
+ //anOutput->Update(); // OUV_PORTING
return anOutput->GetActualMemorySize() * 1024;
}
}
return myNamedPointCoords->GetVTKID(theID);
}
- vtkFloatingPointType*
+ double*
TProfileImpl
::GetNodeCoord(vtkIdType theObjID)
{
return myIDMapper->GetNodeVTKID(theID);
}
- vtkFloatingPointType*
+ double*
TUnstructuredGridIDMapperImpl
::GetNodeCoord(vtkIdType theObjID)
{
return myIDMapper->GetNodeVTKID(theID);
}
- vtkFloatingPointType*
+ double*
TPolyDataIDMapperImpl
::GetNodeCoord(vtkIdType theObjID)
{
//! Reimplement the TIDMapper::GetNodeCoord
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
//! Reimplement the TIDMapper::GetElemObjID
//! Reimplement the TIDMapper::GetNodeCoord
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
//! Reimplement the TIDMapper::GetElemObjID
//! Reimplement the TIDMapper::GetNodeCoord
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
//! Reimplement the TIDMapper::GetElemObjID
aScalars->Delete();
vtkStructuredGridGeometryFilter* aFilter = vtkStructuredGridGeometryFilter::New();
- aFilter->SetInput( aStructuredGrid );
+ aFilter->SetInputData( aStructuredGrid );
aFilter->Update();
myOutput->ShallowCopy( aFilter->GetOutput() );
aFilter->Delete();
#include <vtkCellData.h>
#include <vtkCell.h>
#include <vtkIdList.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
#include <map>
{
}
-void VISU_UsedPointsFilter::Execute(){
- vtkDataSet *anInput = this->GetInput();
- vtkUnstructuredGrid *anOutput = this->GetOutput();
+
+int VISU_UsedPointsFilter::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+{
+ // get the info objects
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkDataSet *anInput = vtkDataSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkUnstructuredGrid *anOutput = vtkUnstructuredGrid::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
typedef std::map<vtkIdType, vtkIdType> TId2IdMap;
TId2IdMap aId2IdMap;
anOldPointsIds->Delete();
aNewPointsIds->Delete();
anOutput->Squeeze();
+ return 1;
}
#ifndef VISU_UsedPointsFilter_HeaderFile
#define VISU_UsedPointsFilter_HeaderFile
-#include <vtkDataSetToUnstructuredGridFilter.h>
+#include <vtkUnstructuredGridAlgorithm.h>
#include "VISUConvertor.hxx"
-class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
+//class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkDataSetToUnstructuredGridFilter
+class VISU_CONVERTOR_EXPORT VISU_UsedPointsFilter : public vtkUnstructuredGridAlgorithm // OUV_PORTING: to check
{
public:
- vtkTypeMacro(VISU_UsedPointsFilter,vtkDataSetToUnstructuredGridFilter);
+ vtkTypeMacro(VISU_UsedPointsFilter,vtkUnstructuredGridAlgorithm);
static VISU_UsedPointsFilter *New();
protected:
VISU_UsedPointsFilter();
~VISU_UsedPointsFilter();
- virtual void Execute();
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
};
#endif
MED::TStringVector aCoordNamesNodes;
MED::TStringVector aCoordUnitsNodes;
- vtkFloatingPointType aPntCoord[3];
+ double aPntCoord[3];
if(aPointsMapper){
int nbComp = aPointsMapper->GetNumberOfComponents();
int *aPointsMapperPtr = aPointsMapper->GetPointer(0);
myShrinkFilter->SetStoreMapping(true);
myAnnotationMapper->Delete();
- myAnnotationActor->SetMapper(myAnnotationMapper.GetPointer());
+ myAnnotationActor->vtkActor2D::SetMapper(myAnnotationMapper.GetPointer()); // OUV_PORTING: to check
myAnnotationActor->Delete();
myAnnotationActor->SetVisibility(0);
myValLblDataSet = vtkUnstructuredGrid::New();
myValCellCenters = VTKViewer_CellCenters::New();
- myValCellCenters->SetInput(myValLblDataSet);
+ myValCellCenters->SetInputData(myValLblDataSet);
myValUsedPoints = VISU_UsedPointsFilter::New();
- myValUsedPoints->SetInput(myValLblDataSet);
+ myValUsedPoints->SetInputData(myValLblDataSet);
myValMaskPoints = vtkMaskPoints::New();
- myValMaskPoints->SetInput(myValCellCenters->GetOutput());
+ myValMaskPoints->SetInputConnection(myValCellCenters->GetOutputPort());
myValMaskPoints->SetOnRatio(1);
myValSelectVisiblePoints = VISU_SelectVisiblePoints::New();
- myValSelectVisiblePoints->SetInput(myValMaskPoints->GetOutput());
+ myValSelectVisiblePoints->SetInputConnection(myValMaskPoints->GetOutputPort());
myValSelectVisiblePoints->SelectInvisibleOff();
myValSelectVisiblePoints->SetTolerance(0.1);
}
myValLabeledDataMapper = vtkLabeledDataMapper::New();
- myValLabeledDataMapper->SetInput(myValSelectVisiblePoints->GetOutput());
+ myValLabeledDataMapper->SetInputConnection(myValSelectVisiblePoints->GetOutputPort());
//myValLabeledDataMapper->SetLabelFormat("%g");
//myValLabeledDataMapper->SetLabelFormat("%.20g");
myValLabeledDataMapper->SetLabelFormat(aFormat);
{
if(!myIsShrinkable)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myShrinkFilter->SetInput(aDataSet);
- myPassFilter[1]->SetInput(myShrinkFilter->GetOutput());
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myShrinkFilter->SetInputConnection(aDataSet);
+ myPassFilter[1]->SetInputConnection(myShrinkFilter->GetOutputPort());
myIsShrunk = true;
}
}
{
if(!myIsShrunk)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myPassFilter[1]->SetInput(aDataSet);
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myPassFilter[1]->SetInputConnection(aDataSet);
myPassFilter[1]->Modified();
myIsShrunk = false;
Modified();
void
VISU_Actor
-::SetShrinkFactor(vtkFloatingPointType theValue)
+::SetShrinkFactor(double theValue)
{
myShrinkFilter->SetShrinkFactor(theValue);
Modified();
}
-vtkFloatingPointType
+double
VISU_Actor
::GetShrinkFactor()
{
if ( !myIsFeatureEdgesAllowed || myIsFeatureEdgesEnabled == theIsFeatureEdgesEnabled )
return;
- if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+ //if ( vtkPolyData* aPolyData = myPassFilter[ 2 ]->GetPolyDataOutput() )
+ if ( vtkAlgorithmOutput* aPolyData = myPassFilter[ 2 ]->GetOutputPort() ) // OUV_PORTING: to check
{
if( theIsFeatureEdgesEnabled )
{
- myFeatureEdges->SetInput( aPolyData );
- myPassFilter[ 3 ]->SetInput( myFeatureEdges->GetOutput() );
+ myFeatureEdges->SetInputConnection( aPolyData );
+ myPassFilter[ 3 ]->SetInputConnection( myFeatureEdges->GetOutputPort() );
myIsFeatureEdgesEnabled = true;
}
else
{
- myPassFilter[3]->SetInput( aPolyData );
+ myPassFilter[3]->SetInputConnection( aPolyData );
myPassFilter[3]->Modified();
myIsFeatureEdgesEnabled = false;
Modified();
}
}
-vtkFloatingPointType
+double
VISU_Actor
::GetFeatureEdgesAngle()
{
void
VISU_Actor
-::SetFeatureEdgesAngle(vtkFloatingPointType theValue)
+::SetFeatureEdgesAngle(double theValue)
{
myFeatureEdges->SetFeatureAngle(theValue);
Modified();
//----------------------------------------------------------------------------
void
VISU_Actor
-::SetOpacity(vtkFloatingPointType theValue)
+::SetOpacity(double theValue)
{
GetProperty()->SetOpacity(theValue);
}
-vtkFloatingPointType
+double
VISU_Actor
::GetOpacity()
{
void
VISU_Actor
-::SetLineWidth(vtkFloatingPointType theLineWidth)
+::SetLineWidth(double theLineWidth)
{
GetProperty()->SetLineWidth(theLineWidth);
}
-vtkFloatingPointType
+double
VISU_Actor
::GetLineWidth()
{
VISU_Actor
::GetMemorySize()
{
- static vtkFloatingPointType ERR_SIZE_CALC = 1.00;
+ static double ERR_SIZE_CALC = 1.00;
vtkDataSet* aDataSet = GetMapper()->GetInput();
unsigned long int aSize = size_t(aDataSet->GetActualMemorySize() * 1024 * ERR_SIZE_CALC);
return VISU::GetNodeVTKID(GetMapper()->GetInput(), theID);
}
-vtkFloatingPointType*
+double*
VISU_Actor
::GetNodeCoord(vtkIdType theObjID)
{
//----------------------------------------------------------------------------
inline
void
-ChangeZoom(vtkFloatingPointType theZoomFactor,
+ChangeZoom(double theZoomFactor,
vtkRenderer* theRenderer,
vtkIdType theInitialHasIndex,
vtkIdType theCurrentHasIndex)
// Zoom
if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
{
- vtkFloatingPointType aZoomFactor = aPickingSettings->GetZoomFactor();
+ double aZoomFactor = aPickingSettings->GetZoomFactor();
ChangeZoom(aZoomFactor,
GetRenderer(),
anInitialHasIndex,
if(vtkCell* aCell = GetElemCell(anObjId)){
vtkPoints* aPts = aCell->GetPoints();
if(int aNbPts = aCell->GetNumberOfPoints()){
- vtkFloatingPointType aCoord[3] = {0.0, 0.0, 0.0};
+ double aCoord[3] = {0.0, 0.0, 0.0};
for(int i = 0; i < aNbPts; i++){
- vtkFloatingPointType *aPntCoord = aPts->GetPoint(i);
+ double *aPntCoord = aPts->GetPoint(i);
aCoord[0] += aPntCoord[0];
aCoord[1] += aPntCoord[1];
aCoord[2] += aPntCoord[2];
}
// Display coordinates
- vtkFloatingPointType aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
+ double aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
aRenderer->SetWorldPoint(aWorldCoord);
aRenderer->WorldToDisplay();
- vtkFloatingPointType aSelectionPoint[3];
+ double aSelectionPoint[3];
aRenderer->GetDisplayPoint(aSelectionPoint);
myAnnotationActor->SetPosition(aSelectionPoint);
//
vtkIdType aVtkId = myPointPicker->GetPointId();
if(aVtkId >= 0 && mySelector->IsValid(this,aVtkId,true) && hasIO()){
vtkIdType anObjId = GetNodeObjId( aVtkId );
- if(vtkFloatingPointType* aCoord = GetNodeCoord(anObjId)){
+ if(double* aCoord = GetNodeCoord(anObjId)){
// Display coordinates
- vtkFloatingPointType aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
+ double aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
aRenderer->SetWorldPoint(aWorldCoord);
aRenderer->WorldToDisplay();
- vtkFloatingPointType aSelectionPoint[3];
+ double aSelectionPoint[3];
aRenderer->GetDisplayPoint(aSelectionPoint);
myAnnotationActor->SetPosition(aSelectionPoint);
//
{
std::ostringstream aStr;
if (vtkDataArray *aScalar = theData->GetScalars()){
- vtkFloatingPointType aVal = aScalar->GetTuple1(theId);
+ double aVal = aScalar->GetTuple1(theId);
aStr << "\nScalar: " << aVal;
}
return aStr.str();
{
std::ostringstream aStr;
if (vtkDataArray *aVector = theData->GetVectors()) {
- vtkFloatingPointType *aVal = aVector->GetTuple3(theId);
+ double *aVal = aVector->GetTuple3(theId);
aStr << "\nVector: " << "{" << aVal[0] << "; " << aVal[1] << "; " << aVal[2] << "}";
}
return aStr.str();
myIsSubElementsHighlighted = aCurrentHasIndex;
bool aFlyTo = false;
- vtkFloatingPointType aFlyToCoord[3] = { 0.0, 0.0, 0.0 };
+ double aFlyToCoord[3] = { 0.0, 0.0, 0.0 };
vtkRenderer *aRenderer = GetRenderer();
if( theIsHighlight )
if(vtkCell* aCell = GetElemCell(anObjId)){
vtkPoints* aPts = aCell->GetPoints();
if(int aNbPts = aCell->GetNumberOfPoints()){
- vtkFloatingPointType aCoord[3] = {0.0, 0.0, 0.0};
+ double aCoord[3] = {0.0, 0.0, 0.0};
for(int i = 0; i < aNbPts; i++){
- vtkFloatingPointType *aPntCoord = aPts->GetPoint(i);
+ double *aPntCoord = aPts->GetPoint(i);
aCoord[0] += aPntCoord[0];
aCoord[1] += aPntCoord[1];
aCoord[2] += aPntCoord[2];
aFlyToCoord[1] = aCoord[1] / aNbPts;
aFlyToCoord[2] = aCoord[2] / aNbPts;
- vtkFloatingPointType aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
+ double aWorldCoord[4] = {aCoord[0]/aNbPts, aCoord[1]/aNbPts, aCoord[2]/aNbPts, 1.0};
aRenderer->SetWorldPoint(aWorldCoord);
aRenderer->WorldToDisplay();
- vtkFloatingPointType aSelectionPoint[3];
+ double aSelectionPoint[3];
aRenderer->GetDisplayPoint(aSelectionPoint);
myTextActor->SetPosition(aSelectionPoint);
myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
int anObjId = aMapIndex(1);
vtkPointData* aPntData = aDataSet->GetPointData();
- if(vtkFloatingPointType* aCoord = GetNodeCoord(anObjId)){
+ if(double* aCoord = GetNodeCoord(anObjId)){
aFlyTo = true;
aFlyToCoord[0] = aCoord[0];
aFlyToCoord[1] = aCoord[1];
aFlyToCoord[2] = aCoord[2];
- vtkFloatingPointType aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
+ double aWorldCoord[4] = {aCoord[0], aCoord[1], aCoord[2], 1.0};
aRenderer->SetWorldPoint(aWorldCoord);
aRenderer->WorldToDisplay();
- vtkFloatingPointType aSelectionPoint[3];
+ double aSelectionPoint[3];
aRenderer->GetDisplayPoint(aSelectionPoint);
myTextActor->SetPosition(aSelectionPoint);
myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
// Zoom
if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() )
{
- vtkFloatingPointType aZoomFactor = aPickingSettings->GetZoomFactor();
+ double aZoomFactor = aPickingSettings->GetZoomFactor();
ChangeZoom(aZoomFactor,
GetRenderer(),
anInitialHasIndex,
if( GetVisibility() && aPickingSettings->GetCameraMovementEnabled() && aFlyTo )
{
vtkRenderWindowInteractor* anInteractor = myInteractor;
- vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
+ double aDollyWas = anInteractor->GetDolly();
int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
double aPosition[3];
{
VISU_PickingSettings* aPickingSettings = VISU_PickingSettings::Get();
- vtkFloatingPointType aCoord[6];
+ double aCoord[6];
GetBounds(aCoord);
- vtkFloatingPointType aWorldCoord[4] = { ( aCoord[0] + aCoord[1] ) / 2,
+ double aWorldCoord[4] = { ( aCoord[0] + aCoord[1] ) / 2,
( aCoord[2] + aCoord[3] ) / 2,
( aCoord[4] + aCoord[5] ) / 2, 1.0};
vtkRenderer* aRenderer = GetRenderer();
aRenderer->SetWorldPoint(aWorldCoord);
aRenderer->WorldToDisplay();
- vtkFloatingPointType aSelectionPoint[3];
+ double aSelectionPoint[3];
aRenderer->GetDisplayPoint(aSelectionPoint);
myTextActor->SetPosition(aSelectionPoint);
myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
if ( isOnCell )
{
- myValCellCenters->SetInput( aDataSet );
- myValMaskPoints->SetInput( myValCellCenters->GetOutput() );
+ myValCellCenters->SetInputData( aDataSet );
+ myValMaskPoints->SetInputConnection( myValCellCenters->GetOutputPort() );
}
else if ( isOnPnt )
{
- myValUsedPoints->SetInput( aDataSet );
- myValMaskPoints->SetInput( myValUsedPoints->GetOutput() );
+ myValUsedPoints->SetInputData( aDataSet );
+ myValMaskPoints->SetInputConnection( myValUsedPoints->GetOutputPort() );
}
myValLabels->SetVisibility( GetVisibility() );
virtual
void
- SetShrinkFactor(vtkFloatingPointType theFactor = 0.8);
+ SetShrinkFactor(double theFactor = 0.8);
virtual
- vtkFloatingPointType
+ double
GetShrinkFactor();
//----------------------------------------------------------------------------
SetFeatureEdgesEnabled(bool theIsFeatureEdgesEnabled);
virtual
- vtkFloatingPointType
+ double
GetFeatureEdgesAngle();
virtual
void
- SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0);
+ SetFeatureEdgesAngle(double theAngle = 30.0);
virtual
void
//----------------------------------------------------------------------------
virtual
void
- SetOpacity(vtkFloatingPointType theValue);
+ SetOpacity(double theValue);
virtual
- vtkFloatingPointType
+ double
GetOpacity();
virtual
void
- SetLineWidth(vtkFloatingPointType theLineWidth);
+ SetLineWidth(double theLineWidth);
virtual
- vtkFloatingPointType
+ double
GetLineWidth();
//----------------------------------------------------------------------------
GetNodeVTKID(vtkIdType theID);
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
virtual
//----------------------------------------------------------------------------
protected:
- vtkFloatingPointType myPriority;
+ double myPriority;
bool myIsVTKMapping;
VISU::Prs3d_i* myPrs3d;
vtkSmartPointer<VISU_PipeLine> myPipeLine;
void
VISU_ActorBase
-::SetLineWidth(vtkFloatingPointType theLineWidth)
+::SetLineWidth(double theLineWidth)
{
GetProperty()->SetLineWidth(theLineWidth);
}
-vtkFloatingPointType
+double
VISU_ActorBase
::GetLineWidth()
{
{
if(!myIsShrinkable)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myShrinkFilter->SetInput(aDataSet);
- myPassFilter[1]->SetInput(myShrinkFilter->GetOutput());
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myShrinkFilter->SetInputConnection(aDataSet);
+ myPassFilter[1]->SetInputConnection(myShrinkFilter->GetOutputPort());
myIsShrunk = true;
}
}
{
if(!myIsShrunk)
return;
- if(vtkDataSet* aDataSet = myPassFilter[0]->GetOutput()){
- myPassFilter[1]->SetInput(aDataSet);
+ if(vtkAlgorithmOutput* aDataSet = myPassFilter[0]->GetOutputPort()){
+ myPassFilter[1]->SetInputConnection(aDataSet);
myPassFilter[1]->Modified();
myIsShrunk = false;
Modified();
void
VISU_ActorBase
-::SetShrinkFactor(vtkFloatingPointType theValue)
+::SetShrinkFactor(double theValue)
{
myShrinkFilter->SetShrinkFactor(theValue);
Modified();
}
-vtkFloatingPointType
+double
VISU_ActorBase
::GetShrinkFactor()
{
//----------------------------------------------------------------------------
virtual void SetTransform(VTKViewer_Transform* theTransform);
- virtual void SetLineWidth(vtkFloatingPointType theLineWidth);
- virtual vtkFloatingPointType GetLineWidth();
+ virtual void SetLineWidth(double theLineWidth);
+ virtual double GetLineWidth();
virtual void SetShrink();
virtual void UnShrink();
virtual bool IsShrunk();
virtual void SetShrinkable(bool theIsShrinkable);
- virtual void SetShrinkFactor(vtkFloatingPointType theFactor = 0.8);
- virtual vtkFloatingPointType GetShrinkFactor();
+ virtual void SetShrinkFactor(double theFactor = 0.8);
+ virtual double GetShrinkFactor();
virtual void SetRepresentation(int theMode);
::SetMapperInput(vtkDataSet* theDataSet)
{
if (theDataSet->IsA("vtkPolyData")) {
- myPolyDataExtractor->SetInput(theDataSet);
- myMapper->SetInput(myPolyDataExtractor->GetOutput());
+ myPolyDataExtractor->SetInputData(theDataSet);
+ myMapper->SetInputConnection(myPolyDataExtractor->GetOutputPort());
} else {
- myExtractor->SetInput(theDataSet);
- myMapper->SetInput(myExtractor->GetOutput());
+ myExtractor->SetInputData(theDataSet);
+ myMapper->SetInputConnection(myExtractor->GetOutputPort());
}
- // myMapper->SetInput(theDataSet);
+ // myMapper->SetInputData(theDataSet);
+ myMapper->Update();
SetMapper(myMapper.GetPointer());
}
namespace
{
bool
- CheckIsSameValue(vtkFloatingPointType theTarget,
- vtkFloatingPointType theSource)
+ CheckIsSameValue(double theTarget,
+ double theSource)
{
- static vtkFloatingPointType TOL = 10.0 / VTK_LARGE_FLOAT;
+ static double TOL = 10.0 / VTK_LARGE_FLOAT;
return fabs(theTarget - theSource) < TOL;
}
bool
- CheckIsSameVector(vtkFloatingPointType* theTarget,
- vtkFloatingPointType* theSource,
+ CheckIsSameVector(double* theTarget,
+ double* theSource,
size_t theLength)
{
for ( size_t anId = 0; anId < theLength; anId++ ) {
return myMapper.GetPointer();
}
-vtkFloatingPointType*
+double*
VISU_GaussPtsAct
::GetBounds()
{
{
myEventCallbackCommand->SetAbortFlag(1);
- vtkFloatingPointType aMagnification = myInsideCursorSettings->GetMagnification();
- vtkFloatingPointType anIncrement = myInsideCursorSettings->GetIncrement();
- vtkFloatingPointType coefficient = up ? anIncrement : 1 / anIncrement;
+ double aMagnification = myInsideCursorSettings->GetMagnification();
+ double anIncrement = myInsideCursorSettings->GetIncrement();
+ double coefficient = up ? anIncrement : 1 / anIncrement;
myInsideCursorSettings->SetMagnification( aMagnification * coefficient );
myInsideCursorSettings->InvokeEvent(VISU::UpdateFromSettingsEvent,NULL);
// myPolyDataExtractor->SetInput(myCurrentPL->GetPickableDataSet());
//myMapper->SetInput(myPolyDataExtractor->GetOutput());
- myMapper->SetInput(myCurrentPL->GetPickableDataSet());
+ myMapper->SetInputData(myCurrentPL->GetPickableDataSet());
SetMapper(myMapper.GetPointer());
}
namespace
{
inline
- vtkFloatingPointType
+ double
GetRadius(vtkIdType theVTKID,
vtkDataArray *theScalarArray,
VISU_GaussPointsPL* theGaussPointsPL)
{
- vtkFloatingPointType aRadius = 0.5;
+ double aRadius = 0.5;
if(theGaussPointsPL->GetPointSpriteMapper()->GetPointSpriteMode() == 1) // Geometry mode
aRadius *= theGaussPointsPL->GetSize() * theGaussPointsPL->GetAverageCellSize();
else if(theGaussPointsPL->GetBicolor()){
- vtkFloatingPointType aVal = theScalarArray->GetTuple1(theVTKID);
+ double aVal = theScalarArray->GetTuple1(theVTKID);
if(aVal > 0.0)
aRadius *= theGaussPointsPL->GetMaxSize();
else
}
}
-vtkFloatingPointType
+double
VISU_GaussPtsAct
::GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPtsAct
::GetMagnification(vtkIdType theObjID)
{
namespace
{
inline
- vtkFloatingPointType
+ double
GetClamp(VISU_GaussPointsPL* theGaussPointsPL)
{
- vtkFloatingPointType aClamp = theGaussPointsPL->GetClamp();
+ double aClamp = theGaussPointsPL->GetClamp();
if(theGaussPointsPL->GetPrimitiveType() == VISU_OpenGLPointSpriteMapper::GeomSphere)
return -aClamp;
return aClamp;
}
}
-vtkFloatingPointType
+double
VISU_GaussPtsAct
::GetClamp(vtkIdType theObjID)
{
//----------------------------------------------------------------------------
void
VISU_GaussPtsAct
-::SetOpacity(vtkFloatingPointType theValue)
+::SetOpacity(double theValue)
{
GetGaussPointsPL()->SetOpacity(theValue);
Superclass::SetOpacity(theValue);
{
if(vtkMapper* aMapper = myDeviceActor->GetMapper()){
if(vtkDataSet* aDataSet= aMapper->GetInput()){
- aDataSet->Update();
+ aMapper->Update();
myIsInfinite = aDataSet->GetNumberOfCells() < 2;
}
}
if(Superclass::GetPickable()){
if(vtkMapper* aMapper = GetMapper()){
if(vtkDataSet* aDataSet= aMapper->GetInput()){
- aDataSet->Update();
+ aMapper->Update();
return aDataSet->GetNumberOfCells() > 0;
}
}
if(myIsPreselected){
anIsChanged = (myLastPreHighlightObjID != anObjId);
if(anIsChanged){
- vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId);
+ double* aNodeCoord = GetNodeCoord(anObjId);
//Take into account translation
- vtkFloatingPointType aLocalNodeCoord[3];
+ double aLocalNodeCoord[3];
this->Transform->Push();
this->Transform->PostMultiply();
this->Transform->Identity();
vtkDataSet* aDataSet = GetInput();
vtkPointData* aPointData = aDataSet->GetPointData();
if(vtkDataArray *aScalarArray = aPointData->GetScalars()){
- vtkFloatingPointType aPyramidHeight = aPickingSettings->GetPyramidHeight();
+ double aPyramidHeight = aPickingSettings->GetPyramidHeight();
aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
- //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
- vtkFloatingPointType aColor[3];
+ //double aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
+ double aColor[3];
theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor );
aColor[0] = 1. - aColor[0];
aColor[1] = 1. - aColor[1];
if( (theInitialHasIndex + theCurrentHasIndex == 1) && thePickingSettings){
vtkCamera *aCamera = theRenderer->GetActiveCamera();
- vtkFloatingPointType aZoomFactor = thePickingSettings->GetZoomFactor();
+ double aZoomFactor = thePickingSettings->GetZoomFactor();
double aScale = aCamera->GetParallelScale();
if ( !theInitialHasIndex && theCurrentHasIndex ) {
aCamera->SetParallelScale( aScale/aZoomFactor );
mySelector->AddIObject(this);
}
/*
- vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId);
+ double* aNodeCoord = GetNodeCoord(anObjId);
//
// FlyTo
vtkRenderWindowInteractor* anInteractor = theInteractorStyle->GetInteractor();
- vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
+ double aDollyWas = anInteractor->GetDolly();
int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
anInteractor->SetDolly(0.);
vtkCamera* aCamera = aRenderer->GetActiveCamera();
int anObjId = aMapIndex(1);
- vtkFloatingPointType* aNodeCoord = GetNodeCoord(anObjId);
+ double* aNodeCoord = GetNodeCoord(anObjId);
if ( !aNodeCoord )
return;
//Take into account translation
- vtkFloatingPointType aLocalNodeCoord[3];
+ double aLocalNodeCoord[3];
this->Transform->Push();
this->Transform->PostMultiply();
this->Transform->Identity();
aLocalNodeCoord[2] = aNodeCoord[2] + aPosition[2];
this->Transform->Pop();
- vtkFloatingPointType aFocalPnt[3];
+ double aFocalPnt[3];
aCamera->GetFocalPoint(aFocalPnt);
if ( CheckIsSameVector(aLocalNodeCoord, aFocalPnt, 3 ) )
if( anIsVisible && aPickingSettings->GetCameraMovementEnabled() )
{
vtkRenderWindowInteractor* anInteractor = myInteractor;
- vtkFloatingPointType aDollyWas = anInteractor->GetDolly();
+ double aDollyWas = anInteractor->GetDolly();
int aNumberOfFlyFramesWas = anInteractor->GetNumberOfFlyFrames();
anInteractor->SetDolly(0.0);
//
vtkIdType aVtkId = GetNodeVTKID(anObjId);
if(aVtkId >= 0){
- vtkFloatingPointType aWorldCoord[4] = {aLocalNodeCoord[0], aLocalNodeCoord[1], aLocalNodeCoord[2], 1.};
+ double aWorldCoord[4] = {aLocalNodeCoord[0], aLocalNodeCoord[1], aLocalNodeCoord[2], 1.};
//
vtkDataSet* aDataSet = GetInput();
vtkPointData* aDataSetAttributes = aDataSet->GetPointData();
//
if(vtkDataArray* aScalarArray = aDataSetAttributes->GetScalars()){
- vtkFloatingPointType aVal = aScalarArray->GetTuple1(aVtkId);
+ double aVal = aScalarArray->GetTuple1(aVtkId);
//
// GetScalarBarCtrl()->SetIsMarked(true);
GetScalarBarCtrl()->SetMarkValue(aVal);
GetScalarBarCtrl()->Update();
//
- vtkFloatingPointType aPyramidHeight = aPickingSettings->GetPyramidHeight();
+ double aPyramidHeight = aPickingSettings->GetPyramidHeight();
aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
myCursorPyramidSelected->Init(aPyramidHeight,
aPickingSettings->GetCursorSize(),
if(vtkDataArray* aFieldArray = aDataSetAttributes->GetArray("VISU_FIELD")){
int aNbComp = aFieldArray->GetNumberOfComponents();
- std::vector<vtkFloatingPointType> aTuple(aNbComp);
+ std::vector<double> aTuple(aNbComp);
aFieldArray->GetTuple(aVtkId, &aTuple[0]);
aStr<<"\nData: {";
int anId = 0;
while(anId < aNbComp){
- vtkFloatingPointType aComp = aTuple[anId++];
+ double aComp = aTuple[anId++];
aStr<<aComp;
if(anId < aNbComp)
aStr<<"; ";
aCellVectors->SetNumberOfComponents(3);
int aNbComp = anInputVectors->GetNumberOfComponents();
- std::vector<vtkFloatingPointType> aTuple(aNbComp);
+ std::vector<double> aTuple(aNbComp);
for (vtkIdType i = 0; i < aNbNeighbourCells; i++) {
vtkIdType aVTKCellId = aNeighbourCells->GetId(i);
// warp
myWarpVector->SetScaleFactor(myGaussPointsPL->GetScale());
- myCellDataToPointData->SetInput(aCellsToWarp);
+ myCellDataToPointData->SetInputData(aCellsToWarp);
myCellDataToPointData->PassCellDataOn();
aCellsToWarp->Delete();
- myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
+ //myWarpVector->SetInput(myCellDataToPointData->GetUnstructuredGridOutput());
+ myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
vtkUnstructuredGrid* aWarpedDataSet = myWarpVector->GetUnstructuredGridOutput();
- aWarpedDataSet->Update();
+ myWarpVector->Update();
myCellSource->SetPoints(aWarpedDataSet->GetPoints());
}
else
myTextActor->SetModePosition(aPickingSettings->GetInfoWindowPosition());
myTextActor->SetTransparency(aPickingSettings->GetInfoWindowTransparency());
- vtkFloatingPointType aHeight = myGaussPointsPL->GetMaxPointSize()*aPickingSettings->GetPyramidHeight();
- vtkFloatingPointType aCursorSize = aPickingSettings->GetCursorSize();
+ double aHeight = myGaussPointsPL->GetMaxPointSize()*aPickingSettings->GetPyramidHeight();
+ double aCursorSize = aPickingSettings->GetCursorSize();
myCursorPyramid->SetPreferences(aHeight,aCursorSize);
myCursorPyramidSelected->SetPreferences(aHeight,aCursorSize);
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPtsAct1
::GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPtsAct1
::GetMagnification(vtkIdType theObjID)
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPtsAct1
::GetClamp(vtkIdType theObjID)
{
VISU_GaussPointsPL* aPipeline = myOutsideDeviceActor->GetPipeLine();
vtkImplicitFunction* anImplicitFunction = aPipeline->GetImplicitFunction();
- vtkFloatingPointType aMagnification = aPipeline->GetMagnification();
+ double aMagnification = aPipeline->GetMagnification();
aPipeline->ShallowCopy(GetGaussPointsPL(), true);
//! Redefined method of getting an actor bounds.
virtual
- vtkFloatingPointType*
+ double*
GetBounds();
//! Redefined method of getting an actor input.
//----------------------------------------------------------------------------
virtual
void
- SetOpacity(vtkFloatingPointType theValue);
+ SetOpacity(double theValue);
//----------------------------------------------------------------------------
virtual
//! To get current value of the radius of the Point Sprite
virtual
- vtkFloatingPointType
+ double
GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
vtkDataArray *theScalarArray);
//! To get current value of the magnification
virtual
- vtkFloatingPointType
+ double
GetMagnification(vtkIdType theObjID);
//! To get current value of the clamp
virtual
- vtkFloatingPointType
+ double
GetClamp(vtkIdType theObjID);
//----------------------------------------------------------------------------
void
OnInteractorEvent(unsigned long theEvent);
- vtkFloatingPointType myPriority;
+ double myPriority;
bool myChangeMagnification;
VISU::TGaussPtsActorFactory* myGaussPtsActorFactory;
boost::signal1<void,VISU_GaussPtsAct*> myUpdatePrs3dSignal;
//! To get current value of the radius of the Point Sprite
virtual
- vtkFloatingPointType
+ double
GetRadius(vtkIdType theObjID,
vtkIdType theVTKID,
vtkDataArray *theScalarArray);
//! To get current value of the magnification
virtual
- vtkFloatingPointType
+ double
GetMagnification(vtkIdType theObjID);
//! To get current value of the clamp
virtual
- vtkFloatingPointType
+ double
GetClamp(vtkIdType theObjID);
//----------------------------------------------------------------------------
int anId = 0;
if (myPolyDataExtractor) {
- myPolyDataExtractor->SetInput(aDataSet);
- myPassFilter[ anId ]->SetInput( myPolyDataExtractor->GetOutput() );
+ myPolyDataExtractor->SetInputData(aDataSet);
+ myPassFilter[ anId ]->SetInputConnection( myPolyDataExtractor->GetOutputPort() );
} else {
- myPassFilter[ anId ]->SetInput( aDataSet );
+ myPassFilter[ anId ]->SetInputData( aDataSet );
}
- myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++;
- myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ //myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
anId++;
- myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
+ myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
- myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ //myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); // OUV_PORTING: to check
Superclass::SetMapper( theMapper );
}
if(Superclass::GetPickable()){
if(vtkMapper* aMapper = GetMapper()){
if(vtkDataSet* aDataSet= aMapper->GetInput()){
- aDataSet->Update();
+ aMapper->Update();
return aDataSet->GetNumberOfCells() > 0;
}
}
myAppendFilter->Delete();
myMapper->Delete();
- myMapper->SetInput(myAppendFilter->GetOutput());
+ myMapper->SetInputConnection(myAppendFilter->GetOutputPort());
for(int i = 0; i < myNbCones; i++){
vtkConeSource* aConeSource = vtkConeSource::New();
- myAppendFilter->AddInput(aConeSource->GetOutput());
+ myAppendFilter->AddInputConnection(aConeSource->GetOutputPort());
aConeSource->SetResolution(4);
mySources[i] = aConeSource;
aConeSource->Delete();
}
this->SetScale(1.0);
- vtkFloatingPointType aMRadius = myRadius*myMagnification;
+ double aMRadius = myRadius*myMagnification;
Init(myHeight,aMRadius*myCursorSize);
if(myClamp > 0.0f){
- vtkFloatingPointType aPoint1[3] = {0.0, 0.0, 0.0};
+ double aPoint1[3] = {0.0, 0.0, 0.0};
ren->SetDisplayPoint(aPoint1);
ren->DisplayToWorld();
ren->GetWorldPoint(aPoint1);
- vtkFloatingPointType aPoint2[3] = {0.0, myClamp, 0.0};
+ double aPoint2[3] = {0.0, myClamp, 0.0};
ren->SetDisplayPoint(aPoint2);
ren->DisplayToWorld();
ren->GetWorldPoint(aPoint2);
- vtkFloatingPointType aWorldClamp =
+ double aWorldClamp =
(aPoint2[0] - aPoint1[0])*(aPoint2[0] - aPoint1[0]) +
(aPoint2[1] - aPoint1[1])*(aPoint2[1] - aPoint1[1]) +
(aPoint2[2] - aPoint1[2])*(aPoint2[2] - aPoint1[2]);
aWorldClamp = sqrt(aWorldClamp);
- vtkFloatingPointType aMDiameter = 2.0 * aMRadius;
- vtkFloatingPointType aCoeff = aWorldClamp / aMDiameter;
+ double aMDiameter = 2.0 * aMRadius;
+ double aCoeff = aWorldClamp / aMDiameter;
if(aCoeff < 1.0){
this->SetScale(aCoeff);
//----------------------------------------------------------------------------
void
VISU_CursorPyramid
-::SetPreferences(vtkFloatingPointType theHeight,
- vtkFloatingPointType theCursorSize)
+::SetPreferences(double theHeight,
+ double theCursorSize)
{
Init(theHeight, theCursorSize, myRadius, myMagnification, myClamp, GetPosition(), GetProperty()->GetColor());
}
//----------------------------------------------------------------------------
void
VISU_CursorPyramid
-::Init(vtkFloatingPointType theHeight,
- vtkFloatingPointType theCursorSize,
- vtkFloatingPointType theRadius,
- vtkFloatingPointType theMagnification,
- vtkFloatingPointType theClamp,
- vtkFloatingPointType thePos[3],
- vtkFloatingPointType theColor[3])
+::Init(double theHeight,
+ double theCursorSize,
+ double theRadius,
+ double theMagnification,
+ double theClamp,
+ double thePos[3],
+ double theColor[3])
{
Init(theHeight,theRadius*theMagnification*theCursorSize);
SetPosition(thePos[0],thePos[1],thePos[2]);
void
VISU_CursorPyramid
-::Init(vtkFloatingPointType theHeight,
- vtkFloatingPointType theRadius)
+::Init(double theHeight,
+ double theRadius)
{
for(int i = 0; i < myNbCones; ++i){
vtkConeSource* aSource = mySources[i].GetPointer();
aSource->SetAngle(20.0);
}
- vtkFloatingPointType aDisplacement = -0.5*theHeight - theRadius;
+ double aDisplacement = -0.5*theHeight - theRadius;
// X
mySources[0]->SetDirection(1.0, 0.0, 0.0);
RemoveFromRender(vtkRenderer* theRenderer);
void
- Init(vtkFloatingPointType theHeight,
- vtkFloatingPointType theCursorSize,
- vtkFloatingPointType theRadius,
- vtkFloatingPointType theMagnification,
- vtkFloatingPointType theClamp,
- vtkFloatingPointType thePos[3],
- vtkFloatingPointType theColor[3]);
+ Init(double theHeight,
+ double theCursorSize,
+ double theRadius,
+ double theMagnification,
+ double theClamp,
+ double thePos[3],
+ double theColor[3]);
- void SetPreferences(vtkFloatingPointType theHeight,
- vtkFloatingPointType theCursorSize);
+ void SetPreferences(double theHeight,
+ double theCursorSize);
protected:
VISU_CursorPyramid();
void
- Init(vtkFloatingPointType theHeight,
- vtkFloatingPointType theRadius);
+ Init(double theHeight,
+ double theRadius);
int myNbCones;
vtkSmartPointer<vtkConeSource> mySources[6];
vtkSmartPointer<vtkAppendPolyData> myAppendFilter;
vtkSmartPointer<vtkPolyDataMapper> myMapper;
//
- vtkFloatingPointType myHeight;
- vtkFloatingPointType myCursorSize;
- vtkFloatingPointType myRadius;
- vtkFloatingPointType myMagnification;
- vtkFloatingPointType myClamp;
+ double myHeight;
+ double myCursorSize;
+ double myRadius;
+ double myMagnification;
+ double myClamp;
private:
VISU_CursorPyramid(const VISU_CursorPyramid&); // Not implemented
vtkSetMacro( PrimitiveType, int );
vtkGetMacro( PrimitiveType, int );
- vtkSetMacro( Clamp, vtkFloatingPointType );
- vtkGetMacro( Clamp, vtkFloatingPointType );
+ vtkSetMacro( Clamp, double );
+ vtkGetMacro( Clamp, double );
vtkSetMacro( Texture, vtkImageData* );
vtkGetMacro( Texture, vtkImageData* );
- vtkSetMacro( AlphaThreshold, vtkFloatingPointType );
- vtkGetMacro( AlphaThreshold, vtkFloatingPointType );
+ vtkSetMacro( AlphaThreshold, double );
+ vtkGetMacro( AlphaThreshold, double );
vtkSetMacro( Resolution, int );
vtkGetMacro( Resolution, int );
- vtkSetMacro( Magnification, vtkFloatingPointType );
- vtkGetMacro( Magnification, vtkFloatingPointType );
+ vtkSetMacro( Magnification, double );
+ vtkGetMacro( Magnification, double );
- vtkSetMacro( Increment, vtkFloatingPointType );
- vtkGetMacro( Increment, vtkFloatingPointType );
+ vtkSetMacro( Increment, double );
+ vtkGetMacro( Increment, double );
protected:
bool Initial;
int PrimitiveType;
- vtkFloatingPointType Clamp;
+ double Clamp;
vtkImageData* Texture;
- vtkFloatingPointType AlphaThreshold;
+ double AlphaThreshold;
int Resolution;
- vtkFloatingPointType Magnification;
- vtkFloatingPointType Increment;
+ double Magnification;
+ double Increment;
};
VISU_InsideCursorSettings*
New();
- vtkSetMacro( MinSize, vtkFloatingPointType );
- vtkGetMacro( MinSize, vtkFloatingPointType );
+ vtkSetMacro( MinSize, double );
+ vtkGetMacro( MinSize, double );
- vtkSetMacro( MaxSize, vtkFloatingPointType );
- vtkGetMacro( MaxSize, vtkFloatingPointType );
+ vtkSetMacro( MaxSize, double );
+ vtkGetMacro( MaxSize, double );
protected:
- vtkFloatingPointType MinSize;
- vtkFloatingPointType MaxSize;
+ double MinSize;
+ double MaxSize;
};
VISU_OutsideCursorSettings*
New();
- vtkSetMacro( Size, vtkFloatingPointType );
- vtkGetMacro( Size, vtkFloatingPointType );
+ vtkSetMacro( Size, double );
+ vtkGetMacro( Size, double );
vtkSetMacro( Uniform, bool );
vtkGetMacro( Uniform, bool );
- vtkSetVector3Macro( Color, vtkFloatingPointType );
- vtkGetVector3Macro( Color, vtkFloatingPointType );
+ vtkSetVector3Macro( Color, double );
+ vtkGetVector3Macro( Color, double );
protected:
- vtkFloatingPointType Size;
+ double Size;
bool Uniform;
- vtkFloatingPointType Color[3];
+ double Color[3];
};
#endif
// myMaskPoints->SetOnRatio(100);
myMaskPoints = VISU_LabelPointsFilter::New();
- myMaskPoints->SetInput(myLabelsDataSet);
+ myMaskPoints->SetInputData(myLabelsDataSet);
myLabeledDataMapper = vtkLabeledDataMapper::New();
- myLabeledDataMapper->SetInput(myMaskPoints->GetOutput());
+ myLabeledDataMapper->SetInputConnection(myMaskPoints->GetOutputPort());
//myLabeledDataMapper->SetLabelFormat("%e");
myLabeledDataMapper->SetLabelModeToLabelScalars();
void
VISU_MeshAct
-::SetShrinkFactor(vtkFloatingPointType theValue)
+::SetShrinkFactor(double theValue)
{
Superclass::SetShrinkFactor(theValue);
//----------------------------------------------------------------------------
void
VISU_MeshAct
-::SetOpacity(vtkFloatingPointType theValue)
+::SetOpacity(double theValue)
{
GetSurfaceProperty()->SetOpacity(theValue);
}
-vtkFloatingPointType
+double
VISU_MeshAct
::GetOpacity()
{
//----------------------------------------------------------------------------
void
VISU_MeshAct
-::SetLineWidth(vtkFloatingPointType theLineWidth)
+::SetLineWidth(double theLineWidth)
{
GetEdgeProperty()->SetLineWidth(theLineWidth);
}
-vtkFloatingPointType
+double
VISU_MeshAct::GetLineWidth()
{
return GetEdgeProperty()->GetLineWidth();
void
VISU_MeshAct
-::SetFeatureEdgesAngle(vtkFloatingPointType theValue)
+::SetFeatureEdgesAngle(double theValue)
{
Superclass::SetFeatureEdgesAngle(theValue);
#include "VISU_DataSetActor.h"
#include "SVTK_DeviceActor.h"
+#include <vtkVersion.h>
class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor
{
virtual
void
- SetOpacity(vtkFloatingPointType theValue);
+ SetOpacity(double theValue);
virtual
- vtkFloatingPointType
+ double
GetOpacity();
virtual
void
- SetLineWidth(vtkFloatingPointType theLineWidth);
+ SetLineWidth(double theLineWidth);
virtual
- vtkFloatingPointType
+ double
GetLineWidth();
virtual
virtual
void
- SetShrinkFactor(vtkFloatingPointType theFactor = 0.8);
+ SetShrinkFactor(double theFactor = 0.8);
virtual
void
virtual
void
- SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0);
+ SetFeatureEdgesAngle(double theAngle = 30.0);
virtual
void
aPickingSettings->SetDisplayParentMesh( aResourceMgr->booleanValue( "VISU", "picking_display_parent_mesh", true ) );
QColor aSelectionColor = aResourceMgr->colorValue( "VISU", "picking_selection_color", Qt::yellow );
- vtkFloatingPointType aColor[3];
+ double aColor[3];
aColor[0] = aSelectionColor.red() / 255.0;
aColor[1] = aSelectionColor.green() / 255.0;
aColor[2] = aSelectionColor.blue() / 255.0;
vtkSetMacro( IsInitial, bool );
vtkGetMacro( IsInitial, bool );
- vtkSetMacro( PyramidHeight, vtkFloatingPointType );
- vtkGetMacro( PyramidHeight, vtkFloatingPointType );
+ vtkSetMacro( PyramidHeight, double );
+ vtkGetMacro( PyramidHeight, double );
- vtkSetMacro( CursorSize, vtkFloatingPointType );
- vtkGetMacro( CursorSize, vtkFloatingPointType );
+ vtkSetMacro( CursorSize, double );
+ vtkGetMacro( CursorSize, double );
- vtkSetVector3Macro( Color, vtkFloatingPointType );
- vtkGetVector3Macro( Color, vtkFloatingPointType );
+ vtkSetVector3Macro( Color, double );
+ vtkGetVector3Macro( Color, double );
- vtkSetMacro( PointTolerance, vtkFloatingPointType );
- vtkGetMacro( PointTolerance, vtkFloatingPointType );
+ vtkSetMacro( PointTolerance, double );
+ vtkGetMacro( PointTolerance, double );
vtkSetMacro( InfoWindowEnabled, bool );
vtkGetMacro( InfoWindowEnabled, bool );
- vtkSetMacro( InfoWindowTransparency, vtkFloatingPointType );
- vtkGetMacro( InfoWindowTransparency, vtkFloatingPointType );
+ vtkSetMacro( InfoWindowTransparency, double );
+ vtkGetMacro( InfoWindowTransparency, double );
vtkSetMacro( InfoWindowPosition, int );
vtkGetMacro( InfoWindowPosition, int );
vtkSetMacro( CameraMovementEnabled, bool );
vtkGetMacro( CameraMovementEnabled, bool );
- vtkSetMacro( ZoomFactor, vtkFloatingPointType );
- vtkGetMacro( ZoomFactor, vtkFloatingPointType );
+ vtkSetMacro( ZoomFactor, double );
+ vtkGetMacro( ZoomFactor, double );
vtkSetMacro( StepNumber, int );
vtkGetMacro( StepNumber, int );
private:
bool IsInitial;
- vtkFloatingPointType PyramidHeight;
- vtkFloatingPointType CursorSize;
+ double PyramidHeight;
+ double CursorSize;
- vtkFloatingPointType PointTolerance;
+ double PointTolerance;
- vtkFloatingPointType Color[3];
+ double Color[3];
bool InfoWindowEnabled;
- vtkFloatingPointType InfoWindowTransparency;
+ double InfoWindowTransparency;
int InfoWindowPosition;
bool CameraMovementEnabled;
- vtkFloatingPointType ZoomFactor;
+ double ZoomFactor;
int StepNumber;
bool DisplayParentMesh;
void
SetInput(vtkDataSet* theDataSet)
{
- myGeomFilter->SetInput( theDataSet );
+ myGeomFilter->SetInputData( theDataSet );
}
Superclass::DoMapperShallowCopy( theMapper, theIsCopyInput );
vtkDataSet* aDataSet = theMapper->GetInput();
- vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
+ double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
GetPointSpriteMapper()->SetAverageCellSize( aScaleFactor );
}
myGeomFilter->SetInside(true);
VISU_OpenGLPointSpriteMapper* aMapper = VISU_OpenGLPointSpriteMapper::New();
- aMapper->SetInput( myGeomFilter->GetOutput() );
+ aMapper->SetInputConnection( myGeomFilter->GetOutputPort() );
std::string aRootDir( getenv( "VISU_ROOT_DIR") );
std::string aMainTexture = aRootDir + "/share/salome/resources/visu/sprite_texture.bmp";
if ( !GetVisibility() )
return;
- static vtkFloatingPointType anIncrement = 2;
- vtkFloatingPointType aMagnification = GetPointSpriteMapper()->GetPointSpriteMagnification();
- vtkFloatingPointType coefficient = myInteractor->GetShiftKey() ? anIncrement : 1 / anIncrement;
+ static double anIncrement = 2;
+ double aMagnification = GetPointSpriteMapper()->GetPointSpriteMagnification();
+ double coefficient = myInteractor->GetShiftKey() ? anIncrement : 1 / anIncrement;
GetPointSpriteMapper()->SetPointSpriteMagnification( aMagnification * coefficient );
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_ScalarMapAct);
-static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT;
+static double EPS = 1.0 / VTK_LARGE_FLOAT;
//----------------------------------------------------------------------------
VISU_ScalarMapAct
void
VISU_ScalarMapAct
-::SetShrinkFactor(vtkFloatingPointType theValue)
+::SetShrinkFactor(double theValue)
{
Superclass::SetShrinkFactor(theValue);
void
VISU_ScalarMapAct
-::SetFeatureEdgesAngle(vtkFloatingPointType theValue)
+::SetFeatureEdgesAngle(double theValue)
{
Superclass::SetFeatureEdgesAngle(theValue);
//----------------------------------------------------------------------------
void
VISU_ScalarMapAct
-::SetOpacity(vtkFloatingPointType theValue)
+::SetOpacity(double theValue)
{
mySurfaceActor->GetProperty()->SetOpacity(theValue);
- vtkFloatingPointType aPointSpriteOpacity = theValue > 0.0 ? 1.0 : 0.0;
+ double aPointSpriteOpacity = theValue > 0.0 ? 1.0 : 0.0;
myPointSpriteActor->GetPointSpriteMapper()->SetPointSpriteOpacity(aPointSpriteOpacity);
}
-vtkFloatingPointType
+double
VISU_ScalarMapAct
::GetOpacity()
{
//----------------------------------------------------------------------------
void
VISU_ScalarMapAct
-::SetLineWidth(vtkFloatingPointType theLineWidth)
+::SetLineWidth(double theLineWidth)
{
mySurfaceActor->GetProperty()->SetLineWidth(theLineWidth);
}
-vtkFloatingPointType
+double
VISU_ScalarMapAct::GetLineWidth()
{
return mySurfaceActor->GetProperty()->GetLineWidth();
/**
* Set size of the 0D elements.
*/
-void VISU_ScalarMapAct::Set0DElemSize(vtkFloatingPointType theValue) {
+void VISU_ScalarMapAct::Set0DElemSize(double theValue) {
mySurfaceActor->GetProperty()->SetPointSize(theValue);
}
/**
* Get size of the 0D elements.
*/
-vtkFloatingPointType VISU_ScalarMapAct::Get0DElemSize() {
+double VISU_ScalarMapAct::Get0DElemSize() {
return mySurfaceActor->GetProperty()->GetPointSize();
}
#include "VISU_DataSetActor.h"
#include "SVTK_DeviceActor.h"
+#include <vtkVersion.h>
+
namespace VTK
{
const MarkerType MT_POINT_SPRITE = MT_USER + 1;
virtual
void
- SetShrinkFactor(vtkFloatingPointType theFactor = 0.8);
+ SetShrinkFactor(double theFactor = 0.8);
virtual
void
virtual
void
- SetFeatureEdgesAngle(vtkFloatingPointType theAngle = 30.0);
+ SetFeatureEdgesAngle(double theAngle = 30.0);
virtual
void
virtual
void
- SetOpacity(vtkFloatingPointType theValue);
+ SetOpacity(double theValue);
virtual
- vtkFloatingPointType
+ double
GetOpacity();
virtual
void
- SetLineWidth(vtkFloatingPointType theLineWidth);
+ SetLineWidth(double theLineWidth);
virtual
- vtkFloatingPointType
+ double
GetLineWidth();
virtual
GetBarVisibility();
virtual
- vtkFloatingPointType
+ double
Get0DElemSize();
virtual
virtual
void
- Set0DElemSize(vtkFloatingPointType theValue);
+ Set0DElemSize(double theValue);
protected:
::SetMapper(vtkMapper* theMapper)
{
if(theMapper){
- myPassFilter[0]->SetInput(theMapper->GetInput());
+ myPassFilter[0]->SetInputData(theMapper->GetInput());
- myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
+ //myPassFilter[1]->SetInput(myPassFilter[0]->GetPolyDataOutput());
+ myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort()); // OUV_PORTING: to check
- myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
+ //myPassFilter[2]->SetInput(myPassFilter[1]->GetPolyDataOutput());
+ myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort()); // OUV_PORTING: to check
- myPassFilter[3]->SetInput(myPassFilter[2]->GetPolyDataOutput());
+ //myPassFilter[3]->SetInput(myPassFilter[2]->GetPolyDataOutput());
+ myPassFilter[3]->SetInputConnection(myPassFilter[2]->GetOutputPort()); // OUV_PORTING: to check
+ // OUV_PORTING: to check
+ /*
if(vtkDataSetMapper* aMapper = dynamic_cast<vtkDataSetMapper*>(theMapper))
aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput());
else if(vtkPolyDataMapper* aMapper = dynamic_cast<vtkPolyDataMapper*>(theMapper))
aMapper->SetInput(myPassFilter[3]->GetPolyDataOutput());
+ */
+ theMapper->SetInputConnection(myPassFilter[3]->GetOutputPort());
}
vtkLODActor::SetMapper(theMapper);
AM_CPPFLAGS+=$(libVisuPipeLine_la_CPPFLAGS)
LDADD=$(libVisuPipeLine_la_LDFLAGS) libVisuPipeLine.la \
- -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2 -lMEDWrapperBase -lsuit -lqtx -lSALOMEBasics -lvtkWidgets
+ -lOpUtil -lMEDWrapper -lMEDWrapper_V2_2 -lMEDWrapperBase -lsuit -lqtx -lSALOMEBasics
vtkIdList *cellPts;
vtkCell *cell;
int numCellPts;
- vtkFloatingPointType *x;
- vtkFloatingPointType multiplier;
+ double *x;
+ double multiplier;
vtkPoints *newPts;
vtkIdList *newCellPts;
vtkPointData *pd = input->GetPointData();
// To extract boundary cells, we have to create supplemental information
if ( this->ExtractBoundaryCells )
{
- vtkFloatingPointType val;
+ double val;
newScalars = vtkFloatArray::New();
newScalars->SetNumberOfValues(numPts);
vtkIdList *cellPts;
vtkCell *cell;
int numCellPts;
- vtkFloatingPointType *x;
- vtkFloatingPointType multiplier;
+ double *x;
+ double multiplier;
vtkPoints *newPts;
vtkIdList *newCellPts;
vtkPointData *pd = input->GetPointData();
// To extract boundary cells, we have to create supplemental information
if ( this->ExtractBoundaryCells )
{
- vtkFloatingPointType val;
+ double val;
newScalars = vtkFloatArray::New();
newScalars->SetNumberOfValues(numPts);
vtkIdType anObjID = aPresent->GetNodeObjID(anCellId);
vtkIdType aVtkID = aPresent->GetNodeVTKID(anObjID);
cout<<anObjID<<"; "<<aVtkID<<"; - ";
- vtkFloatingPointType* aCoord = aPresent->GetNodeCoord(anObjID);
+ double* aCoord = aPresent->GetNodeCoord(anObjID);
cout<<aCoord[0]<<"; "<<aCoord[1]<<"; "<<aCoord[2]<<endl;
}
#endif
theTimeStampNumber);
aPresent->SetUnstructuredGridIDMapper(anUnstructuredGridIDMapper);
- vtkFloatingPointType aRange[] = { 4, 5 };
+ double aRange[] = { 4, 5 };
cout << "before filter limits set" << endl;
vtkObject::GlobalWarningDisplayOn();
aPresent->DebugOn();
aTimeStamp);
VTKViewer_GeometryFilter* aGeometryFilter = VTKViewer_GeometryFilter::New();
- aGeometryFilter->SetInput(aPresent->GetOutput());
+ aGeometryFilter->SetInputData(aPresent->GetOutput());
aGeometryFilter->SetInside(true);
vtkMaskPoints* aMaskPoints = vtkMaskPoints::New();
- aMaskPoints->SetInput(aGeometryFilter->GetOutput());
+ aMaskPoints->SetInputConnection(aGeometryFilter->GetOutputPort());
aMaskPoints->SetGenerateVertices(true);
aMaskPoints->SetOnRatio(1);
aMapper->SetColorModeToMapScalars();
aMapper->SetScalarVisibility(true);
- aMapper->SetInput(aMaskPoints->GetOutput());
+ aMapper->SetInputConnection(aMaskPoints->GetOutputPort());
aGeometryFilter->Delete();
anActor->SetMapper(aMapper);
} else {
dataArr = aPresent->GetInput()->GetPointData()->GetScalars();
}
- vtkFloatingPointType aRange[2];
+ double aRange[2];
dataArr->GetRange(aRange);
MSG(true, "Range[0]: "<<aRange[0]);
MSG(true, "Range[1]: "<<aRange[1]);
#include <vtkObjectFactory.h>
#include <vtkPointData.h>
-vtkCxxRevisionMacro(VISU_CellDataToPointData, "$Revision$");
vtkStandardNewMacro(VISU_CellDataToPointData);
//----------------------------------------------------------------------------
{
public:
static VISU_CellDataToPointData *New();
- vtkTypeRevisionMacro(VISU_CellDataToPointData,vtkDataSetAlgorithm);
+ vtkTypeMacro(VISU_CellDataToPointData,vtkDataSetAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
//----------------------------------------------------------------------------
void
VISU_ColoredPL
-::SetScalarRange( vtkFloatingPointType theRange[2] )
+::SetScalarRange( double theRange[2] )
{
if (isnan(theRange[0]) || isnan(theRange[1]))
throw std::runtime_error("NAN values in the presentation");
//----------------------------------------------------------------------------
void
VISU_ColoredPL
-::SetScalarFilterRange( vtkFloatingPointType theRange[2] )
+::SetScalarFilterRange( double theRange[2] )
{
- vtkFloatingPointType aRange[ 2 ];
+ double aRange[ 2 ];
this->GetScalarFilterRange( aRange );
if ( VISU::CheckIsSameRange( aRange, theRange) )
//----------------------------------------------------------------------------
void
VISU_ColoredPL
-::GetScalarFilterRange( vtkFloatingPointType theRange[2] )
+::GetScalarFilterRange( double theRange[2] )
{
theRange[ 0 ] = myThreshold->GetLowerThreshold();
theRange[ 1 ] = myThreshold->GetUpperThreshold();
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_ColoredPL
::GetScalarFilterRange()
{
- static vtkFloatingPointType aRange[ 2 ];
+ static double aRange[ 2 ];
this->GetScalarFilterRange( aRange );
{
if ( theUseScalarFilter ) {
// Include threshold filter between the transform and the pass filters.
- myPassFilter->SetInput( myThreshold->GetOutput() );
+ myPassFilter->SetInputConnection( myThreshold->GetOutputPort() );
} else {
// Exclude threshold filter before the pass filter.
- myPassFilter->SetInput( myFieldTransform->GetOutput() );
+ myPassFilter->SetInputConnection( myFieldTransform->GetOutputPort() );
}
}
this->myDistribution->FillComponent(0, 0);
// Create a lookup table to compute a color of a cell
VISU_LookupTable* lut = GetMapperTable();
- vtkFloatingPointType aMapScale = lut->GetMapScale();
+ double aMapScale = lut->GetMapScale();
// Get scalar values from the input data to calculate their distribution within cells
vtkDataArray* dataArr;
// Dtermine where we have to take scalars from: cells data or points data.
}
// Get range of scalars values
-// vtkFloatingPointType aRange[2];
+// double aRange[2];
// dataArr->GetRange(aRange);
// Build the lookup table with the found range
// RKV : End
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_ColoredPL
::GetScalarRange()
{
{
SetScalarMode(0);
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSourceRange( aRange );
SetScalarRange( aRange );
VISU_ColoredPL
::Build()
{
- myExtractor->SetInput( Superclass::GetClippedInput() );
- myFieldTransform->SetInput(myExtractor->GetOutput());
+ myExtractor->SetInputData( Superclass::GetClippedInput() );
+ myFieldTransform->SetInputConnection(myExtractor->GetOutputPort());
- myThreshold->SetInput( myFieldTransform->GetOutput() );
+ myThreshold->SetInputConnection( myFieldTransform->GetOutputPort() );
// The pass filter is used here for possibility to include/exclude
// threshold filter before it.
- myPassFilter->SetInput( myFieldTransform->GetOutput() );
+ myPassFilter->SetInputConnection( myFieldTransform->GetOutputPort() );
GetMapperHolder()->SetLookupTable(GetMapperTable());
//GetMapper()->InterpolateScalarsBeforeMappingOn();
VISU_ColoredPL
::Update()
{
- vtkFloatingPointType *aRange = GetScalarRange();
- vtkFloatingPointType aScalarRange[2] = {aRange[0], aRange[1]};
+ double *aRange = GetScalarRange();
+ double aScalarRange[2] = {aRange[0], aRange[1]};
if(myBarTable->GetScale() == VTK_SCALE_LOG10)
VISU_LookupTable::ComputeLogRange(aRange, aScalarRange);
//----------------------------------------------------------------------------
void
VISU_ColoredPL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
if(!VISU::CheckIsSameValue(myMapperTable->GetMapScale(), theMapScale)){
myMapperTable->SetMapScale(theMapScale);
}
}
-vtkFloatingPointType
+double
VISU_ColoredPL
::GetMapScale()
{
//----------------------------------------------------------------------------
void
VISU_ColoredPL
-::GetSourceRange(vtkFloatingPointType theRange[2])
+::GetSourceRange(double theRange[2])
{
myExtractor->Update();
myExtractor->GetOutput()->GetScalarRange( theRange );
VISU_ColoredPL
::SetSourceRange()
{
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSourceRange( aRange );
SetScalarRange( aRange );
}
SetScalarMode(int theScalarMode = 0);
virtual
- vtkFloatingPointType*
+ double*
GetScalarRange();
virtual
void
- SetScalarRange( vtkFloatingPointType theRange[2] );
+ SetScalarRange( double theRange[2] );
void
- SetScalarFilterRange( vtkFloatingPointType theRange[2] );
+ SetScalarFilterRange( double theRange[2] );
void
- GetScalarFilterRange( vtkFloatingPointType theRange[2] );
+ GetScalarFilterRange( double theRange[2] );
- vtkFloatingPointType*
+ double*
GetScalarFilterRange();
bool
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
virtual
- vtkFloatingPointType
+ double
GetMapScale();
virtual
void
- GetSourceRange(vtkFloatingPointType theRange[2]);
+ GetSourceRange(double theRange[2]);
virtual
void
public:
//! Returns direction that is defined by position & orientation of the basic and tool planes
- const vtkFloatingPointType*
+ const double*
GetRealDirLn()
{
return myRealDirLn;
Returns direction that corresponds to the myRealDirLn,
but has the same direction as main axis.
*/
- const vtkFloatingPointType*
+ const double*
GetDirLn()
{
return myDirLn;
where is the first intersection of the given mesh.
with the defined direction.
*/
- const vtkFloatingPointType*
+ const double*
GetBasePnt()
{
return myBasePnt;
3. Distance between the last point and initial points of intersection.
with the defined direction.
*/
- const vtkFloatingPointType*
+ const double*
GetBoundPrjLn()
{
return myBoundPrjLn;
protected:
VISU_CutLinesBasePL();
- vtkFloatingPointType myDirLn[3];
- vtkFloatingPointType myRealDirLn[3];
- vtkFloatingPointType myBoundPrjLn[3];
- vtkFloatingPointType myBasePnt[3];
+ double myDirLn[3];
+ double myRealDirLn[3];
+ double myBoundPrjLn[3];
+ double myBasePnt[3];
private:
VISU_CutLinesBasePL(const VISU_CutLinesBasePL&); // Not implemented.
//----------------------------------------------------------------------------
void
VISU_CutLinesPL
-::SetPosition(vtkFloatingPointType thePosition)
+::SetPosition(double thePosition)
{
bool anIsSameValue = VISU::CheckIsSameValue(myPosition, thePosition);
anIsSameValue &= (myCondition == 0);
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_CutLinesPL
::GetPosition()
{
- vtkFloatingPointType aPosition = myPosition;
+ double aPosition = myPosition;
if(myCondition){
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
GetMergedInput()->GetBounds(aBounds);
- vtkFloatingPointType aDir[3];
+ double aDir[3];
GetDir(aDir,
myAng[0],
myBasePlane[0]);
- vtkFloatingPointType aBoundPrj[3];
+ double aBoundPrj[3];
GetBoundProject(aBoundPrj,
aBounds,
aDir);
vtkAppendPolyData *anAppendPolyData = vtkAppendPolyData::New();
//Build base plane
- vtkFloatingPointType aBaseBounds[6];
+ double aBaseBounds[6];
GetMergedInput()->GetBounds(aBaseBounds);
- vtkFloatingPointType aDir[2][3];
+ double aDir[2][3];
GetDir(aDir[0],
myAng[0],
myBasePlane[0]);
myDisplacement[0]);
//Build lines
vtkDataSet *aDataSet = anAppendPolyData->GetOutput();
- aDataSet->Update();
+ anAppendPolyData->Update();
if(aDataSet->GetNumberOfCells() == 0)
aDataSet = GetMergedInput();
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
aDataSet->GetBounds(aBounds);
GetDir(aDir[1],
::CutWithPlanes(vtkAppendPolyData* theAppendPolyData,
vtkDataSet* theDataSet,
int theNbPlanes,
- vtkFloatingPointType theDir[3],
- vtkFloatingPointType theBounds[6],
- vtkFloatingPointType thePartPosition,
+ double theDir[3],
+ double theBounds[6],
+ double thePartPosition,
int thePartCondition,
- vtkFloatingPointType theDisplacement)
+ double theDisplacement)
{
- std::vector<vtkFloatingPointType> aPartPosition(1,thePartPosition);
+ std::vector<double> aPartPosition(1,thePartPosition);
std::vector<int> aPartCondition(1,thePartCondition);
VISU_CutPlanesPL::CutWithPlanes(theAppendPolyData,
theDataSet,
virtual
void
- SetPosition(vtkFloatingPointType thePosition);
+ SetPosition(double thePosition);
virtual
- vtkFloatingPointType
+ double
GetPosition();
virtual
CutWithPlanes(vtkAppendPolyData* theAppendPolyData,
vtkDataSet* theDataSet,
int theNbPlanes,
- vtkFloatingPointType theDir[3],
- vtkFloatingPointType theBounds[6],
- vtkFloatingPointType thePlanePosition,
+ double theDir[3],
+ double theBounds[6],
+ double thePlanePosition,
int thePlaneCondition,
- vtkFloatingPointType theDisplacement);
+ double theDisplacement);
protected:
VISU_CutLinesPL();
DoShallowCopy(VISU_PipeLine *thePipeLine,
bool theIsCopyInput);
- vtkFloatingPointType myPosition;
+ double myPosition;
int myCondition;
private:
//#include <vtkUnstructuredGrid.h>
-static vtkFloatingPointType EPS = 1.0E-3;
+static double EPS = 1.0E-3;
#ifdef _DEBUG_
static int MYDEBUG = 0;
SetPartPosition();
- vtkFloatingPointType aDir[3];
+ double aDir[3];
GetDir(aDir,
myAng[0],
myBasePlane[0]);
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
vtkDataSet* aFilterOutput = GetMergeFilterOutput();
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_CutPlanesPL::
-GetRx(vtkFloatingPointType theRx[3][3],
- vtkFloatingPointType thaAng)
+GetRx(double theRx[3][3],
+ double thaAng)
{
theRx[0][0] = 1.0; theRx[0][1] = 0.0; theRx[0][2] = 0.0;
theRx[1][0] = 0.0; theRx[1][1] = cos(thaAng); theRx[1][2] = -sin(thaAng);
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_CutPlanesPL
-::GetRy(vtkFloatingPointType theRy[3][3],
- vtkFloatingPointType thaAng)
+::GetRy(double theRy[3][3],
+ double thaAng)
{
theRy[0][0] = cos(thaAng); theRy[0][1] = 0.0; theRy[0][2] = sin(thaAng);
theRy[1][0] = 0.0; theRy[1][1] = 1.0; theRy[1][2] = 0.0;
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_CutPlanesPL
-::GetRz(vtkFloatingPointType theRz[3][3],
- vtkFloatingPointType thaAng)
+::GetRz(double theRz[3][3],
+ double thaAng)
{
theRz[0][0] = cos(thaAng); theRz[0][1] = -sin(thaAng); theRz[0][2] = 0.0;
theRz[1][0] = sin(thaAng); theRz[1][1] = cos(thaAng); theRz[1][2] = 0.0;
//----------------------------------------------------------------------------
void
VISU_CutPlanesPL
-::CorrectPnt(vtkFloatingPointType thePnt[3],
- const vtkFloatingPointType BoundPrj[6])
+::CorrectPnt(double thePnt[3],
+ const double BoundPrj[6])
{
for(int i = 0, j = 0; i < 3; ++i, j=2*i){
if(thePnt[i] < BoundPrj[j]) thePnt[i] = BoundPrj[j];
//----------------------------------------------------------------------------
void
VISU_CutPlanesPL
-::GetBoundProject(vtkFloatingPointType BoundPrj[3],
- const vtkFloatingPointType BoundBox[6],
- const vtkFloatingPointType Dir[3])
+::GetBoundProject(double BoundPrj[3],
+ const double BoundBox[6],
+ const double Dir[3])
{
- vtkFloatingPointType BoundPoints[8][3] = { {BoundBox[0],BoundBox[2],BoundBox[4]},
+ double BoundPoints[8][3] = { {BoundBox[0],BoundBox[2],BoundBox[4]},
{BoundBox[1],BoundBox[2],BoundBox[4]},
{BoundBox[0],BoundBox[3],BoundBox[4]},
{BoundBox[1],BoundBox[3],BoundBox[4]},
{BoundBox[1],BoundBox[3],BoundBox[5]}};
BoundPrj[0] = vtkMath::Dot(Dir,BoundPoints[0]), BoundPrj[1] = BoundPrj[0];
for(int i = 1; i < 8; i++){
- vtkFloatingPointType tmp = vtkMath::Dot(Dir,BoundPoints[i]);
+ double tmp = vtkMath::Dot(Dir,BoundPoints[i]);
if(BoundPrj[1] < tmp) BoundPrj[1] = tmp;
if(BoundPrj[0] > tmp) BoundPrj[0] = tmp;
}
void
VISU_CutPlanesPL
::SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
- vtkFloatingPointType theXAng,
- vtkFloatingPointType theYAng,
+ double theXAng,
+ double theYAng,
int theNum)
{
myBasePlane[theNum] = theOrient;
return myBasePlane[theNum];
}
-vtkFloatingPointType
+double
VISU_CutPlanesPL
::GetRotateX(int theNum)
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_CutPlanesPL
::GetRotateY(int theNum)
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_CutPlanesPL
::GetDisplacement(int theNum)
{
//----------------------------------------------------------------------------
void
VISU_CutPlanesPL
-::SetDisplacement(vtkFloatingPointType theDisp,
+::SetDisplacement(double theDisp,
int theNum)
{
if(VISU::CheckIsSameValue(myDisplacement[theNum], theDisp))
void
VISU_CutPlanesPL
::SetPartPosition(int thePartNumber,
- vtkFloatingPointType thePartPosition)
+ double thePartPosition)
{
if(thePartNumber >= myNbParts)
return;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_CutPlanesPL
::GetPartPosition(int thePartNumber,
int theNum)
if(thePartNumber >= myNbParts)
return 0;
- vtkFloatingPointType aPosition = myPartPosition[thePartNumber];
+ double aPosition = myPartPosition[thePartNumber];
if(myPartCondition[thePartNumber]){
- vtkFloatingPointType aDir[3], aBounds[6], aBoundPrj[3];
+ double aDir[3], aBounds[6], aBoundPrj[3];
if(!IsDeformed())
GetMergedInput()->GetBounds(aBounds);
else
aDir);
if(myNbParts > 1){
- vtkFloatingPointType aDBoundPrj = aBoundPrj[2]/(myNbParts - 1);
- vtkFloatingPointType aDisplacement = aDBoundPrj * myDisplacement[theNum];
- vtkFloatingPointType aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
+ double aDBoundPrj = aBoundPrj[2]/(myNbParts - 1);
+ double aDisplacement = aDBoundPrj * myDisplacement[theNum];
+ double aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
aPosition = aStartPosition + thePartNumber*aDBoundPrj;
}else
aPosition = aBoundPrj[0] + aBoundPrj[2]*myDisplacement[theNum];
//----------------------------------------------------------------------------
void
VISU_CutPlanesPL
-::GetDir(vtkFloatingPointType theDir[3],
- const vtkFloatingPointType theAng[3],
+::GetDir(double theDir[3],
+ const double theAng[3],
const PlaneOrientation& theBasePlane)
{
int iPlane = 0;
- vtkFloatingPointType aRx[3][3], aRy[3][3], aRz[3][3], aRotation[3][3];
+ double aRx[3][3], aRy[3][3], aRz[3][3], aRotation[3][3];
switch(theBasePlane){
case XY:
if(fabs(theAng[0]) > EPS) GetRx(aRx,theAng[0]); else vtkMath::Identity3x3(aRx);
VISU_CutPlanesPL
::CutWithPlane(vtkAppendPolyData* theAppendPolyData,
vtkDataSet* theDataSet,
- vtkFloatingPointType theDir[3],
- vtkFloatingPointType theOrig[3])
+ double theDir[3],
+ double theOrig[3])
{
vtkEDFCutter *aCutPlane = vtkEDFCutter::New();
- aCutPlane->SetInput(theDataSet);
+ aCutPlane->SetInputData(theDataSet);
vtkPlane *aPlane = vtkPlane::New();
aPlane->SetOrigin(theOrig);
aPlane->SetNormal(theDir);
aCutPlane->SetCutFunction(aPlane);
aPlane->Delete();
- theAppendPolyData->AddInput(aCutPlane->GetOutput());
+ theAppendPolyData->AddInputConnection(aCutPlane->GetOutputPort());
aCutPlane->Delete();
}
::CutWithPlanes(vtkAppendPolyData* theAppendPolyData,
vtkDataSet* theDataSet,
int theNbPlanes,
- vtkFloatingPointType theDir[3],
- vtkFloatingPointType theBounds[6],
- const std::vector<vtkFloatingPointType>& thePlanePosition,
+ double theDir[3],
+ double theBounds[6],
+ const std::vector<double>& thePlanePosition,
const std::vector<int>& thePlaneCondition,
- vtkFloatingPointType theDisplacement)
+ double theDisplacement)
{
- vtkFloatingPointType aBoundPrj[3], aOrig[3], aPosition;
+ double aBoundPrj[3], aOrig[3], aPosition;
GetBoundProject(aBoundPrj, theBounds, theDir);
if(theNbPlanes > 1){
- vtkFloatingPointType aDBoundPrj = aBoundPrj[2]/(theNbPlanes - 1);
- vtkFloatingPointType aDisplacement = aDBoundPrj*theDisplacement;
- vtkFloatingPointType aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
+ double aDBoundPrj = aBoundPrj[2]/(theNbPlanes - 1);
+ double aDisplacement = aDBoundPrj*theDisplacement;
+ double aStartPosition = aBoundPrj[0] - 0.5*aDBoundPrj + aDisplacement;
for (int i = 0; i < theNbPlanes; i++){
aPosition = aStartPosition + i*aDBoundPrj;
if(thePlaneCondition[i]){
CutWithPlane(theAppendPolyData,theDataSet,theDir,aOrig);
}
vtkPolyData *aPolyData = theAppendPolyData->GetOutput();
- aPolyData->Update();
theAppendPolyData->Update();
}
}
//----------------------------------------------------------------------------
-void VISU_CutPlanesPL::SetMapScale(vtkFloatingPointType theMapScale){
+void VISU_CutPlanesPL::SetMapScale(double theMapScale){
Superclass::SetMapScale(theMapScale);
if(IsDeformed())
VISU_OptionalDeformationPL::SetMapScale(theMapScale);
virtual
void
SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
- vtkFloatingPointType theXAng,
- vtkFloatingPointType theYAng,
+ double theXAng,
+ double theYAng,
int theNum = 0);
virtual
GetPlaneOrientation(int theNum = 0);
virtual
- vtkFloatingPointType
+ double
GetRotateX(int theNum = 0);
virtual
- vtkFloatingPointType
+ double
GetRotateY(int theNum = 0);
virtual
- vtkFloatingPointType
+ double
GetDisplacement(int theNum = 0);
virtual
void
- SetDisplacement(vtkFloatingPointType theDisp,
+ SetDisplacement(double theDisp,
int theNum = 0);
virtual
void
SetPartPosition(int thePartNumber,
- vtkFloatingPointType thePartPosition);
+ double thePartPosition);
virtual
- vtkFloatingPointType
+ double
GetPartPosition(int thePartNumber,
int theNum = 0);
public:
static
- vtkFloatingPointType*
- GetRx(vtkFloatingPointType theRx[3][3],
- vtkFloatingPointType thaAng);
+ double*
+ GetRx(double theRx[3][3],
+ double thaAng);
static
- vtkFloatingPointType*
- GetRy(vtkFloatingPointType theRy[3][3],
- vtkFloatingPointType thaAng);
+ double*
+ GetRy(double theRy[3][3],
+ double thaAng);
static
- vtkFloatingPointType*
- GetRz(vtkFloatingPointType theRz[3][3],
- vtkFloatingPointType thaAng);
+ double*
+ GetRz(double theRz[3][3],
+ double thaAng);
static
void
- CorrectPnt(vtkFloatingPointType thePnt[3],
- const vtkFloatingPointType BoundPrj[6]);
+ CorrectPnt(double thePnt[3],
+ const double BoundPrj[6]);
static
void
- GetBoundProject(vtkFloatingPointType BoundPrj[3],
- const vtkFloatingPointType BoundBox[6],
- const vtkFloatingPointType Dir[3]);
+ GetBoundProject(double BoundPrj[3],
+ const double BoundBox[6],
+ const double Dir[3]);
static
void
- GetDir(vtkFloatingPointType theDir[3],
- const vtkFloatingPointType theAng[3],
+ GetDir(double theDir[3],
+ const double theAng[3],
const PlaneOrientation& theBasePlane);
static
void
CutWithPlane(vtkAppendPolyData* theAppendPolyData,
vtkDataSet* theDataSet,
- vtkFloatingPointType theDir[3],
- vtkFloatingPointType theOrig[3]);
+ double theDir[3],
+ double theOrig[3]);
static
void
CutWithPlanes(vtkAppendPolyData* theAppendPolyData,
vtkDataSet* theDataSet,
int theNbPlanes,
- vtkFloatingPointType theDir[3],
- vtkFloatingPointType theBounds[6],
- const std::vector<vtkFloatingPointType>& thePlanePosition,
+ double theDir[3],
+ double theBounds[6],
+ const std::vector<double>& thePlanePosition,
const std::vector<int>& thePlaneCondition,
- vtkFloatingPointType theDisplacement);
+ double theDisplacement);
virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper);
VISU::PUnstructuredGridIDMapper getVectorialField();
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
protected:
int myNbParts;
PlaneOrientation myBasePlane[2];
- vtkFloatingPointType myAng[2][3], myDisplacement[2];
+ double myAng[2][3], myDisplacement[2];
vtkAppendPolyData *myAppendPolyData;
- std::vector<vtkFloatingPointType> myPartPosition;
+ std::vector<double> myPartPosition;
std::vector<int> myPartCondition;
private:
Superclass::DoShallowCopy(thePipeLine, theIsCopyInput);
if(VISU_CutSegmentPL *aPipeLine = dynamic_cast<VISU_CutSegmentPL*>(thePipeLine)){
- vtkFloatingPointType x, y, z;
+ double x, y, z;
aPipeLine->GetPoint1(x, y, z);
SetPoint1(x, y, z);
aPipeLine->GetPoint2(x, y, z);
{
Superclass::Init();
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
GetMergedInput()->GetBounds(aBounds);
for( int i = 0; i < 3; i++ ) {
- vtkFloatingPointType min = aBounds[ 2*i ];
- vtkFloatingPointType max = aBounds[ 2*i+1 ];
+ double min = aBounds[ 2*i ];
+ double max = aBounds[ 2*i+1 ];
myPoint1[ i ] = i == 1 ? min : ( min + max ) / 2;
myPoint2[ i ] = i == 1 ? max : ( min + max ) / 2;
}
//----------------------------------------------------------------------------
void
VISU_CutSegmentPL
-::SetPoint1(vtkFloatingPointType theX,
- vtkFloatingPointType theY,
- vtkFloatingPointType theZ )
+::SetPoint1(double theX,
+ double theY,
+ double theZ )
{
myPoint1[0] = theX;
myPoint1[1] = theY;
//----------------------------------------------------------------------------
void
VISU_CutSegmentPL
-::GetPoint1(vtkFloatingPointType& theX,
- vtkFloatingPointType& theY,
- vtkFloatingPointType& theZ )
+::GetPoint1(double& theX,
+ double& theY,
+ double& theZ )
{
theX = myPoint1[0];
theY = myPoint1[1];
//----------------------------------------------------------------------------
void
VISU_CutSegmentPL
-::SetPoint2(vtkFloatingPointType theX,
- vtkFloatingPointType theY,
- vtkFloatingPointType theZ )
+::SetPoint2(double theX,
+ double theY,
+ double theZ )
{
myPoint2[0] = theX;
myPoint2[1] = theY;
//----------------------------------------------------------------------------
void
VISU_CutSegmentPL
-::GetPoint2(vtkFloatingPointType& theX,
- vtkFloatingPointType& theY,
- vtkFloatingPointType& theZ )
+::GetPoint2(double& theX,
+ double& theY,
+ double& theZ )
{
theX = myPoint2[0];
theY = myPoint2[1];
if(VISU::IsQuadraticData(aMergedInput)) // Bug 0020123, note 0005343
throw std::runtime_error("Impossible to build presentation");
- vtkFloatingPointType aVector12[3], aVector21[3];
+ double aVector12[3], aVector21[3];
VISU::Sub( myPoint2, myPoint1, aVector12 );
VISU::Sub( myPoint1, myPoint2, aVector21 );
// compute two vectors which are orthogonal to the line between the input points
// these vectors could be used as normals of two planes, intersected exactly at this line
// origin of these planes should be places at one of the input points
- vtkFloatingPointType aVector1[3], aVector2[3];
+ double aVector1[3], aVector2[3];
vtkMath::Perpendiculars( aVector12, aVector1, aVector2, 0 );
ClearAppendPolyData(myAppendPolyData);
SetPartPosition(1);
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
GetMergedInput()->GetBounds(aBounds);
// check if the input is planar - in this case one cut plane will be enough
// (besides, the second cut corrupts the resulting output, splitting it to points)
bool isPlanar = true;
- vtkFloatingPointType aNormal[3] = { 0.0, 0.0, 0.0 };
+ double aNormal[3] = { 0.0, 0.0, 0.0 };
if( fabs( aBounds[0] - aBounds[1] ) < aPrecision )
aNormal[0] = 1.0;
else if( fabs( aBounds[2] - aBounds[3] ) < aPrecision )
if( isPlanar ) {
// choose a vector which is not collinear with normal of the plane
- vtkFloatingPointType aCross[3];
+ double aCross[3];
vtkMath::Cross( aVector1, aNormal, aCross );
bool isFirst = vtkMath::Norm( aCross ) > aPrecision;
VISU_CutPlanesPL::CutWithPlane(myAppendPolyData, GetMergedInput(), isFirst ? aVector1 : aVector2, myPoint1);
VISU_CutPlanesPL::CutWithPlane(anAppendPolyData, GetMergedInput(), aVector1, myPoint1);
vtkDataSet *aDataSet = anAppendPolyData->GetOutput();
- aDataSet->Update();
+ anAppendPolyData->Update();
VISU_CutPlanesPL::CutWithPlane(myAppendPolyData, aDataSet, aVector2, myPoint1);
myAppendPolyData->Update();
virtual
void
- SetPoint1(vtkFloatingPointType theX,
- vtkFloatingPointType theY,
- vtkFloatingPointType theZ);
+ SetPoint1(double theX,
+ double theY,
+ double theZ);
virtual
void
- GetPoint1(vtkFloatingPointType& theX,
- vtkFloatingPointType& theY,
- vtkFloatingPointType& theZ);
+ GetPoint1(double& theX,
+ double& theY,
+ double& theZ);
virtual
void
- SetPoint2(vtkFloatingPointType theX,
- vtkFloatingPointType theY,
- vtkFloatingPointType theZ);
+ SetPoint2(double theX,
+ double theY,
+ double theZ);
virtual
void
- GetPoint2(vtkFloatingPointType& theX,
- vtkFloatingPointType& theY,
- vtkFloatingPointType& theZ);
+ GetPoint2(double& theX,
+ double& theY,
+ double& theZ);
public:
virtual
DoShallowCopy(VISU_PipeLine *thePipeLine,
bool theIsCopyInput);
- vtkFloatingPointType myPoint1[3];
- vtkFloatingPointType myPoint2[3];
+ double myPoint1[3];
+ double myPoint2[3];
private:
VISU_CutSegmentPL(const VISU_CutSegmentPL&); // Not implemented.
VISU_DataSetMapperHolder
::SetElnoDisassembleState( bool theIsShrunk )
{
- vtkFloatingPointType aShrinkFactor = std::abs( myElnoDisassembleFilter->GetShrinkFactor() );
+ double aShrinkFactor = std::abs( myElnoDisassembleFilter->GetShrinkFactor() );
if ( theIsShrunk )
myElnoDisassembleFilter->SetShrinkFactor( aShrinkFactor );
else
VISU_DataSetMapperHolder
::SetUnstructuredGridIDMapper(const VISU::PUnstructuredGridIDMapper& theIDMapper)
{
- myElnoDisassembleFilter->SetInput( theIDMapper->GetUnstructuredGridOutput() );
- myExtractGeometry->SetInput( myElnoDisassembleFilter->GetOutput() );
+ myElnoDisassembleFilter->SetInputData( theIDMapper->GetUnstructuredGridOutput() );
+ myExtractGeometry->SetInputConnection( myElnoDisassembleFilter->GetOutputPort() );
myUnstructuredGridIDMapper = theIDMapper;
SetIDMapper( theIDMapper );
}
}
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_DataSetMapperHolder
::GetNodeCoord(vtkIdType theObjID)
{
GetNodeVTKID(vtkIdType theID);
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
virtual
myCellDataToPointData = VISU_CellDataToPointData::New();
myCellDataToPointData->PassCellDataOn();
- myInputPassFilter->SetInput(vtkUnstructuredGrid::New());
+ myInputPassFilter->SetInputData(vtkUnstructuredGrid::New());
- myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
+ myCellDataToPointData->SetInputConnection(myInputPassFilter->GetOutputPort());
- myWarpVector->SetInput(myCellDataToPointData->GetOutput());
+ myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
- myOutputPassFiler->SetInput(myWarpVector->GetOutput());
+ myOutputPassFiler->SetInputConnection(myWarpVector->GetOutputPort());
}
//----------------------------------------------------------------------------
}
//----------------------------------------------------------------------------
-void VISU_DeformationPL::SetScale(vtkFloatingPointType theScaleFactor)
+void VISU_DeformationPL::SetScale(double theScaleFactor)
{
if(myScaleFactor == theScaleFactor)
return;
myWarpVector->SetScaleFactor(myScaleFactor*myMapScaleFactor);
}
-void VISU_DeformationPL::SetMapScale(vtkFloatingPointType theMapScaleFactor)
+void VISU_DeformationPL::SetMapScale(double theMapScaleFactor)
{
if(myMapScaleFactor == theMapScaleFactor)
return;
}
-vtkFloatingPointType VISU_DeformationPL::GetScale()
+double VISU_DeformationPL::GetScale()
{
return myScaleFactor;
}
//----------------------------------------------------------------------------
void VISU_DeformationPL::SetWarpVectorInput(vtkDataSet *theInput)
{
- myInputPassFilter->SetInput(theInput);
+ myInputPassFilter->SetInputData(theInput);
}
//----------------------------------------------------------------------------
}
//----------------------------------------------------------------------------
-vtkFloatingPointType VISU_DeformationPL::GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine)
+double VISU_DeformationPL::GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine)
{
if(!thePipeLine || !thePipeLine->GetMergeFilterOutput())
return 0.0;
- vtkFloatingPointType aSourceRange[2];
+ double aSourceRange[2];
thePipeLine->GetMergeFilterOutput()->GetScalarRange(aSourceRange);
- static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT;
+ static double EPS = 1.0 / VTK_LARGE_FLOAT;
if(fabs(aSourceRange[1]) > EPS){
vtkDataSet* aDataSet = thePipeLine->GetMergeFilterOutput();
- vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet);
+ double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet);
return aScaleFactor / aSourceRange[1];
}
return 0.0;
virtual ~VISU_DeformationPL();
//-----------------------------------------------------------
- virtual void SetScale(vtkFloatingPointType theScaleFactor);
- virtual void SetMapScale(vtkFloatingPointType theMapScaleFactor);
- virtual vtkFloatingPointType GetScale();
+ virtual void SetScale(double theScaleFactor);
+ virtual void SetMapScale(double theMapScaleFactor);
+ virtual double GetScale();
//-----------------------------------------------------------
virtual void SetVectorialField(VISU::PUnstructuredGridIDMapper theIdMapper) = 0;
long int
GetMTime();
- static vtkFloatingPointType GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine);
+ static double GetDefaultScaleFactor(VISU_DeformationPL *thePipeLine);
void SetWarpVectorInput(vtkDataSet *theInput);
vtkDataSet* GetWarpVectorOutput();
VISU_CellDataToPointData *myCellDataToPointData;
private:
- vtkFloatingPointType myScaleFactor;
- vtkFloatingPointType myMapScaleFactor;
+ double myScaleFactor;
+ double myMapScaleFactor;
};
{
Superclass::Build();
- myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
- GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
+ //myWarpScalar->SetInput( GetFieldTransformFilter()->GetPolyDataOutput() );
+ myWarpScalar->SetInputConnection( GetFieldTransformFilter()->GetOutputPort() ); // OUV_PORTING: to check
+ //GetPolyDataMapper()->SetInput( myWarpScalar->GetPolyDataOutput() );
+ GetPolyDataMapper()->SetInputConnection( myWarpScalar->GetOutputPort() ); // OUV_PORTING: to check
}
VISU_DeformedGridPL
::Update()
{
- vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
+ //vtkPointSet* aPointSet = GetFieldTransformFilter()->GetPolyDataOutput();
+ vtkAlgorithmOutput* aPointSet = GetFieldTransformFilter()->GetOutputPort(); // OUV_PORTING: to check
if ( !myIsContour ) // surface prs
{
- myWarpScalar->SetInput( aPointSet );
+ myWarpScalar->SetInputConnection( aPointSet );
}
else // contour prs
{
- myContourFilter->SetInput( aPointSet );
+ myContourFilter->SetInputConnection( aPointSet );
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
GetSourceRange( aScalarRange );
myContourFilter->GenerateValues( GetNumberOfContours(), aScalarRange );
- myWarpScalar->SetInput( myContourFilter->GetOutput() );
+ myWarpScalar->SetInputConnection( myContourFilter->GetOutputPort() );
}
Superclass::Update();
//----------------------------------------------------------------------------
void
VISU_DeformedGridPL
-::SetScaleFactor(vtkFloatingPointType theScaleFactor)
+::SetScaleFactor(double theScaleFactor)
{
if ( VISU::CheckIsSameValue( myWarpScalar->GetScaleFactor(), theScaleFactor ) )
return;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_DeformedGridPL
::GetScaleFactor()
{
//----------------------------------------------------------------------------
void
VISU_DeformedGridPL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
Superclass::SetMapScale(theMapScale);
myMapScaleFactor = theMapScale;
if ( myIsContour ) {
- vtkFloatingPointType aSourceRange[2];
+ double aSourceRange[2];
GetSourceRange( aSourceRange );
- vtkFloatingPointType aDeltaRange = aSourceRange[1] - aSourceRange[0];
- vtkFloatingPointType aNewRange[2] = { aSourceRange[1] - theMapScale*aDeltaRange, aSourceRange[1] };
+ double aDeltaRange = aSourceRange[1] - aSourceRange[0];
+ double aNewRange[2] = { aSourceRange[1] - theMapScale*aDeltaRange, aSourceRange[1] };
myContourFilter->GenerateValues( GetNumberOfContours(), aNewRange );
}
//----------------------------------------------------------------------------
void
- SetScaleFactor( vtkFloatingPointType theScaleFactor );
+ SetScaleFactor( double theScaleFactor );
- vtkFloatingPointType
+ double
GetScaleFactor();
void
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
//----------------------------------------------------------------------------
virtual
VISU_DeformedGridPL(const VISU_DeformedGridPL&); // Not implemented.
void operator=(const VISU_DeformedGridPL&); // Not implemented.
- vtkFloatingPointType myScaleFactor;
- vtkFloatingPointType myMapScaleFactor;
+ double myScaleFactor;
+ double myMapScaleFactor;
vtkContourFilter* myContourFilter;
vtkWarpScalar *myWarpScalar;
bool myIsContour;
UpdateScalars();
- myScalarsFieldTransform->SetInput(myScalarsExtractor->GetOutput());
+ myScalarsFieldTransform->SetInputConnection(myScalarsExtractor->GetOutputPort());
// Sets geometry for merge filter
myScalarsMergeFilter->SetGeometry(myWarpVector->GetUnstructuredGridOutput());
::UpdateScalars()
{
vtkDataSet* aScalars = GetScalars();
- myScalarsElnoDisassembleFilter->SetInput(aScalars);
- myExtractGeometry->SetInput(myScalarsElnoDisassembleFilter->GetOutput());
- myScalarsExtractor->SetInput(myExtractGeometry->GetOutput());
+ myScalarsElnoDisassembleFilter->SetInputData(aScalars);
+ myExtractGeometry->SetInputConnection(myScalarsElnoDisassembleFilter->GetOutputPort());
+ myScalarsExtractor->SetInputConnection(myExtractGeometry->GetOutputPort());
if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput()))
GetMapper()->SetScalarModeToUseCellData();
*/
void
VISU_DeformedShapeAndScalarMapPL
-::SetScale(vtkFloatingPointType theScale)
+::SetScale(double theScale)
{
if(VISU::CheckIsSameValue(myScaleFactor, theScale))
return;
/*!
* Gets scale of deformed shape.
*/
-vtkFloatingPointType
+double
VISU_DeformedShapeAndScalarMapPL
::GetScale()
{
*/
void
VISU_DeformedShapeAndScalarMapPL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
myMapScaleFactor = theMapScale;
Superclass::SetMapScale(theMapScale);
//----------------------------------------------------------------------------
void
VISU_DeformedShapeAndScalarMapPL
-::SetScalarRange(vtkFloatingPointType theRange[2])
+::SetScalarRange(double theRange[2])
{
if (isnan(theRange[0]) || isnan(theRange[1]))
throw std::runtime_error("NAN values in the presentation");
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_DeformedShapeAndScalarMapPL
::GetScalarRange()
{
*/
void
VISU_DeformedShapeAndScalarMapPL
-::GetSourceRange(vtkFloatingPointType theRange[2])
+::GetSourceRange(double theRange[2])
{
myScalarsExtractor->Update();
myScalarsExtractor->GetUnstructuredGridOutput()->GetScalarRange(theRange);
virtual
void
- SetScale(vtkFloatingPointType theScale);
+ SetScale(double theScale);
virtual
- vtkFloatingPointType
+ double
GetScale();
virtual
virtual
void
- SetScalarRange(vtkFloatingPointType theRange[2]);
+ SetScalarRange(double theRange[2]);
virtual
- vtkFloatingPointType*
+ double*
GetScalarRange();
virtual
void
- GetSourceRange(vtkFloatingPointType theRange[2]);
+ GetSourceRange(double theRange[2]);
virtual
void
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
protected:
VISU_DeformedShapeAndScalarMapPL();
private:
VISU_DeformedShapeAndScalarMapPL(const VISU_DeformedShapeAndScalarMapPL&);
- vtkFloatingPointType myScaleFactor;
- vtkFloatingPointType myMapScaleFactor;
+ double myScaleFactor;
+ double myMapScaleFactor;
vtkWarpVector *myWarpVector;
VISU_MergeFilter *myScalarsMergeFilter;
vtkSmartPointer<vtkUnstructuredGrid> myScalars;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_DeformedShapePL
::GetScaleFactor(vtkDataSet* theDataSet)
{
if(!theDataSet)
return 0.0;
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
int aNbCells = theDataSet->GetNumberOfCells();
int aNbPoints = theDataSet->GetNumberOfPoints();
int aNbElem = aNbCells? aNbCells: aNbPoints;
- vtkFloatingPointType* aBounds = theDataSet->GetBounds();
- vtkFloatingPointType aVolume = 1, aVol, idim = 0;
+ double* aBounds = theDataSet->GetBounds();
+ double aVolume = 1, aVol, idim = 0;
for(int i = 0; i < 6; i += 2){
aVol = fabs(aBounds[i+1] - aBounds[i]);
if(aVol > 0) {
if( aNbElem == 0 || fabs(idim) < 1.0 / VTK_LARGE_FLOAT )
return 0.0; // to avoid division by zero
aVolume /= aNbElem;
- return pow(aVolume, vtkFloatingPointType(1.0/idim));
+ return pow(aVolume, double(1.0/idim));
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_DeformedShapePL
::GetDefaultScale(VISU_ScalarMapPL* theScalarMapPL)
{
- vtkFloatingPointType aSourceRange[2];
+ double aSourceRange[2];
theScalarMapPL->GetSourceRange(aSourceRange);
- static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT;
+ static double EPS = 1.0 / VTK_LARGE_FLOAT;
if(fabs(aSourceRange[1]) > EPS){
vtkDataSet* aDataSet = theScalarMapPL->GetMergedInput();
- vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet);
+ double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor(aDataSet);
return aScaleFactor / aSourceRange[1];
}
return 0.0;
//----------------------------------------------------------------------------
void
VISU_DeformedShapePL
-::SetScale(vtkFloatingPointType theScale)
+::SetScale(double theScale)
{
if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), theScale))
return;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_DeformedShapePL
::GetScale()
{
//----------------------------------------------------------------------------
void
VISU_DeformedShapePL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
myMapScaleFactor = theMapScale;
Superclass::SetMapScale(theMapScale);
- vtkFloatingPointType aMapScale = myScaleFactor * theMapScale;
+ double aMapScale = myScaleFactor * theMapScale;
if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), aMapScale))
return;
//----------------------------------------------------------------------------
virtual
void
- SetScale(vtkFloatingPointType theScale);
+ SetScale(double theScale);
virtual
- vtkFloatingPointType
+ double
GetScale();
public:
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
static
- vtkFloatingPointType
+ double
GetScaleFactor(vtkDataSet* theDataSet);
static
- vtkFloatingPointType
+ double
GetDefaultScale(VISU_ScalarMapPL* theScalarMapPL);
protected:
DoShallowCopy(VISU_PipeLine *thePipeLine,
bool theIsCopyInput);
- vtkFloatingPointType myScaleFactor;
- vtkFloatingPointType myMapScaleFactor;
+ double myScaleFactor;
+ double myMapScaleFactor;
vtkWarpVector *myWarpVector;
VISU_CellDataToPointData* myCellDataToPointData;
//----------------------------------------------------------------------------
-void VISU_ElnoDisassembleFilter::SetShrinkFactor( vtkFloatingPointType theValue )
+void VISU_ElnoDisassembleFilter::SetShrinkFactor( double theValue )
{
if ( VISU::CheckIsSameValue( theValue, myShrinkFactor ) )
return;
//----------------------------------------------------------------------------
-vtkFloatingPointType VISU_ElnoDisassembleFilter::GetShrinkFactor()
+double VISU_ElnoDisassembleFilter::GetShrinkFactor()
{
return myShrinkFactor;
}
vtkUnstructuredGrid *myOutput;
vtkDataArray *myElnoDataArray;
vtkDataArray *myElnoDataMapper;
- vtkFloatingPointType myShrinkFactor;
+ double myShrinkFactor;
typedef typename VISU::TL::TEnum2VTKArrayType< points_type >::TResult TPointsDataArray;
typedef typename VISU::TL::TEnum2VTKBasicType< points_type >::TResult TPointsDataType;
vtkUnstructuredGrid *theOutput,
vtkDataArray *theElnoDataArray,
vtkDataArray *theElnoDataMapper,
- vtkFloatingPointType theShrinkFactor )
+ double theShrinkFactor )
: myGetElnoNodeData( theElnoDataArray, theElnoDataMapper )
, myInput( theInput )
, myOutput( theOutput )
vtkUnstructuredGrid *theOutput,
vtkDataArray *theElnoDataArray,
vtkDataArray *theElnoDataMapper,
- vtkFloatingPointType theShrinkFactor )
+ double theShrinkFactor )
{
TExecute2< points_type, elno_type >( theInput,
theOutput,
vtkUnstructuredGrid *theOutput,
vtkDataArray *theElnoDataArray,
vtkDataArray *theElnoDataMapper,
- vtkFloatingPointType theShrinkFactor )
+ double theShrinkFactor )
{
switch( theElnoDataArray->GetDataType() ){
case VTK_DOUBLE:
static VISU_ElnoDisassembleFilter *New();
- void SetShrinkFactor( vtkFloatingPointType theValue );
- vtkFloatingPointType GetShrinkFactor();
+ void SetShrinkFactor( double theValue );
+ double GetShrinkFactor();
protected:
VISU_ElnoDisassembleFilter();
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
- vtkFloatingPointType myShrinkFactor;
+ double myShrinkFactor;
private:
VISU_ElnoDisassembleFilter(const VISU_ElnoDisassembleFilter&); // Not implemented.
}
//----------------------------------------------------------------------------
-vtkFloatingPointType CutValue (vtkFloatingPointType theValue, int theDecimals)
+double CutValue (double theValue, int theDecimals)
{
- vtkFloatingPointType v = theValue;
+ double v = theValue;
#if defined(USE_SPRINTF)
char aFormat[16];
// VSR 19/10/2009: old algorithm uses long long type -
// causes incompatibility with some platforms (Windows?)
//
- vtkFloatingPointType aDegree = 0.0;
+ double aDegree = 0.0;
if (abs((long long)v) > 1)
aDegree = (long long)log10((double)abs((long long)v)) + 1;
aDegree = theDecimals - aDegree;
//printf("$$$ 1 v = %.20g , aDegree = %lld \n", v, (long long)aDegree);
aDegree = pow(10, aDegree);
- v = ((vtkFloatingPointType)((long long)(v * aDegree))) / aDegree;
+ v = ((double)((long long)(v * aDegree))) / aDegree;
//printf("$$$ 2 v = %.20g , aDegree = %lld \n", v, (long long)aDegree);
#endif
vtkIdType theNbOfTuples)
{
vtkIdType aNbComp = theInputDataArray->GetNumberOfComponents();
- std::vector<vtkFloatingPointType> anArray(aNbComp < 3? 3: aNbComp);
+ std::vector<double> anArray(aNbComp < 3? 3: aNbComp);
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
theInputDataArray->GetTuple(aTupleId, &anArray[0]);
- vtkFloatingPointType aVector[3] = {anArray[0], anArray[1], anArray[2]};
- vtkFloatingPointType aScalar = sqrt(aVector[0]*aVector[0] +
+ double aVector[3] = {anArray[0], anArray[1], anArray[2]};
+ double aScalar = sqrt(aVector[0]*aVector[0] +
aVector[1]*aVector[1] +
aVector[2]*aVector[2]);
*theOutputPtr = TValueType(aScalar);
vtkIdType aNbComp = theInputDataArray->GetNumberOfComponents();
if (aNbComp != 3) // Min, Max, Avg
return;
- std::vector<vtkFloatingPointType> anArray (3);
+ std::vector<double> anArray (3);
for (vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++) {
theInputDataArray->GetTuple(aTupleId, &anArray[0]);
switch (theGaussMetric) {
vtkDataArray* aFieldArrayMOD = theInputData->GetArray("VISU_FIELD_GAUSS_MOD");
if (aFieldArrayMOD) {
switch (anInputDataType) {
- vtkTemplateMacro4(Module2ScalarsMOD,
+ vtkTemplateMacro(Module2ScalarsMOD(
aFieldArrayMOD,
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
- theGaussMetric);
+ theGaussMetric));
default:
break;
}
}
else {
switch (anInputDataType) {
- vtkTemplateMacro3(Module2Scalars,
+ vtkTemplateMacro(Module2Scalars(
aFieldArray,
(VTK_TT *)(anOutputPtr),
- theNbOfTuples);
+ theNbOfTuples));
default:
break;
}
}
} else {
switch (anInputDataType) {
- vtkTemplateMacro5(Component2Scalars,
+ vtkTemplateMacro(Component2Scalars(
aFieldArray,
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
- theScalarMode - 1);
+ theScalarMode - 1));
default:
break;
}
int aDecimals = std::abs( aResourceMgr->integerValue("VISU", "visual_data_precision", 6) );
switch(aDataType) {
- vtkTemplateMacro3(CutScalarsTempl,
+ vtkTemplateMacro(CutScalarsTempl(
(VTK_TT *)(aPtr),
theNbOfTuples,
- aDecimals);
+ aDecimals));
default:
break;
}
#include <vtkInformation.h>
#include <vtkInformationVector.h>
-static vtkFloatingPointType Tolerance = 1.0 / VTK_LARGE_FLOAT;
+static double Tolerance = 1.0 / VTK_LARGE_FLOAT;
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_FieldTransform);
//----------------------------------------------------------------------------
void
VISU_FieldTransform
-::SetScalarRange(vtkFloatingPointType theScalarRange[2])
+::SetScalarRange(double theScalarRange[2])
{
if(VISU::CheckIsSameRange(theScalarRange, myScalarRange))
return;
//----------------------------------------------------------------------------
void
VISU_FieldTransform
-::SetScalarMin(vtkFloatingPointType theValue)
+::SetScalarMin(double theValue)
{
- vtkFloatingPointType aScalarRange[2] = {theValue, GetScalarRange()[1]};
+ double aScalarRange[2] = {theValue, GetScalarRange()[1]};
SetScalarRange(aScalarRange);
}
//----------------------------------------------------------------------------
void
VISU_FieldTransform
-::SetScalarMax(vtkFloatingPointType theValue)
+::SetScalarMax(double theValue)
{
- vtkFloatingPointType aScalarRange[2] = {GetScalarRange()[0], theValue};
+ double aScalarRange[2] = {GetScalarRange()[0], theValue};
SetScalarRange(aScalarRange);
}
LinearTransformVectors(TValueType* theInputPtr,
TValueType* theOutputPtr,
vtkIdType theNbOfTuples,
- vtkFloatingPointType theScale[3])
+ double theScale[3])
{
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
for(vtkIdType aComponentId = 0; aComponentId < 3; aComponentId++){
TValueType* theInputPtr,
TValueType* theOutputPtr,
vtkIdType theNbOfTuples,
- vtkFloatingPointType theScale[3],
+ double theScale[3],
VISU_FieldTransform::TTransformFun theFunction,
- vtkFloatingPointType theModifiedScalarMin,
- vtkFloatingPointType theModifiedScalarDelta,
- vtkFloatingPointType theSourceScalarMax)
+ double theModifiedScalarMin,
+ double theModifiedScalarDelta,
+ double theSourceScalarMax)
{
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
- vtkFloatingPointType anInputVector[3];
+ double anInputVector[3];
theInputVectors->GetTuple(aTupleId, anInputVector);
- vtkFloatingPointType aMagnification = vtkMath::Norm(anInputVector);
+ double aMagnification = vtkMath::Norm(anInputVector);
if(aMagnification > Tolerance)
aMagnification =
((*theFunction)(aMagnification) - theModifiedScalarMin) /
void
ExecuteVectors(VISU_FieldTransform::TTransformFun theFunction,
VTKViewer_Transform* theTransform,
- vtkFloatingPointType theScalarRange[2],
+ double theScalarRange[2],
vtkIdType theNbOfTuples,
TDataSetAttributesType* theInputData,
TDataSetAttributesType* theOutputData)
if(!anInputVectors || theNbOfTuples < 1)
return;
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
aScalarRange[0] = (*theFunction)(theScalarRange[0]);
aScalarRange[1] = (*theFunction)(theScalarRange[1]);
- vtkFloatingPointType aScalarDelta = aScalarRange[1] - aScalarRange[0];
- vtkFloatingPointType aScale[3] = {1.0, 1.0, 1.0};
+ double aScalarDelta = aScalarRange[1] - aScalarRange[0];
+ double aScale[3] = {1.0, 1.0, 1.0};
if(theTransform){
aScale[0] = theTransform->GetScale()[0];
if(theFunction == &(VISU_FieldTransform::Ident)){
switch(anInputDataType){
- vtkTemplateMacro4(LinearTransformVectors,
+ vtkTemplateMacro(LinearTransformVectors(
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
- aScale);
+ aScale));
default:
break;
}
}else{
switch(anInputDataType){
- vtkTemplateMacro9(NonLinearTransformVectors,
+ vtkTemplateMacro(NonLinearTransformVectors(
anInputVectors,
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theFunction,
aScalarRange[0],
aScalarDelta,
- theScalarRange[1]);
+ theScalarRange[1]));
default:
break;
}
TValueType* theOutputPtr,
vtkIdType theNbOfTuples,
VISU_FieldTransform::TTransformFun theFunction,
- vtkFloatingPointType theModifiedScalarMin)
+ double theModifiedScalarMin)
{
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
- vtkFloatingPointType aScalar = (*theFunction)(vtkFloatingPointType(*theInputPtr));
+ double aScalar = (*theFunction)(double(*theInputPtr));
if(aScalar < theModifiedScalarMin)
aScalar = theModifiedScalarMin;
*theOutputPtr = TValueType(aScalar);
template<typename TDataSetAttributesType>
void
ExecuteScalars(VISU_FieldTransform::TTransformFun theFunction,
- vtkFloatingPointType theScalarRange[2],
+ double theScalarRange[2],
vtkIdType theNbOfTuples,
TDataSetAttributesType* theInputData,
TDataSetAttributesType* theOutputData)
if(!anInputScalars || theNbOfTuples < 1)
return;
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
aScalarRange[0] = (*theFunction)(theScalarRange[0]);
aScalarRange[1] = (*theFunction)(theScalarRange[1]);
void *anOutputPtr = anOutputScalars->GetVoidPointer(0);
switch(anInputDataType){
- vtkTemplateMacro6(NonLinearTransformScalars,
+ vtkTemplateMacro(NonLinearTransformScalars(
anInputScalars,
(VTK_TT *)(anInputPtr),
(VTK_TT *)(anOutputPtr),
theNbOfTuples,
theFunction,
- aScalarRange[0]);
+ aScalarRange[0]));
default:
break;
}
return myTransform;
}
- vtkFloatingPointType*
+ double*
GetScalarRange()
{
return myScalarRange;
}
void
- SetScalarRange(vtkFloatingPointType theScalarRange[2]);
+ SetScalarRange(double theScalarRange[2]);
void
- SetScalarMin(vtkFloatingPointType theValue);
+ SetScalarMin(double theValue);
void
- SetScalarMax(vtkFloatingPointType theValue);
+ SetScalarMax(double theValue);
protected:
VISU_FieldTransform();
VTKViewer_Transform *myTransform;
TTransformFun myFunction;
- vtkFloatingPointType myScalarRange[2];
+ double myScalarRange[2];
private:
VISU_FieldTransform(const VISU_FieldTransform&);
mySphereSource = vtkSphereSource::New();
mySphereSource->SetThetaResolution( 8 );
mySphereSource->SetPhiResolution( 8 );
- myGlyph->SetSource( mySphereSource->GetOutput() );
+ myGlyph->SetSourceConnection( mySphereSource->GetOutputPort() );
for(int i = 0; i < 3; i++)
myPassFilter.push_back(vtkPassThroughFilter::New());
void
CopyGlyph( vtkGlyph3D* theSource, vtkGlyph3D* theDestination )
{
- vtkFloatingPointType* aSourceRange = theSource->GetRange();
- vtkFloatingPointType* aDestinationRange = theDestination->GetRange();
+ double* aSourceRange = theSource->GetRange();
+ double* aDestinationRange = theDestination->GetRange();
if(!VISU::CheckIsSameRange(aDestinationRange, aSourceRange))
theDestination->SetRange( aSourceRange );
SetIsDeformed( aPipeLine->GetIsDeformed() );
SetScale( aPipeLine->GetScale() );
- vtkFloatingPointType aRadius = aPipeLine->mySphereSource->GetRadius();
+ double aRadius = aPipeLine->mySphereSource->GetRadius();
if(!VISU::CheckIsSameValue(mySphereSource->GetRadius(), aRadius))
mySphereSource->SetRadius( aRadius );
//SetExtractInside(false);
vtkDataSet* aDataSet = GetParentMesh();
- vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
+ double aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
- vtkFloatingPointType* aScalarRange = GetScalarRange();
+ double* aScalarRange = GetScalarRange();
static double EPS = 1.0 / VTK_LARGE_FLOAT;
if(fabs(aScalarRange[1]) > EPS)
SetScale( aScaleFactor / aScalarRange[1] );
myMergeFilter->SetGaussPtsIDMapper(GetGaussPtsIDMapper());
- myPassFilter[0]->SetInput(InsertCustomPL());
+ myPassFilter[0]->SetInputData(InsertCustomPL());
- myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
+ myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
// Geometrical Sphere
- myPassFilter[2]->SetInput(myPassFilter[1]->GetOutput());
+ myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
- GetPointSpriteMapper()->SetInput( myPassFilter[2]->GetPolyDataOutput() );
+ //GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetPolyDataOutput() );
+ GetPointSpriteMapper()->SetInputConnection( myPassFilter[2]->GetOutputPort() ); // OUV_PORTING: to check
// Update according the current state
SetIsDeformed(GetIsDeformed());
{
if(IsExternalGeometryUsed() || GetNumberOfGeometry() > 1 ){
myMergeFilter->Update();
- myPassFilter[0]->SetInput(myMergeFilter->GetOutput());
+ myPassFilter[0]->SetInputConnection(myMergeFilter->GetOutputPort());
}
else{
- myPassFilter[0]->SetInput(GetFieldTransformFilter()->GetOutput());
+ myPassFilter[0]->SetInputConnection(GetFieldTransformFilter()->GetOutputPort());
}
SetAverageCellSize( VISU_DeformedShapePL::GetScaleFactor( GetParentMesh() ) );
VISU_GaussPointsPL
::UpdateGlyph()
{
- vtkFloatingPointType* aScalarRange = GetScalarRange();
+ double* aScalarRange = GetScalarRange();
if( GetPointSpriteMapper()->GetPointSpriteMode() == 0 ) // Results
{
myGlyph->SetScaleModeToScaleByScalar();
myGlyph->SetColorModeToColorByScalar();
- vtkFloatingPointType aScaleFactor = 0.0;
- vtkFloatingPointType aMinSize = GetMinSize();
- vtkFloatingPointType aMaxSize = GetMaxSize();
+ double aScaleFactor = 0.0;
+ double aMinSize = GetMinSize();
+ double aMaxSize = GetMaxSize();
if(!VISU::CheckIsSameValue(aMaxSize, aMinSize))
aScaleFactor = ( aScalarRange[1] - aScalarRange[0] ) / ( aMaxSize - aMinSize );
- vtkFloatingPointType aMinRange = aScalarRange[0] - aMinSize * aScaleFactor;
- vtkFloatingPointType aMaxRange = aMinRange + aScaleFactor;
- vtkFloatingPointType aRange[2] = {aMinRange, aMaxRange};
+ double aMinRange = aScalarRange[0] - aMinSize * aScaleFactor;
+ double aMaxRange = aMinRange + aScaleFactor;
+ double aRange[2] = {aMinRange, aMaxRange};
if(!VISU::CheckIsSameRange(myGlyph->GetRange(), aRange))
myGlyph->SetRange( aRange );
myGlyph->SetScaleModeToDataScalingOff();
myGlyph->SetColorModeToColorByScale();
- vtkFloatingPointType aScaleFactor = GetSize();
+ double aScaleFactor = GetSize();
if(!VISU::CheckIsSameValue(myGlyph->GetScaleFactor(), aScaleFactor))
myGlyph->SetScaleFactor( aScaleFactor );
}
myGlyph->SetScaleModeToDataScalingOff();
myGlyph->SetColorModeToColorByScalar();
- vtkFloatingPointType aScaleFactor = GetSize();
+ double aScaleFactor = GetSize();
if(!VISU::CheckIsSameValue(myGlyph->GetScaleFactor(), aScaleFactor))
myGlyph->SetScaleFactor( aScaleFactor );
}
- vtkFloatingPointType aRadius = GetMagnification() * GetAverageCellSize() / 2.0;
+ double aRadius = GetMagnification() * GetAverageCellSize() / 2.0;
if(!VISU::CheckIsSameValue(mySphereSource->GetRadius(), aRadius))
mySphereSource->SetRadius( aRadius );
}
VISU_GaussPointsPL
::SetIsDeformed( bool theIsDeformed )
{
- if(theIsDeformed){
- myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
- myPassFilter[1]->SetInput(myWarpVector->GetOutput());
+ if(theIsDeformed){
+ //myWarpVector->SetInput( myPassFilter[0]->GetPolyDataOutput() );
+ myWarpVector->SetInputConnection( myPassFilter[0]->GetOutputPort() ); // OUV_PORTING: to check
+ myPassFilter[1]->SetInputConnection(myWarpVector->GetOutputPort());
}else
- myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput());
+ myPassFilter[1]->SetInputConnection(myPassFilter[0]->GetOutputPort());
}
//----------------------------------------------------------------------------
{
if( thePrimitiveType == VISU_OpenGLPointSpriteMapper::GeomSphere )
{
- myGlyph->SetInput( myPassFilter[1]->GetOutput() );
- myPassFilter[2]->SetInput(myGlyph->GetOutput());
+ myGlyph->SetInputConnection( myPassFilter[1]->GetOutputPort() );
+ myPassFilter[2]->SetInputConnection(myGlyph->GetOutputPort());
}
else
- myPassFilter[2]->SetInput(myPassFilter[1]->GetOutput());
+ myPassFilter[2]->SetInputConnection(myPassFilter[1]->GetOutputPort());
GetPointSpriteMapper()->SetPrimitiveType( thePrimitiveType );
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetMaximumSupportedSize()
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetClamp(vtkFloatingPointType theClamp)
+::SetClamp(double theClamp)
{
GetPointSpriteMapper()->SetPointSpriteClamp( theClamp );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetClamp()
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetSize(vtkFloatingPointType theSize)
+::SetSize(double theSize)
{
GetPointSpriteMapper()->SetPointSpriteSize( theSize );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetSize()
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetMinSize(vtkFloatingPointType theMinSize)
+::SetMinSize(double theMinSize)
{
GetPointSpriteMapper()->SetPointSpriteMinSize( theMinSize );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetMinSize()
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetMaxSize(vtkFloatingPointType theMaxSize)
+::SetMaxSize(double theMaxSize)
{
GetPointSpriteMapper()->SetPointSpriteMaxSize( theMaxSize );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetMaxSize()
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetMagnification(vtkFloatingPointType theMagnification)
+::SetMagnification(double theMagnification)
{
GetPointSpriteMapper()->SetPointSpriteMagnification( theMagnification );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetMagnification()
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetMagnificationIncrement(vtkFloatingPointType theIncrement)
+::SetMagnificationIncrement(double theIncrement)
{
if(VISU::CheckIsSameValue(myMagnificationIncrement, theIncrement))
return;
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold)
+::SetAlphaThreshold(double theAlphaThreshold)
{
GetPointSpriteMapper()->SetPointSpriteAlphaThreshold( theAlphaThreshold );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetAlphaThreshold()
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetOpacity(vtkFloatingPointType theOpacity)
+::SetOpacity(double theOpacity)
{
GetPointSpriteMapper()->SetPointSpriteOpacity( theOpacity );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetOpacity()
{
VISU_GaussPointsPL
::ChangeMagnification( bool up )
{
- vtkFloatingPointType anIncrement = up ? myMagnificationIncrement : 1.0 / myMagnificationIncrement;
+ double anIncrement = up ? myMagnificationIncrement : 1.0 / myMagnificationIncrement;
SetMagnification( GetMagnification() * anIncrement );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray)
{
- vtkFloatingPointType aMaxSize = GetAverageCellSize() * GetMaxSize();
- vtkFloatingPointType aMinSize = GetAverageCellSize() * GetMinSize();
- vtkFloatingPointType aDelta = aMaxSize - aMinSize;
- vtkFloatingPointType aVal = theScalarArray->GetTuple1(theID);
+ double aMaxSize = GetAverageCellSize() * GetMaxSize();
+ double aMinSize = GetAverageCellSize() * GetMinSize();
+ double aDelta = aMaxSize - aMinSize;
+ double aVal = theScalarArray->GetTuple1(theID);
- vtkFloatingPointType* aScalarRange = GetScalarRange();
- vtkFloatingPointType aDeltaScalarRange = aScalarRange[1] - aScalarRange[0];
+ double* aScalarRange = GetScalarRange();
+ double aDeltaScalarRange = aScalarRange[1] - aScalarRange[0];
// to avoid FPE if the minimum is equal to maximum
if( aDeltaScalarRange < 1.0 / VTK_LARGE_FLOAT )
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetMaxPointSize()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetPointSize(vtkIdType theID)
{
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
-::SetAverageCellSize(vtkFloatingPointType theAverageCellSize)
+::SetAverageCellSize(double theAverageCellSize)
{
GetPointSpriteMapper()->SetAverageCellSize( theAverageCellSize );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetAverageCellSize()
{
int aNbCompositeComponents = 4;
aCompositeImageData->SetDimensions(aMainImageSize);
- aCompositeImageData->SetScalarTypeToUnsignedChar();
- aCompositeImageData->SetNumberOfScalarComponents(aNbCompositeComponents);
- aCompositeImageData->AllocateScalars();
+ aCompositeImageData->AllocateScalars( VTK_UNSIGNED_CHAR, aNbCompositeComponents );
unsigned char* aMainDataPtr = (unsigned char*)aMainImageData->GetScalarPointer();
unsigned char* anAlphaDataPtr = (unsigned char*)anAlphaImageData->GetScalarPointer();
}
aMainReader->Delete();
anAlphaReader->Delete();
- aCompositeImageData->Update();
+ //aCompositeImageData->Update(); // OUV_PORTING
return aCompositeImageData;
}
void
VISU_GaussPointsPL
-::SetScale( vtkFloatingPointType theScale )
+::SetScale( double theScale )
{
if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), theScale))
return;
}
-vtkFloatingPointType
+double
VISU_GaussPointsPL
::GetScale()
{
void
VISU_GaussPointsPL
-::SetMapScale( vtkFloatingPointType theMapScale )
+::SetMapScale( double theMapScale )
{
Superclass::SetMapScale( theMapScale );
- vtkFloatingPointType aMapScale = myScaleFactor * theMapScale;
+ double aMapScale = myScaleFactor * theMapScale;
if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), aMapScale))
return;
{
if(IsExternalGeometryUsed()){
ClearGeometry();
- myAppendFilter->AddInput(GetFieldTransformFilter()->GetOutput());
+ myAppendFilter->AddInputConnection(GetFieldTransformFilter()->GetOutputPort());
}
}
if(!IsExternalGeometryUsed())
ClearGeometry();
AddGeometryName(theGeomName);
- myAppendFilter->AddInput(theGeometry);
+ myAppendFilter->AddInputData(theGeometry);
return GetNumberOfGeometry();
}
void
VISU_GaussPointsPL
-::GetSourceRange(vtkFloatingPointType theRange[2])
+::GetSourceRange(double theRange[2])
{
if(!IsExternalGeometryUsed())
Superclass::GetSourceRange(theRange);
GetPrimitiveType();
//! Get the maximum Point Sprite size, which is supported by hardware.
- vtkFloatingPointType
+ double
GetMaximumSupportedSize();
//! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteClamp.
void
- SetClamp(vtkFloatingPointType theClamp);
+ SetClamp(double theClamp);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteClamp, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteClamp, double).
+ double
GetClamp();
//! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteSize.
void
- SetSize(vtkFloatingPointType theSize);
+ SetSize(double theSize);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteSize, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteSize, double).
+ double
GetSize();
//! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize.
void
- SetMinSize(vtkFloatingPointType theMinSize);
+ SetMinSize(double theMinSize);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMinSize, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMinSize, double).
+ double
GetMinSize();
//! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMinSize.
void
- SetMaxSize(vtkFloatingPointType theMaxSize);
+ SetMaxSize(double theMaxSize);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMaxSize, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMaxSize, double).
+ double
GetMaxSize();
//! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteMagnification.
void
- SetMagnification(vtkFloatingPointType theMagnification);
+ SetMagnification(double theMagnification);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMagnification, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteMagnification, double).
+ double
GetMagnification();
//! Set the increment of changing Magnification parameter.
void
- SetMagnificationIncrement(vtkFloatingPointType theIncrement);
+ SetMagnificationIncrement(double theIncrement);
//! Get the increment of changing Magnification parameter.
- vtkFloatingPointType
+ double
GetMagnificationIncrement() { return myMagnificationIncrement; }
//! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteAlphaThreshold.
void
- SetAlphaThreshold(vtkFloatingPointType theAlphaThreshold);
+ SetAlphaThreshold(double theAlphaThreshold);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteAlphaThreshold, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteAlphaThreshold, double).
+ double
GetAlphaThreshold();
//! Redirect the request to VISU_OpenGLPointSpriteMapper::SetPointSpriteOpacity.
void
- SetOpacity(vtkFloatingPointType theOpacity);
+ SetOpacity(double theOpacity);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteOpacity, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(PointSpriteOpacity, double).
+ double
GetOpacity();
//! Set resolution of the Geometrical Sphere.
ChangeMagnification( bool up );
//! Get the maximum size of Point Sprites in the presentation.
- vtkFloatingPointType
+ double
GetMaxPointSize();
//! Get point size by element's Id.
- vtkFloatingPointType
+ double
GetPointSize(vtkIdType theID);
//! Get point size by element's Id using the specified scalar array.
- vtkFloatingPointType
+ double
GetPointSize(vtkIdType theID, vtkDataArray* theScalarArray);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkSetMacro(AverageCellSize, vtkFloatingPointType).
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkSetMacro(AverageCellSize, double).
void
- SetAverageCellSize(vtkFloatingPointType AverageCellSize);
+ SetAverageCellSize(double AverageCellSize);
- //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(AverageCellSize, vtkFloatingPointType).
- vtkFloatingPointType
+ //! Redirect the request to VISU_OpenGLPointSpriteMapper.vtkGetMacro(AverageCellSize, double).
+ double
GetAverageCellSize();
//! Set image data for the Point Sprite texture.
virtual
void
- SetScale( vtkFloatingPointType theScale );
+ SetScale( double theScale );
virtual
- vtkFloatingPointType
+ double
GetScale();
virtual
void
- SetMapScale( vtkFloatingPointType theMapScale = 1.0 );
+ SetMapScale( double theMapScale = 1.0 );
public:
virtual
void
- GetSourceRange(vtkFloatingPointType theRange[2]);
+ GetSourceRange(double theRange[2]);
virtual
vtkPointSet*
private:
//----------------------------------------------------------------------------
- vtkFloatingPointType myScaleFactor;
+ double myScaleFactor;
vtkWarpVector *myWarpVector;
std::vector<vtkPassThroughFilter*> myPassFilter;
vtkSmartPointer<VISU_PointSpriteMapperHolder> myPointSpriteMapperHolder;
vtkGlyph3D* myGlyph;
vtkSphereSource* mySphereSource;
- vtkFloatingPointType myMagnificationIncrement;
+ double myMagnificationIncrement;
int myPrimitiveType;
// function: SetCenter
// purpose:
//====================================================================
-void VISU_UnScaledActor::SetCenter(vtkFloatingPointType *pC)
+void VISU_UnScaledActor::SetCenter(double *pC)
{
for (int i=0; i<3; ++i){
myCenter[i]=pC[i];
// function:GetBounds
// purpose:
//====================================================================
-vtkFloatingPointType* VISU_UnScaledActor::GetBounds()
+double* VISU_UnScaledActor::GetBounds()
{
Superclass::GetBounds();
//
void VISU_UnScaledActor::Render(vtkRenderer *theRenderer)
{
if(theRenderer){
- vtkFloatingPointType P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}};
+ double P[2][3] = {{-1.0, -1.0, 0.0},{+1.0, +1.0, 0.0}};
theRenderer->ViewToWorld(P[0][0],P[0][1],P[0][2]);
theRenderer->ViewToWorld(P[1][0],P[1][1],P[1][2]);
- vtkFloatingPointType aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+
+ double aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+
(P[1][1]-P[0][1])*(P[1][1]-P[0][1])+
(P[1][2]-P[0][2])*(P[1][2]-P[0][2]));
int* aSize = theRenderer->GetRenderWindow()->GetSize();
- vtkFloatingPointType aWinDiag = sqrt(vtkFloatingPointType(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
+ double aWinDiag = sqrt(double(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
vtkDataSet* aDataSet = GetMapper()->GetInput();
- vtkFloatingPointType aLength = aDataSet->GetLength();
- vtkFloatingPointType aPrecision = 1.e-3;
- vtkFloatingPointType anOldScale = GetScale()[0];
- vtkFloatingPointType aScale =
- mySize*aWorldDiag/aWinDiag/aLength*sqrt(vtkFloatingPointType(aSize[0])/vtkFloatingPointType(aSize[1]));
+ double aLength = aDataSet->GetLength();
+ double aPrecision = 1.e-3;
+ double anOldScale = GetScale()[0];
+ double aScale =
+ mySize*aWorldDiag/aWinDiag/aLength*sqrt(double(aSize[0])/double(aSize[1]));
SetOrigin(myCenter);
//
//==================================================================
// class: VISU_ImplicitFunctionWidget
//
-vtkCxxRevisionMacro(VISU_ImplicitFunctionWidget, "$Revision$");
//==================================================================
// function: VISU_ImplicitFunctionWidget
// purpose :
vtkTypeMacro(VISU_UnScaledActor,vtkFollower);
static VISU_UnScaledActor *New();
- void SetCenter(vtkFloatingPointType *);
+ void SetCenter(double *);
virtual void SetSize(int theSize);
virtual void Render(vtkRenderer *theRenderer);
- virtual vtkFloatingPointType *GetBounds();
+ virtual double *GetBounds();
protected:
VISU_UnScaledActor();
~VISU_UnScaledActor(){}
- vtkFloatingPointType myCenter[3];
+ double myCenter[3];
int mySize;
};
class VISU_PIPELINE_EXPORT VISU_ImplicitFunctionWidget : public vtk3DWidget
{
public:
- vtkTypeRevisionMacro(VISU_ImplicitFunctionWidget,vtk3DWidget);
+ vtkTypeMacro(VISU_ImplicitFunctionWidget,vtk3DWidget);
virtual vtkImplicitFunction* ImplicitFunction()=0;
if(VISU_IsoSurfacesPL *aPipeLine = dynamic_cast<VISU_IsoSurfacesPL*>(thePipeLine)){
SetNbParts(aPipeLine->GetNbParts());
- vtkFloatingPointType aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()};
+ double aRange[2] = {aPipeLine->GetMin(), aPipeLine->GetMax()};
SetRange(aRange);
SetRangeFixed(aPipeLine->IsRangeFixed());
}
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_IsoSurfacesPL
::GetValue(int i)
{
//----------------------------------------------------------------------------
void
VISU_IsoSurfacesPL
-::SetScalarRange( vtkFloatingPointType theRange[2] )
+::SetScalarRange( double theRange[2] )
{
Superclass::SetScalarRange( theRange );
SetRange(myRange);
//----------------------------------------------------------------------------
void
VISU_IsoSurfacesPL
-::SetRange(vtkFloatingPointType theRange[2], bool theIsForced)
+::SetRange(double theRange[2], bool theIsForced)
{
if(VISU::CheckIsSameRange(myRange, theRange) && !theIsForced)
return;
if(theRange[0] <= theRange[1]){
myRange[0] = theRange[0];
myRange[1] = theRange[1];
- vtkFloatingPointType aRange[2] = {theRange[0], theRange[1]};
+ double aRange[2] = {theRange[0], theRange[1]};
if( IsRangeFixed() ) {
double aDelta = fabs( aRange[1] - aRange[0] ) * GAP_COEFFICIENT;
aRange[0] += aDelta;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_IsoSurfacesPL
::GetMin()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_IsoSurfacesPL
::GetMax()
{
SetNbParts(10);
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
GetSourceRange(aScalarRange);
SetRange(aScalarRange);
//----------------------------------------------------------------------------
void
VISU_IsoSurfacesPL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
Superclass::SetMapScale(theMapScale);
- vtkFloatingPointType aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()};
- vtkFloatingPointType aNewRange[2] = {aRange[0], aRange[1]};
+ double aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()};
+ double aNewRange[2] = {aRange[0], aRange[1]};
if( IsRangeFixed() ) {
double aDelta = fabs( aNewRange[1] - aNewRange[0] ) * GAP_COEFFICIENT;
aNewRange[0] += aDelta;
int
GetNbParts();
- virtual vtkFloatingPointType GetValue(int i);
+ virtual double GetValue(int i);
virtual
void
virtual
void
- SetScalarRange( vtkFloatingPointType theRange[2] );
+ SetScalarRange( double theRange[2] );
virtual
void
- SetRange(vtkFloatingPointType theRange[2], bool theIsForced = false);
+ SetRange(double theRange[2], bool theIsForced = false);
virtual
- vtkFloatingPointType
+ double
GetMin();
virtual
- vtkFloatingPointType
+ double
GetMax();
virtual
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
protected:
VISU_IsoSurfacesPL();
bool theIsCopyInput);
int myNbParts;
- vtkFloatingPointType myRange[2];
+ double myRange[2];
bool myIsRangeFixed;
VISU_CellDataToPointData* myCellDataToPointData;
vtkContourFilter *myContourFilter;
//----------------------------------------------------------------------------
void
VISU_LookupTable
-::MarkValueByColor( vtkFloatingPointType theValue,
+::MarkValueByColor( double theValue,
unsigned char* theColor )
{
vtkIdType anIndex = this->GetIndex( theValue );
unsigned char aRedPtr[3] = {255, 0, 0};
unsigned char aBluePtr[3] = {0, 0, 255};
- vtkFloatingPointType aRange[2];
+ double aRange[2];
this->GetTableRange(aRange);
vtkIdType aNbColors = this->GetNumberOfColors();
- vtkFloatingPointType aDelta = (aRange[1]-aRange[0])/aNbColors;
- vtkFloatingPointType aValue = aRange[0]+0.5*aDelta;
+ double aDelta = (aRange[1]-aRange[0])/aNbColors;
+ double aValue = aRange[0]+0.5*aDelta;
for(int i = 0; i < aNbColors; i++){
vtkIdType anIndex = this->GetIndex(aValue);
unsigned char* aTablePtr = this->GetPointer(anIndex);
//----------------------------------------------------------------------------
void
VISU_LookupTable
-::SetMapScale(vtkFloatingPointType theScale)
+::SetMapScale(double theScale)
{
if( myScale != theScale )
{
int
VISU_LookupTable
-::ComputeLogRange(vtkFloatingPointType inRange[2],
- vtkFloatingPointType outRange[2])
+::ComputeLogRange(double inRange[2],
+ double outRange[2])
{
if(inRange[0] >= inRange[1])
return -1;
unsigned char*
VISU_LookupTable
-::MapValue(vtkFloatingPointType v)
+::MapValue(double v)
{
if(GetScale() == VTK_SCALE_LOG10) {
- vtkFloatingPointType aLowBound = log10(this->TableRange[0]);
- v = pow(vtkFloatingPointType(10.0), aLowBound + (v - aLowBound)*myScale);
+ double aLowBound = log10(this->TableRange[0]);
+ v = pow(double(10.0), aLowBound + (v - aLowBound)*myScale);
return vtkLookupTable::MapValue(v);
} else if (!myBicolor) {
v = this->TableRange[0] + (v - this->TableRange[0])*myScale;
// Apply log to value, with appropriate constraints.
inline
-vtkFloatingPointType
-VISU_ApplyLogScale(vtkFloatingPointType v,
- vtkFloatingPointType range[2],
- vtkFloatingPointType logRange[2])
+double
+VISU_ApplyLogScale(double v,
+ double range[2],
+ double logRange[2])
{
// is the range set for negative numbers?
if (range[0] < 0) {
// Apply shift/scale to the scalar value v and do table lookup.
inline
unsigned char *
-VISU_LinearLookup(vtkFloatingPointType v,
+VISU_LinearLookup(double v,
unsigned char *table,
- vtkFloatingPointType maxIndex,
- vtkFloatingPointType shift,
- vtkFloatingPointType scale,
+ double maxIndex,
+ double shift,
+ double scale,
bool bicolor)
{
if( !bicolor )
{
- vtkFloatingPointType findx = (v + shift)*scale;
+ double findx = (v + shift)*scale;
if (findx < 0)
findx = 0;
if (findx > maxIndex)
int length,
int inIncr,
int outFormat,
- vtkFloatingPointType theMapScale,
+ double theMapScale,
bool bicolor)
{
int i = length;
- vtkFloatingPointType *range = self->GetTableRange();
- vtkFloatingPointType maxIndex = self->GetNumberOfColors() - 1;
- vtkFloatingPointType shift, scale;
+ double *range = self->GetTableRange();
+ double maxIndex = self->GetNumberOfColors() - 1;
+ double shift, scale;
unsigned char *table = self->GetPointer(0);
unsigned char *cptr;
- vtkFloatingPointType alpha;
+ double alpha;
if ( (alpha=self->GetAlpha()) >= 1.0 ) //no blending required
{
if (self->GetScale() == VTK_SCALE_LOG10)
{
- vtkFloatingPointType val;
- vtkFloatingPointType logRange[2];
+ double val;
+ double logRange[2];
VISU_LookupTable::ComputeLogRange(range, logRange);
shift = -logRange[0];
if (logRange[1] <= logRange[0])
{
if (self->GetScale() == VTK_SCALE_LOG10)
{
- vtkFloatingPointType val;
- vtkFloatingPointType logRange[2];
+ double val;
+ double logRange[2];
VISU_LookupTable::ComputeLogRange(range, logRange);
shift = -logRange[0];
if (logRange[1] <= logRange[0])
int length,
int inIncr,
int outFormat,
- vtkFloatingPointType theMapScale,
+ double theMapScale,
bool bicolor)
{
double tmp, sum;
int inputDataType, int numberOfValues,
int inputIncrement, int outputIncrement);
- vtkFloatingPointType GetMapScale() { return myScale; }
- void SetMapScale(vtkFloatingPointType theScale = 1.0);
+ double GetMapScale() { return myScale; }
+ void SetMapScale(double theScale = 1.0);
bool GetBicolor() { return myBicolor; }
void SetBicolor( bool theBicolor );
- static int ComputeLogRange( vtkFloatingPointType inRange[2],
- vtkFloatingPointType outRange[2] );
+ static int ComputeLogRange( double inRange[2],
+ double outRange[2] );
- unsigned char *MapValue(vtkFloatingPointType v);
+ unsigned char *MapValue(double v);
- void MarkValueByColor( vtkFloatingPointType theValue,
+ void MarkValueByColor( double theValue,
unsigned char* theColor );
bool HasMarkedValues() const { return myHasMarkedValues; }
VISU_LookupTable(int sze=256, int ext=256);
~VISU_LookupTable() {};
- vtkFloatingPointType myScale;
+ double myScale;
bool myBicolor;
bool myHasMarkedValues;
}
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_MapperHolder
::GetNodeCoord(vtkIdType theObjID)
{
GetNodeVTKID(vtkIdType theID);
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
virtual
#include <vtkCellData.h>
#include <vtkPoints.h>
#include <vtkIdList.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
vtkStandardNewMacro(VISU_MaskPointsFilter);
VISU_MaskPointsFilter::~VISU_MaskPointsFilter(){}
-void VISU_MaskPointsFilter::Execute(){
- vtkPointSet *anInput = this->GetInput(), *anOutput = this->GetOutput();
+int VISU_MaskPointsFilter::RequestData(
+ vtkInformation *vtkNotUsed(request),
+ vtkInformationVector **inputVector,
+ vtkInformationVector *outputVector)
+{
+ // get the info objects
+ vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
+ vtkInformation *outInfo = outputVector->GetInformationObject(0);
+
+ // get the input and ouptut
+ vtkPointSet *anInput = vtkPointSet::SafeDownCast(
+ inInfo->Get(vtkDataObject::DATA_OBJECT()));
+ vtkPointSet *anOutput = vtkPointSet::SafeDownCast(
+ outInfo->Get(vtkDataObject::DATA_OBJECT()));
+
anOutput->GetPointData()->CopyAllOff();
anOutput->GetCellData()->CopyAllOff();
anOutput->CopyStructure(anInput);
anOutput->SetPoints(aNewPoints);
aNewPoints->Delete();
aPoints->Delete();
+ return 1;
}
#ifndef VISU_MaskPointsFilter_HeaderFile
#define VISU_MaskPointsFilter_HeaderFile
-#include <vtkPointSetToPointSetFilter.h>
+#include <vtkPointSetAlgorithm.h>
-class VISU_MaskPointsFilter : public vtkPointSetToPointSetFilter{
+class VISU_MaskPointsFilter : public vtkPointSetAlgorithm{
protected:
VISU_MaskPointsFilter();
VISU_MaskPointsFilter(const VISU_MaskPointsFilter&);
- virtual void Execute();
+ virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
float PercentsOfUsedPoints;
public:
- vtkTypeMacro(VISU_MaskPointsFilter,vtkPointSetToPointSetFilter);
+ vtkTypeMacro(VISU_MaskPointsFilter,vtkPointSetAlgorithm);
static VISU_MaskPointsFilter* New();
virtual ~VISU_MaskPointsFilter();
VISU_MeshPL
::Build()
{
- GetDataSetMapper()->SetInput(GetClippedInput());
+ GetDataSetMapper()->SetInputData(GetClippedInput());
}
#endif
#ifndef VTK_IMPLEMENT_MESA_CXX
-vtkCxxRevisionMacro(VISU_OpenGLPointSpriteMapper, "Revision$");
vtkStandardNewMacro(VISU_OpenGLPointSpriteMapper);
#endif
};
static bool IsARBInitialized = InitializeARB();
-static vtkFloatingPointType Tolerance = 1.0 / VTK_LARGE_FLOAT;
+static double Tolerance = 1.0 / VTK_LARGE_FLOAT;
//-----------------------------------------------------------------------------
// Construct empty object.
//-----------------------------------------------------------------------------
float ViewToDisplay( vtkRenderer* theRenderer )
{
- vtkFloatingPointType p1[3], p2[3];
+ double p1[3], p2[3];
theRenderer->SetViewPoint( 0.0, 0.0, 0.0 );
theRenderer->ViewToDisplay();
theRenderer->ViewToDisplay();
theRenderer->GetDisplayPoint( p2 );
- vtkFloatingPointType coefficient = sqrt( pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ) ) / sqrt( 2. );
+ double coefficient = sqrt( pow( p2[0] - p1[0], 2 ) + pow( p2[1] - p1[1], 2 ) ) / sqrt( 2. );
//cout << p1[0] << " " << p1[1] << " " << p1[2] << endl;
//cout << p2[0] << " " << p2[1] << " " << p2[2] << endl;
//cout << "ZOOM : " << coefficient << endl;
else
{
this->InvokeEvent(vtkCommand::StartEvent,NULL);
- input->Update();
+ //input->Update(); // OUV_PORTING: to check
+ this->Update();
this->InvokeEvent(vtkCommand::EndEvent,NULL);
numPts = input->GetNumberOfPoints();
//-----------------------------------------------------------------------------
struct TPropertyColor : TColorFunctorBase
{
- vtkFloatingPointType myColor[3];
- vtkFloatingPointType myHue;
+ double myColor[3];
+ double myHue;
TPropertyColor( vtkProperty *theProperty )
{
if ( aTotalConnectivitySize > 0 ) {
TVertex* aVertexArr = new TVertex[ aTotalConnectivitySize ];
- vtkFloatingPointType aPropertyColor[3];
+ double aPropertyColor[3];
theActor->GetProperty()->GetColor( aPropertyColor );
glPointSize( this->DefaultPointSize );
enum PrimitiveTypes { PointSprite = 0, OpenGLPoint, GeomSphere };
static VISU_OpenGLPointSpriteMapper *New();
- vtkTypeRevisionMacro(VISU_OpenGLPointSpriteMapper,MAPPER_SUPERCLASS);
+ vtkTypeMacro(VISU_OpenGLPointSpriteMapper,MAPPER_SUPERCLASS);
//! Set the initial point size to be used.
/*!
//----------------------------------------------------------------------------
void VISU_OptionalDeformationPL::OnDeformation(){
- myCellDataToPointData->SetInput(myInputPassFilter->GetOutput());
- myWarpVector->SetInput(myCellDataToPointData->GetOutput());
- myOutputPassFiler->SetInput(myWarpVector->GetOutput());
+ myCellDataToPointData->SetInputConnection(myInputPassFilter->GetOutputPort());
+ myWarpVector->SetInputConnection(myCellDataToPointData->GetOutputPort());
+ myOutputPassFiler->SetInputConnection(myWarpVector->GetOutputPort());
}
//----------------------------------------------------------------------------
void VISU_OptionalDeformationPL::OffDeformation(){
- myOutputPassFiler->SetInput(myInputPassFilter->GetOutput());
+ myOutputPassFiler->SetInputConnection(myInputPassFilter->GetOutputPort());
}
VISU_PipeLine
::IsPlanarInput()
{
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
GetInput()->GetBounds( aBounds ); // xmin,xmax, ymin,ymax, zmin,zmax
if (fabs( aBounds[0] - aBounds[1] ) <= FLT_MIN ||
fabs( aBounds[2] - aBounds[3] ) <= FLT_MIN ||
}
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_PipeLine
::GetNodeCoord(vtkIdType theObjID)
{
//----------------------------------------------------------------------------
void
VISU_PipeLine
-::SetPlaneParam(vtkFloatingPointType theDir[3],
- vtkFloatingPointType theDist,
+::SetPlaneParam(double theDir[3],
+ double theDist,
vtkPlane* thePlane)
{
thePlane->SetNormal(theDir);
- vtkFloatingPointType anOrigin[3];
+ double anOrigin[3];
//Make sure that bounds are calculated
ComputeVisibleBounds();
//----------------------------------------------------------------------------
void
VISU_PipeLine
-::GetPlaneParam(vtkFloatingPointType theDir[3],
- vtkFloatingPointType& theDist,
+::GetPlaneParam(double theDir[3],
+ double& theDist,
vtkPlane* thePlane)
{
thePlane->GetNormal(theDir);
- vtkFloatingPointType anOrigin[3];
+ double anOrigin[3];
thePlane->GetOrigin(anOrigin);
//Make sure that bounds are calculated
}
//----------------------------------------------------------------------------
-void VISU_PipeLine::GetVisibleBounds(vtkFloatingPointType theBounds[6]) {
+void VISU_PipeLine::GetVisibleBounds(double theBounds[6]) {
// Compute or get cached bounds
ComputeVisibleBounds();
for (int i=0; i<6; i++) {
GetNodeVTKID(vtkIdType theID);
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
virtual
virtual
void
- SetPlaneParam(vtkFloatingPointType theDir[3],
- vtkFloatingPointType theDist,
+ SetPlaneParam(double theDir[3],
+ double theDist,
vtkPlane* thePlane);
virtual
void
- GetPlaneParam(vtkFloatingPointType theDir[3],
- vtkFloatingPointType& theDist,
+ GetPlaneParam(double theDir[3],
+ double& theDist,
vtkPlane* thePlane);
void
- GetVisibleBounds(vtkFloatingPointType theBounds[6]);
+ GetVisibleBounds(double theBounds[6]);
//----------------------------------------------------------------------------
static
SetIsFeatureEdgesAllowed(bool theIsFeatureEdgesAllowed);
//Visible bounds xmin, xmax, ymin, ymax, zmin, zmax
- vtkFloatingPointType myVisibleBounds[6];
+ double myVisibleBounds[6];
vtkTimeStamp myVisibleComputeTime; // Time at which visible bounds computed
private:
{
//----------------------------------------------------------------------------
void
- Mul(const vtkFloatingPointType A[3],
- vtkFloatingPointType b,
- vtkFloatingPointType C[3])
+ Mul(const double A[3],
+ double b,
+ double C[3])
{ // A*b;
for(int i = 0; i < 3; i++)
C[i] = A[i]*b;
//----------------------------------------------------------------------------
void
- Sub(const vtkFloatingPointType A[3],
- const vtkFloatingPointType B[3],
- vtkFloatingPointType C[3])
+ Sub(const double A[3],
+ const double B[3],
+ double C[3])
{ //A-B
for(int i = 0; i < 3; i++)
C[i] = A[i] - B[i];
//----------------------------------------------------------------------------
bool
- CheckIsSameValue(vtkFloatingPointType theTarget,
- vtkFloatingPointType theSource)
+ CheckIsSameValue(double theTarget,
+ double theSource)
{
- static vtkFloatingPointType TOL = 10.0 / VTK_LARGE_FLOAT;
+ static double TOL = 10.0 / VTK_LARGE_FLOAT;
if(fabs(theTarget - theSource) < TOL)
return true;
return false;
//----------------------------------------------------------------------------
bool
- CheckIsSameRange(vtkFloatingPointType* theTarget,
- vtkFloatingPointType* theSource)
+ CheckIsSameRange(double* theTarget,
+ double* theSource)
{
return CheckIsSameValue(theTarget[0], theSource[0]) &&
CheckIsSameValue(theTarget[1], theSource[1]);
theTarget->SetLookupTable(theSource->GetLookupTable());
theTarget->SetScalarVisibility(theSource->GetScalarVisibility());
if(theIsCopyInput){
- vtkFloatingPointType* aScalarRange = theSource->GetScalarRange();
+ double* aScalarRange = theSource->GetScalarRange();
if(!CheckIsSameRange(theTarget->GetScalarRange(), aScalarRange))
theTarget->SetScalarRange(aScalarRange);
}
//----------------------------------------------------------------------------
void
- ComputeBoundsParam(vtkFloatingPointType theBounds[6],
- vtkFloatingPointType theDirection[3],
- vtkFloatingPointType theMinPnt[3],
- vtkFloatingPointType& theMaxBoundPrj,
- vtkFloatingPointType& theMinBoundPrj)
+ ComputeBoundsParam(double theBounds[6],
+ double theDirection[3],
+ double theMinPnt[3],
+ double& theMaxBoundPrj,
+ double& theMinBoundPrj)
{
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
for(int i = 0; i < 6; i++)
aBounds[i] = theBounds[i];
//Enlarge bounds in order to avoid conflicts of precision
for(int i = 0; i < 6; i += 2){
static double EPS = 1.0E-3;
- vtkFloatingPointType aDelta = (aBounds[i+1] - aBounds[i])*EPS;
+ double aDelta = (aBounds[i+1] - aBounds[i])*EPS;
aBounds[i] -= aDelta;
aBounds[i+1] += aDelta;
}
- vtkFloatingPointType aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]},
+ double aBoundPoints[8][3] = { {aBounds[0],aBounds[2],aBounds[4]},
{aBounds[1],aBounds[2],aBounds[4]},
{aBounds[0],aBounds[3],aBounds[4]},
{aBounds[1],aBounds[3],aBounds[4]},
theMaxBoundPrj = vtkMath::Dot(theDirection,aBoundPoints[aMaxId]);
theMinBoundPrj = theMaxBoundPrj;
for(int i = 1; i < 8; i++){
- vtkFloatingPointType aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]);
+ double aTmp = vtkMath::Dot(theDirection,aBoundPoints[i]);
if(theMaxBoundPrj < aTmp){
theMaxBoundPrj = aTmp;
aMaxId = i;
aMinId = i;
}
}
- vtkFloatingPointType *aMinPnt = aBoundPoints[aMaxId];
+ double *aMinPnt = aBoundPoints[aMaxId];
theMinPnt[0] = aMinPnt[0];
theMinPnt[1] = aMinPnt[1];
theMinPnt[2] = aMinPnt[2];
//----------------------------------------------------------------------------
void
- DistanceToPosition(vtkFloatingPointType theBounds[6],
- vtkFloatingPointType theDirection[3],
- vtkFloatingPointType theDist,
- vtkFloatingPointType thePos[3])
+ DistanceToPosition(double theBounds[6],
+ double theDirection[3],
+ double theDist,
+ double thePos[3])
{
- vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
+ double aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
ComputeBoundsParam(theBounds,
theDirection,
aMinPnt,
aMaxBoundPrj,
aMinBoundPrj);
- vtkFloatingPointType aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist;
+ double aLength = (aMaxBoundPrj-aMinBoundPrj)*theDist;
thePos[0] = aMinPnt[0] - theDirection[0] * aLength;
thePos[1] = aMinPnt[1] - theDirection[1] * aLength;
thePos[2] = aMinPnt[2] - theDirection[2] * aLength;
//----------------------------------------------------------------------------
void
- PositionToDistance(vtkFloatingPointType theBounds[6],
- vtkFloatingPointType theDirection[3],
- vtkFloatingPointType thePos[3],
- vtkFloatingPointType& theDist)
+ PositionToDistance(double theBounds[6],
+ double theDirection[3],
+ double thePos[3],
+ double& theDist)
{
- vtkFloatingPointType aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
+ double aMaxBoundPrj, aMinBoundPrj, aMinPnt[3];
ComputeBoundsParam(theBounds,
theDirection,
aMinPnt,
aMaxBoundPrj,
aMinBoundPrj);
- vtkFloatingPointType aPrj = vtkMath::Dot(theDirection,thePos);
+ double aPrj = vtkMath::Dot(theDirection,thePos);
theDist = (aPrj-aMinBoundPrj)/(aMaxBoundPrj-aMinBoundPrj);
}
//----------------------------------------------------------------------------
//Compute bounds of the visible part of the dataset
void
- ComputeVisibleBounds(vtkDataSet* theDataSet, vtkFloatingPointType theBounds[6]) {
+ ComputeVisibleBounds(vtkDataSet* theDataSet, double theBounds[6]) {
int nbCells, i, j, minIdx, maxIdx;
- vtkFloatingPointType cellBounds[6];
+ double cellBounds[6];
if( theDataSet && (nbCells = theDataSet->GetNumberOfCells()) ) {
theDataSet->GetCellBounds(0,theBounds);
//----------------------------------------------------------------------------
//Compute center of the box, box defined as xmin, xmax, ymin, ymax, zmin, zmax
void
- ComputeBoxCenter(vtkFloatingPointType theBounds[6], vtkFloatingPointType theCenter[3]) {
+ ComputeBoxCenter(double theBounds[6], double theCenter[3]) {
for (int i=0; i<3; i++) {
theCenter[i] = (theBounds[2*i+1] + theBounds[2*i]) / 2.0;
}
//----------------------------------------------------------------------------
//Compute length of the box diagonal, box defined as xmin, xmax, ymin, ymax, zmin, zmax
double
- ComputeBoxDiagonal(vtkFloatingPointType theBounds[6]) {
+ ComputeBoxDiagonal(double theBounds[6]) {
double diff, len=0.0;
int i;
for (i=0; i<3; i++) {
{
//----------------------------------------------------------------------------
void
- Mul(const vtkFloatingPointType A[3],
- vtkFloatingPointType b,
- vtkFloatingPointType C[3]); // C = A * b
+ Mul(const double A[3],
+ double b,
+ double C[3]); // C = A * b
//----------------------------------------------------------------------------
void
- Sub(const vtkFloatingPointType A[3],
- const vtkFloatingPointType B[3],
- vtkFloatingPointType C[3]); // C = A - B
+ Sub(const double A[3],
+ const double B[3],
+ double C[3]); // C = A - B
//----------------------------------------------------------------------------
{
if(VISU::IsDataOnCells(theDataSet)){
- theCellDataToPointData->SetInput(theDataSet);
+ theCellDataToPointData->SetInputData(theDataSet);
theCellDataToPointData->PassCellDataOn();
- theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
+ //theOutputFilter->SetInput(theCellDataToPointData->GetUnstructuredGridOutput());
+ theOutputFilter->SetInputConnection(theCellDataToPointData->GetOutputPort()); // OUV_PORTING: to check
}else
- theOutputFilter->SetInput(theDataSet);
+ theOutputFilter->SetInputData(theDataSet);
}
//----------------------------------------------------------------------------
//! Checks whether the float values are the same or not
bool VISU_PIPELINE_EXPORT
- CheckIsSameValue(vtkFloatingPointType theTarget,
- vtkFloatingPointType theSource);
+ CheckIsSameValue(double theTarget,
+ double theSource);
//! Checks whether the scalar range is the same or not
bool VISU_PIPELINE_EXPORT
- CheckIsSameRange(vtkFloatingPointType* theTarget,
- vtkFloatingPointType* theSource);
+ CheckIsSameRange(double* theTarget,
+ double* theSource);
//! Customizes vtkMapper::ShallowCopy
void VISU_PIPELINE_EXPORT
//----------------------------------------------------------------------------
void VISU_PIPELINE_EXPORT
- ComputeBoundsParam(vtkFloatingPointType theBounds[6],
- vtkFloatingPointType theDirection[3],
- vtkFloatingPointType theMinPnt[3],
- vtkFloatingPointType& theMaxBoundPrj,
- vtkFloatingPointType& theMinBoundPrj);
+ ComputeBoundsParam(double theBounds[6],
+ double theDirection[3],
+ double theMinPnt[3],
+ double& theMaxBoundPrj,
+ double& theMinBoundPrj);
//----------------------------------------------------------------------------
void VISU_PIPELINE_EXPORT
- DistanceToPosition(vtkFloatingPointType theBounds[6],
- vtkFloatingPointType theDirection[3],
- vtkFloatingPointType theDist,
- vtkFloatingPointType thePos[3]);
+ DistanceToPosition(double theBounds[6],
+ double theDirection[3],
+ double theDist,
+ double thePos[3]);
//----------------------------------------------------------------------------
void VISU_PIPELINE_EXPORT
- PositionToDistance(vtkFloatingPointType theBounds[6],
- vtkFloatingPointType theDirection[3],
- vtkFloatingPointType thePos[3],
- vtkFloatingPointType& theDist);
+ PositionToDistance(double theBounds[6],
+ double theDirection[3],
+ double thePos[3],
+ double& theDist);
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
void VISU_PIPELINE_EXPORT
ComputeVisibleBounds(vtkDataSet* theDataSet,
- vtkFloatingPointType theBounds[6]);
+ double theBounds[6]);
//----------------------------------------------------------------------------
void VISU_PIPELINE_EXPORT
- ComputeBoxCenter(vtkFloatingPointType theBounds[6], vtkFloatingPointType theCenter[3]);
+ ComputeBoxCenter(double theBounds[6], double theCenter[3]);
//----------------------------------------------------------------------------
double VISU_PIPELINE_EXPORT
- ComputeBoxDiagonal(vtkFloatingPointType theBounds[6]);
+ ComputeBoxDiagonal(double theBounds[6]);
}
bool
IsValidPlane2Position(vtkPlane *pPx,
vtkDataSet *pDataSet,
- vtkFloatingPointType aTol=0.003);
+ double aTol=0.003);
static
void
GetBndPoints(vtkDataSet *pDataSet,
- vtkFloatingPointType aPnts[24]);
+ double aPnts[24]);
static
-vtkFloatingPointType
-DistanceToPlane(const vtkFloatingPointType x[3],
- const vtkFloatingPointType n[3],
- const vtkFloatingPointType p0[3]);
+double
+DistanceToPlane(const double x[3],
+ const double n[3],
+ const double p0[3]);
-vtkCxxRevisionMacro(VISU_PlanesWidget, "$Revision$");
vtkStandardNewMacro(VISU_PlanesWidget);
//==================================================================
myPlane2->SetOrigin(0,0,myDistance);
//
myImplicitFunction = vtkImplicitBoolean::New();
- myImplicitFunction->SetOperationType(VTK_UNION);
+ myImplicitFunction->SetOperationTypeToUnion();
//
myBox = vtkImageData::New();
myBox->SetDimensions(2,2,2);
myOutline = vtkOutlineFilter::New();
- myOutline->SetInput(myBox);
+ myOutline->SetInputData(myBox);
myOutlineMapper = vtkPolyDataMapper::New();
- myOutlineMapper->SetInput(myOutline->GetOutput());
+ myOutlineMapper->SetInputConnection(myOutline->GetOutputPort());
myOutlineActor = vtkActor::New();
this->myOutlineActor->SetMapper(this->myOutlineMapper);
this->myOutlineActor->PickableOff();
this->OutlineTranslation = 0;
this->myCutter1 = vtkEDFCutter::New();
- this->myCutter1->SetInput(myBox);
+ this->myCutter1->SetInputData(myBox);
this->myCutter1->SetCutFunction(myPlane1);
this->myCutMapper1 = vtkPolyDataMapper::New();
- this->myCutMapper1->SetInput(this->myCutter1->GetOutput());
+ this->myCutMapper1->SetInputConnection(this->myCutter1->GetOutputPort());
this->myCutActor1 = vtkActor::New();
this->myCutActor1->SetMapper(this->myCutMapper1);
this->myDrawPlane = 1;
this->myEdges1 = vtkFeatureEdges::New();
myEdges1->SetColoring(0);
- this->myEdges1->SetInput(this->myCutter1->GetOutput());
+ this->myEdges1->SetInputConnection(this->myCutter1->GetOutputPort());
this->myEdgesMapper1 = vtkPolyDataMapper::New();
- this->myEdgesMapper1->SetInput(this->myEdges1->GetOutput());
+ this->myEdgesMapper1->SetInputConnection(this->myEdges1->GetOutputPort());
this->myEdgesActor1 = vtkActor::New();
this->myEdgesActor1->SetMapper(this->myEdgesMapper1);
myEdgesActor1->GetProperty()->SetLineWidth(4.);
myEdgesActor1->GetProperty()->SetColor(0., .5, .7);
this->myCutter2 = vtkEDFCutter::New();
- this->myCutter2->SetInput(myBox);
+ this->myCutter2->SetInputData(myBox);
this->myCutter2->SetCutFunction(this->myPlane2);
this->myCutMapper2 = vtkPolyDataMapper::New();
- this->myCutMapper2->SetInput(this->myCutter2->GetOutput());
+ this->myCutMapper2->SetInputConnection(this->myCutter2->GetOutputPort());
this->myCutActor2 = vtkActor::New();
this->myCutActor2->SetMapper(this->myCutMapper2);
myEdges2 = vtkFeatureEdges::New();
myEdges2->SetColoring(0);
- myEdges2->SetInput(myCutter2->GetOutput());
+ myEdges2->SetInputConnection(myCutter2->GetOutputPort());
myEdgesMapper2 = vtkPolyDataMapper::New();
- myEdgesMapper2->SetInput(myEdges2->GetOutput());
+ myEdgesMapper2->SetInputConnection(myEdges2->GetOutputPort());
myEdgesActor2 = vtkActor::New();
myEdgesActor2->SetMapper(myEdgesMapper2);
myEdgesActor2->GetProperty()->SetLineWidth(4.);
this->LineSource = vtkLineSource::New();
this->LineSource->SetResolution(1);
this->LineMapper = vtkPolyDataMapper::New();
- this->LineMapper->SetInput(this->LineSource->GetOutput());
+ this->LineMapper->SetInputConnection(this->LineSource->GetOutputPort());
this->LineActor = vtkActor::New();
this->LineActor->SetMapper(this->LineMapper);
this->ConeSource->SetResolution(12);
this->ConeSource->SetAngle(20.);
this->ConeMapper = vtkPolyDataMapper::New();
- this->ConeMapper->SetInput(this->ConeSource->GetOutput());
+ this->ConeMapper->SetInputConnection(this->ConeSource->GetOutputPort());
this->ConeActor = VISU_UnScaledActor::New();
this->ConeActor->SetMapper(this->ConeMapper);
ConeActor->SetSize(36);
this->LineSource2 = vtkLineSource::New();
this->LineSource2->SetResolution(1);
this->LineMapper2 = vtkPolyDataMapper::New();
- this->LineMapper2->SetInput(this->LineSource2->GetOutput());
+ this->LineMapper2->SetInputConnection(this->LineSource2->GetOutputPort());
this->LineActor2 = vtkActor::New();
this->LineActor2->SetMapper(this->LineMapper2);
this->ConeSource2->SetResolution(12);
this->ConeSource2->SetAngle(20.);
this->ConeMapper2 = vtkPolyDataMapper::New();
- this->ConeMapper2->SetInput(this->ConeSource2->GetOutput());
+ this->ConeMapper2->SetInputConnection(this->ConeSource2->GetOutputPort());
this->ConeActor2 = VISU_UnScaledActor::New();
this->ConeActor2->SetMapper(this->ConeMapper2);
ConeActor2->SetSize(36);
this->Sphere->SetThetaResolution(16);
this->Sphere->SetPhiResolution(8);
this->SphereMapper = vtkPolyDataMapper::New();
- this->SphereMapper->SetInput(this->Sphere->GetOutput());
+ this->SphereMapper->SetInputConnection(this->Sphere->GetOutputPort());
this->SphereActor = VISU_UnScaledActor::New();
this->SphereActor->SetMapper(this->SphereMapper);
SphereActor->SetSize(36);
this->Transform = vtkTransform::New();
// Define the point coordinates
- vtkFloatingPointType bounds[6];
+ double bounds[6];
bounds[0] = -0.5;
bounds[1] = 0.5;
bounds[2] = -0.5;
//==================================================================
void
VISU_PlanesWidget
-::SetDistance(const vtkFloatingPointType theDistance)
+::SetDistance(const double theDistance)
{
if( theDistance <= 0.0 || theDistance == myDistance )
return;
myDistance=theDistance;
//
- vtkFloatingPointType *origin, *normal, oNew[3], aN2[3];
+ double *origin, *normal, oNew[3], aN2[3];
origin = myPlane1->GetOrigin();
normal = myPlane1->GetNormal();
vtkMath::Normalize(normal);
// function: Distance
// purpose :
//==================================================================
-vtkFloatingPointType
+double
VISU_PlanesWidget
::Distance() const
{
{
//Get the motion vector
int i;
- vtkFloatingPointType v[3];
+ double v[3];
//
for (i=0; i<3; ++i){
v[i] = p2[i] - p1[i];
}
//
- vtkFloatingPointType aOr1[3], aNr1[3], aNr2[3], aD, z1;
+ double aOr1[3], aNr1[3], aNr2[3], aD, z1;
//
myPlane1->GetOrigin(aOr1);
myPlane1->GetNormal(aNr1);
}
//
//Add to the current point, project back down onto plane
- vtkFloatingPointType *o = myPlane1->GetOrigin();
- vtkFloatingPointType *n = myPlane1->GetNormal();
- vtkFloatingPointType newOrigin[3];
+ double *o = myPlane1->GetOrigin();
+ double *n = myPlane1->GetNormal();
+ double newOrigin[3];
//
for (i=0; i<3; ++i){
newOrigin[i]=o[i] + v[i];
// function: SetOriginInternal
// purpose : Set the origin of the plane.(for Internal calls)
//==================================================================
-void VISU_PlanesWidget::SetOriginInternal(vtkFloatingPointType x[3])
+void VISU_PlanesWidget::SetOriginInternal(double x[3])
{
- vtkFloatingPointType *bounds = this->myOutline->GetOutput()->GetBounds();
+ double *bounds = this->myOutline->GetOutput()->GetBounds();
int i, j;
for (i=0; i<3; ++i) {
j=2*i;
}
//
bool bFlag;
- vtkFloatingPointType aOr2[3], aNr2[3], aNr1[3];
+ double aOr2[3], aNr2[3], aNr1[3];
vtkPlane *pPx;
//
myPlane1->GetNormal(aNr1);
v[i] = p2[i] - p1[i];
}
//
- vtkFloatingPointType *origin = myPlane1->GetOrigin();
- vtkFloatingPointType *normal = myPlane1->GetNormal();
+ double *origin = myPlane1->GetOrigin();
+ double *normal = myPlane1->GetNormal();
// Create axis of rotation and angle of rotation
vtkMath::Cross(vpn,v,axis);
this->Transform->Translate(-origin[0],-origin[1],-origin[2]);
//Set the new normal
- vtkFloatingPointType nNew[3], aN2[3], oNew[3];
+ double nNew[3], aN2[3], oNew[3];
this->Transform->TransformNormal(normal,nNew);
//
for (i=0; i<3; ++i){
void VISU_PlanesWidget::PushDistance(double *p1, double *p2)
{
int i;
- vtkFloatingPointType v[3], *anOrigin1, *aN1, *anOrigin2, *aN2, aD;
+ double v[3], *anOrigin1, *aN1, *anOrigin2, *aN2, aD;
//Get the motion vector
for (i=0; i<3; ++i){
v[i] = p2[i] - p1[i];
vtkMath::Normalize(aN1);
- vtkFloatingPointType origin[3];
+ double origin[3];
double distance = vtkMath::Dot( v, aN2 );
for(i=0; i<3; ++i) {
origin[i] = anOrigin2[i] + distance * aN2[i];
}
- vtkFloatingPointType d = DistanceToPlane(origin, aN1, anOrigin1);
+ double d = DistanceToPlane(origin, aN1, anOrigin1);
if( d <= 0.0 )
return;
//
bool bFlag;
- vtkFloatingPointType aOr2[3], aNr2[3];
+ double aOr2[3], aNr2[3];
vtkPlane *pPx;
//
myPlane2->GetOrigin(aOr2);
v[2] = p2[2] - p1[2];
//Translate the plane
- vtkFloatingPointType oNew[3];
- vtkFloatingPointType *origin = myPlane1->GetOrigin();
+ double oNew[3];
+ double *origin = myPlane1->GetOrigin();
oNew[0] = origin[0] + v[0];
oNew[1] = origin[1] + v[1];
oNew[2] = origin[2] + v[2];
v[2] = p2[2] - p1[2];
//Translate the bounding box
- vtkFloatingPointType *origin = myBox->GetOrigin();
- vtkFloatingPointType oNew[3];
+ double *origin = myBox->GetOrigin();
+ double oNew[3];
oNew[0] = origin[0] + v[0];
oNew[1] = origin[1] + v[1];
oNew[2] = origin[2] + v[2];
v[2] = p2[2] - p1[2];
//int res = this->PlaneSource->GetXResolution();
- vtkFloatingPointType *o = myPlane1->GetOrigin();
+ double *o = myPlane1->GetOrigin();
// Compute the scale factor
- vtkFloatingPointType sf = vtkMath::Norm(v) / this->myOutline->GetOutput()->GetLength();
+ double sf = vtkMath::Norm(v) / this->myOutline->GetOutput()->GetLength();
if ( Y > this->Interactor->GetLastEventPosition()[1] ) {
sf = 1.0 + sf;
}
this->Transform->Scale(sf,sf,sf);
this->Transform->Translate(-o[0],-o[1],-o[2]);
- vtkFloatingPointType *origin = myBox->GetOrigin();
- vtkFloatingPointType *spacing = myBox->GetSpacing();
- vtkFloatingPointType oNew[3], p[3], pNew[3];
+ double *origin = myBox->GetOrigin();
+ double *spacing = myBox->GetSpacing();
+ double oNew[3], p[3], pNew[3];
p[0] = origin[0] + spacing[0];
p[1] = origin[1] + spacing[1];
p[2] = origin[2] + spacing[2];
// function: InitialPlaceWidget
// purpose :
//==================================================================
-void VISU_PlanesWidget::InitialPlaceWidget(vtkFloatingPointType bds[6])
+void VISU_PlanesWidget::InitialPlaceWidget(double bds[6])
{
- vtkFloatingPointType bounds[6], origin[3];
+ double bounds[6], origin[3];
PlaceWidget(bds);
//
(bounds[3]+bounds[2])/2.0,
(bounds[5]+bounds[4])/2.0);
- static vtkFloatingPointType DIST_COEFF = 0.1;
+ static double DIST_COEFF = 0.1;
SetDistance(this->InitialLength*DIST_COEFF);
//
this->UpdateRepresentation();
// function: PlaceWidget
// purpose :
//==================================================================
-void VISU_PlanesWidget::PlaceWidget(vtkFloatingPointType bds[6])
+void VISU_PlanesWidget::PlaceWidget(double bds[6])
{
int i;
- vtkFloatingPointType bounds[6], origin[3];
+ double bounds[6], origin[3];
this->AdjustBounds(bds, bounds, origin);
(bounds[5]-bounds[4]));
this->myOutline->Update();
- if (this->Input || this->Prop3D) {
+ if (this->GetInput() || this->Prop3D) {
this->LineSource->SetPoint1(myPlane1->GetOrigin());
if ( this->NormalToYAxis ) {
myPlane1->SetNormal(0,1,0);
// function: SetOrigin
// purpose :Set the origin of the plane.(for external calls)
//==================================================================
-void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x, vtkFloatingPointType y, vtkFloatingPointType z)
+void VISU_PlanesWidget::SetOrigin(double x, double y, double z)
{
- vtkFloatingPointType origin[3];
+ double origin[3];
origin[0] = x;
origin[1] = y;
origin[2] = z;
// function: SetOrigin
// purpose : Set the origin of the plane.(for external calls)
//==================================================================
-void VISU_PlanesWidget::SetOrigin(vtkFloatingPointType x[3])
+void VISU_PlanesWidget::SetOrigin(double x[3])
{
- vtkFloatingPointType *bounds = this->myOutline->GetOutput()->GetBounds();
+ double *bounds = this->myOutline->GetOutput()->GetBounds();
for (int i=0; i<3; i++) {
if ( x[i] < bounds[2*i] ) {
x[i] = bounds[2*i];
}
}
myPlane1->SetOrigin(x);
- vtkFloatingPointType *origin, *normal, oNew[3];
+ double *origin, *normal, oNew[3];
origin = myPlane1->GetOrigin();
normal = myPlane1->GetNormal();
vtkMath::Normalize(normal);
// function: GetOrigin
// purpose :Get the origin of the plane.
//==================================================================
-vtkFloatingPointType* VISU_PlanesWidget::GetOrigin()
+double* VISU_PlanesWidget::GetOrigin()
{
return myPlane1->GetOrigin();
}
-void VISU_PlanesWidget::GetOrigin(vtkFloatingPointType xyz[3])
+void VISU_PlanesWidget::GetOrigin(double xyz[3])
{
myPlane1->GetOrigin(xyz);
}
// function: SetNormal
// purpose :Set the normal to the plane.
//==================================================================
-void VISU_PlanesWidget::SetNormal(vtkFloatingPointType x, vtkFloatingPointType y, vtkFloatingPointType z)
+void VISU_PlanesWidget::SetNormal(double x, double y, double z)
{
- vtkFloatingPointType n[3];
+ double n[3];
n[0] = x;
n[1] = y;
n[2] = z;
// function: SetNormal
// purpose :Set the normal to the plane.
//==================================================================
-void VISU_PlanesWidget::SetNormal(vtkFloatingPointType n[3])
+void VISU_PlanesWidget::SetNormal(double n[3])
{
this->SetNormal(n[0], n[1], n[2]);
}
// function: GetNormal
// purpose :Get the normal to the plane.
//==================================================================
-vtkFloatingPointType* VISU_PlanesWidget::GetNormal()
+double* VISU_PlanesWidget::GetNormal()
{
return myPlane1->GetNormal();
}
// function: GetNormal
// purpose :Get the normal to the plane.
//==================================================================
-void VISU_PlanesWidget::GetNormal(vtkFloatingPointType xyz[3])
+void VISU_PlanesWidget::GetNormal(double xyz[3])
{
myPlane1->GetNormal(xyz);
}
return;
}
- vtkFloatingPointType *origin = myPlane1->GetOrigin();
- vtkFloatingPointType *normal = myPlane1->GetNormal();
- vtkFloatingPointType p2[3];
+ double *origin = myPlane1->GetOrigin();
+ double *normal = myPlane1->GetNormal();
+ double p2[3];
// Setup the plane normal
- vtkFloatingPointType d = this->myOutline->GetOutput()->GetLength();
+ double d = this->myOutline->GetOutput()->GetLength();
p2[0] = origin[0] + 0.30 * d * normal[0];
p2[1] = origin[1] + 0.30 * d * normal[1];
this->Sphere->SetCenter(origin);
SphereActor->SetCenter(origin);
- this->myEdgesMapper1->SetInput(this->myEdges1->GetOutput());
+ this->myEdgesMapper1->SetInputConnection(this->myEdges1->GetOutputPort());
}
//==================================================================
//==================================================================
bool IsValidPlane2Position(vtkPlane *pPx,
vtkDataSet *pDataSet,
- vtkFloatingPointType aTol)
+ double aTol)
{
bool bRet;
int i, iFound;
- vtkFloatingPointType aD, aDmax, aPnts[24], aDiagonal;
- vtkFloatingPointType aTol1, aOr[3], aN[3];
+ double aD, aDmax, aPnts[24], aDiagonal;
+ double aTol1, aOr[3], aN[3];
//
bRet=false;
aDiagonal=pDataSet->GetLength();
//==================================================================
void
GetBndPoints(vtkDataSet *pDataSet,
- vtkFloatingPointType aPnts[24])
+ double aPnts[24])
{
int aIndx[24] = {
0,2,4,1,2,4,1,3,4,0,3,4,
0,2,5,1,2,5,1,3,5,0,3,5
};
int i;
- vtkFloatingPointType *pBounds=pDataSet->GetBounds();
+ double *pBounds=pDataSet->GetBounds();
//
for (i=0; i<24; ++i){
aPnts[i]=pBounds[aIndx[i]];
// function: DistanceToPlane
// purpose :
//==================================================================
-vtkFloatingPointType
-DistanceToPlane(const vtkFloatingPointType x[3],
- const vtkFloatingPointType n[3],
- const vtkFloatingPointType p0[3])
+double
+DistanceToPlane(const double x[3],
+ const double n[3],
+ const double p0[3])
{
return ((n[0]*(x[0]-p0[0]) +
n[1]*(x[1]-p0[1]) +
//==================================================================
void VISU_PlanesWidget::SizeHandles()
{
- // vtkFloatingPointType radius =
+ // double radius =
this->vtk3DWidget::SizeHandles(1.35);
}
*/
// Instantiate the object.
static VISU_PlanesWidget *New();
- vtkTypeRevisionMacro(VISU_PlanesWidget,VISU_ImplicitFunctionWidget);
+ vtkTypeMacro(VISU_PlanesWidget,VISU_ImplicitFunctionWidget);
void PrintSelf(ostream& os, vtkIndent indent);
void
- SetDistance(const vtkFloatingPointType theDistance);
+ SetDistance(const double theDistance);
- vtkFloatingPointType
+ double
Distance() const;
- vtkGetMacro(InitialLength,vtkFloatingPointType);
+ vtkGetMacro(InitialLength,double);
virtual
vtkImplicitFunction*
virtual
void
- PlaceWidget(vtkFloatingPointType bounds[6]);
+ PlaceWidget(double bounds[6]);
// Description:
// Get the origin of the plane.
void
- SetOrigin(vtkFloatingPointType x,
- vtkFloatingPointType y,
- vtkFloatingPointType z);
+ SetOrigin(double x,
+ double y,
+ double z);
void
- SetOrigin(vtkFloatingPointType x[3]);
+ SetOrigin(double x[3]);
- vtkFloatingPointType*
+ double*
GetOrigin();
void
- GetOrigin(vtkFloatingPointType xyz[3]);
+ GetOrigin(double xyz[3]);
// Description:
// Get the normal to the plane.
void
- SetNormal(vtkFloatingPointType x,
- vtkFloatingPointType y,
- vtkFloatingPointType z);
+ SetNormal(double x,
+ double y,
+ double z);
void
- SetNormal(vtkFloatingPointType x[3]);
+ SetNormal(double x[3]);
- vtkFloatingPointType*
+ double*
GetNormal();
void
- GetNormal(vtkFloatingPointType xyz[3]);
+ GetNormal(double xyz[3]);
// Description:
// Force the plane widget to be aligned with one of the x-y-z axes.
vtkGetObjectMacro(EdgesProperty,vtkProperty);
void
- InitialPlaceWidget(vtkFloatingPointType bds[6]);
+ InitialPlaceWidget(double bds[6]);
protected:
VISU_PlanesWidget();
void OnMouseMove();
//
// Methods to manipulate the plane
- void ConstrainOrigin(vtkFloatingPointType x[3]);
+ void ConstrainOrigin(double x[3]);
void Rotate(int X, int Y, double *p1, double *p2, double *vpn);
void TranslatePlane(double *p1, double *p2);
void TranslateOutline(double *p1, double *p2);
void HighlightNormal(int highlight);
void HighlightOutline(int highlight);
void UpdateRepresentation();
- void SetOriginInternal(vtkFloatingPointType x[3]);
+ void SetOriginInternal(double x[3]);
// Controlling ivars
int NormalToXAxis;
vtkPlane *myPlane1;
vtkPlane *myPlane2;
- vtkFloatingPointType myDistance;
+ double myDistance;
vtkImplicitBoolean *myImplicitFunction;
// The bounding box is represented by a single voxel image data
VISU_Plot3DPL
::GetOrientation(vtkDataSet* theDataSet)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
theDataSet->GetBounds(aBounds);
- vtkFloatingPointType aDelta[3] = {aBounds[1] - aBounds[0], aBounds[3] - aBounds[2], aBounds[5] - aBounds[4]};
+ double aDelta[3] = {aBounds[1] - aBounds[0], aBounds[3] - aBounds[2], aBounds[5] - aBounds[4]};
if(aDelta[0] >= aDelta[1] && aDelta[0] >= aDelta[2])
if(aDelta[1] >= aDelta[2])
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_Plot3DPL
::GetScaleFactor( VISU_ColoredPL* theColoredPL,
vtkDataSet* theDataSet )
{
- theDataSet->Update();
- vtkFloatingPointType aLength = theDataSet->GetLength(); // diagonal length
+ //theDataSet->Update(); // OUV_PORTING
+ double aLength = theDataSet->GetLength(); // diagonal length
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
theColoredPL->GetSourceRange(aScalarRange);
- static vtkFloatingPointType EPS = 0.3;
- vtkFloatingPointType aRange = aScalarRange[1];
+ static double EPS = 0.3;
+ double aRange = aScalarRange[1];
if(aRange > 0.0)
return aLength / aRange * EPS;
if(VISU::IsQuadraticData(aMergedInput)) // Bug 0020123, note 0005343
throw std::runtime_error("Impossible to build presentation");
- vtkFloatingPointType aPlaneNormal[3];
- vtkFloatingPointType anOrigin[3];
+ double aPlaneNormal[3];
+ double anOrigin[3];
GetBasePlane( anOrigin, aPlaneNormal );
vtkPolyData* aPolyData = 0;
if ( !IsPlanarInput() )
{
aCutPlane = vtkEDFCutter::New();
- aCutPlane->SetInput(aMergedInput);
+ aCutPlane->SetInputData(aMergedInput);
vtkPlane *aPlane = vtkPlane::New();
aPlane->SetOrigin(anOrigin);
aPlane->Delete();
aPolyData = aCutPlane->GetOutput();
- aPolyData->Update();
+ aCutPlane->Update();
}
if ( !aPolyData || aPolyData->GetNumberOfCells() == 0 ) {
- myGeometryFilter->SetInput(aMergedInput);
+ myGeometryFilter->SetInputData(aMergedInput);
aPolyData = myGeometryFilter->GetOutput();
- aPolyData->Update();
+ myGeometryFilter->Update();
}
if ( !myIsContour ) // surface prs
{
if(VISU::IsDataOnCells(aPolyData)) {
- myCellDataToPointData->SetInput(aPolyData);
+ myCellDataToPointData->SetInputData(aPolyData);
myCellDataToPointData->PassCellDataOn();
- myWarpScalar->SetInput(myCellDataToPointData->GetPolyDataOutput());
+ //myWarpScalar->SetInputConnection(myCellDataToPointData->GetPolyDataOutput()); // OUV_PORTING: to check
+ myWarpScalar->SetInputConnection(myCellDataToPointData->GetOutputPort());
}else
- myWarpScalar->SetInput(aPolyData);
+ myWarpScalar->SetInputData(aPolyData);
}
else // contour prs
{
if(VISU::IsDataOnCells(aPolyData)) {
- myCellDataToPointData->SetInput(aPolyData);
+ myCellDataToPointData->SetInputData(aPolyData);
myCellDataToPointData->PassCellDataOn();
- myContourFilter->SetInput(myCellDataToPointData->GetOutput());
+ myContourFilter->SetInputConnection(myCellDataToPointData->GetOutputPort());
}else
- myContourFilter->SetInput(aPolyData);
+ myContourFilter->SetInputData(aPolyData);
- vtkFloatingPointType aScalarRange[2];
+ double aScalarRange[2];
GetSourceRange(aScalarRange);
myContourFilter->GenerateValues(GetNumberOfContours(),aScalarRange);
- myWarpScalar->SetInput(myContourFilter->GetOutput());
+ myWarpScalar->SetInputConnection(myContourFilter->GetOutputPort());
}
VISU_CutPlanesPL::ClearAppendPolyData(myAppendPolyData.GetPointer());
- myAppendPolyData->AddInput(myWarpScalar->GetPolyDataOutput());
+ //myAppendPolyData->AddInputConnection(myWarpScalar->GetPolyDataOutput()); // OUV_PORTING: to check
+ myAppendPolyData->AddInputConnection(myWarpScalar->GetOutputPort());
if ( aCutPlane )
aCutPlane->Delete();
//----------------------------------------------------------------------------
void
VISU_Plot3DPL
-::SetScaleFactor(vtkFloatingPointType theScaleFactor)
+::SetScaleFactor(double theScaleFactor)
{
myScaleFactor = theScaleFactor;
myWarpScalar->SetScaleFactor(theScaleFactor*myMapScaleFactor);
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_Plot3DPL
::GetScaleFactor()
{
//----------------------------------------------------------------------------
void
VISU_Plot3DPL
-::SetPlanePosition(vtkFloatingPointType thePosition,
+::SetPlanePosition(double thePosition,
bool theIsRelative)
{
bool anIsSameValue = VISU::CheckIsSameValue(myIsRelative, theIsRelative);
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_Plot3DPL::
GetRotateX()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_Plot3DPL::
GetRotateY(){
switch(myOrientation){
void
VISU_Plot3DPL::
SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
- vtkFloatingPointType theXAngle,
- vtkFloatingPointType theYAngle)
+ double theXAngle,
+ double theYAngle)
{
bool anIsSameValue = VISU::CheckIsSameValue(GetRotateX(), theXAngle);
anIsSameValue &= VISU::CheckIsSameValue(GetRotateY(), theYAngle);
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_Plot3DPL
::GetPlanePosition()
{
//=======================================================================
void
VISU_Plot3DPL
-::GetBasePlane(vtkFloatingPointType theOrigin[3],
- vtkFloatingPointType theNormal[3],
+::GetBasePlane(double theOrigin[3],
+ double theNormal[3],
bool theCenterOrigine )
{
VISU_CutPlanesPL::GetDir(theNormal,myAngle,myOrientation);
- vtkFloatingPointType aPosition = myPosition;
- vtkFloatingPointType aBounds[6], aBoundPrj[3];
+ double aPosition = myPosition;
+ double aBounds[6], aBoundPrj[3];
if ( myIsRelative )
{
GetInput()->GetBounds(aBounds);
if ( theCenterOrigine ) {
// move theOrigin to the center of aBounds projections to the plane
GetMergedInput()->GetBounds(aBounds);
- vtkFloatingPointType boundPoints[8][3] = {
+ double boundPoints[8][3] = {
{aBounds[0],aBounds[2],aBounds[4]},
{aBounds[1],aBounds[2],aBounds[4]},
{aBounds[0],aBounds[3],aBounds[4]},
{aBounds[1],aBounds[2],aBounds[5]},
{aBounds[0],aBounds[3],aBounds[5]},
{aBounds[1],aBounds[3],aBounds[5]}};
- vtkFloatingPointType newOrigin[3] = { 0,0,0 };
+ double newOrigin[3] = { 0,0,0 };
for(int i = 0; i < 8; i++) {
- vtkFloatingPointType proj[3];
+ double proj[3];
vtkPlane::ProjectPoint( boundPoints[i], theOrigin, theNormal, proj );
newOrigin[0] += proj[0];
newOrigin[1] += proj[1];
//=======================================================================
void
VISU_Plot3DPL
-::GetMinMaxPosition( vtkFloatingPointType& minPos,
- vtkFloatingPointType& maxPos )
+::GetMinMaxPosition( double& minPos,
+ double& maxPos )
{
- vtkFloatingPointType aBounds[6], aBoundPrj[3], aNormal[3];
+ double aBounds[6], aBoundPrj[3], aNormal[3];
VISU_CutPlanesPL::GetDir(aNormal,myAngle,myOrientation);
GetInput()->GetBounds(aBounds);
VISU_CutPlanesPL::GetBoundProject(aBoundPrj,aBounds,aNormal);
void
VISU_Plot3DPL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
myMapScaleFactor = theMapScale;
Superclass::SetMapScale(theMapScale);
if ( myIsContour ) {
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSourceRange(aRange);
- vtkFloatingPointType aNewRange[] = { aRange[1] - theMapScale*(aRange[1]-aRange[0]), aRange[1] };
+ double aNewRange[] = { aRange[1] - theMapScale*(aRange[1]-aRange[0]), aRange[1] };
myContourFilter->GenerateValues(GetNumberOfContours(),aNewRange);
}
myWarpScalar->SetScaleFactor(myScaleFactor*theMapScale);
VISU_CutPlanesPL::PlaneOrientation
GetPlaneOrientation();
- vtkFloatingPointType
+ double
GetRotateX();
- vtkFloatingPointType
+ double
GetRotateY();
void
SetOrientation(VISU_CutPlanesPL::PlaneOrientation theOrientation,
- vtkFloatingPointType theXAngle = 0.0,
- vtkFloatingPointType theYAngle = 0.0);
+ double theXAngle = 0.0,
+ double theYAngle = 0.0);
- vtkFloatingPointType
+ double
GetPlanePosition();
bool
IsPositionRelative();
void
- SetPlanePosition(vtkFloatingPointType thePosition,
+ SetPlanePosition(double thePosition,
bool theIsRelative);
void
- SetScaleFactor(vtkFloatingPointType theScaleFactor);
+ SetScaleFactor(double theScaleFactor);
- vtkFloatingPointType
+ double
GetScaleFactor();
void
GetNumberOfContours();
void
- GetBasePlane (vtkFloatingPointType theOrigin[3],
- vtkFloatingPointType theNormal[3],
+ GetBasePlane (double theOrigin[3],
+ double theNormal[3],
bool theCenterOrigine = false );
void
- GetMinMaxPosition( vtkFloatingPointType& minPos,
- vtkFloatingPointType& maxPos );
+ GetMinMaxPosition( double& minPos,
+ double& maxPos );
public:
virtual
GetOrientation(vtkDataSet* theDataSet);
static
- vtkFloatingPointType
+ double
GetScaleFactor( VISU_ColoredPL* theColoredPL,
vtkDataSet* theDataSet );
void
- SetMapScale(vtkFloatingPointType theMapScale);
+ SetMapScale(double theMapScale);
protected:
VISU_Plot3DPL();
DoShallowCopy(VISU_PipeLine *thePipeLine,
bool theIsCopyInput);
- vtkFloatingPointType myAngle[3];
+ double myAngle[3];
bool myIsRelative, myIsContour;
- vtkFloatingPointType myPosition, myScaleFactor, myMapScaleFactor;
+ double myPosition, myScaleFactor, myMapScaleFactor;
VISU_CutPlanesPL::PlaneOrientation myOrientation;
vtkSmartPointer<VISU_CellDataToPointData> myCellDataToPointData;
VISU_PolyDataMapperHolder
::SetPolyDataIDMapper(const VISU::PPolyDataIDMapper& theIDMapper)
{
- myExtractPolyDataGeometry->SetInput(theIDMapper->GetPolyDataOutput());
+ myExtractPolyDataGeometry->SetInputData(theIDMapper->GetPolyDataOutput());
myPolyDataIDMapper = theIDMapper;
SetIDMapper(theIDMapper);
}
}
//----------------------------------------------------------------------------
-vtkFloatingPointType*
+double*
VISU_PolyDataMapperHolder
::GetNodeCoord(vtkIdType theObjID)
{
GetNodeVTKID(vtkIdType theID);
virtual
- vtkFloatingPointType*
+ double*
GetNodeCoord(vtkIdType theObjID);
virtual
using namespace std;
-vtkCxxRevisionMacro(VISU_ScalarBarActor, "$Revision$");
-
vtkCxxSetObjectMacro(VISU_ScalarBarActor,LookupTable,VISU_LookupTable);
vtkCxxSetObjectMacro(VISU_ScalarBarActor,LabelTextProperty,vtkTextProperty);
vtkCxxSetObjectMacro(VISU_ScalarBarActor,TitleTextProperty,vtkTextProperty);
this->ScalarBar = vtkPolyData::New();
this->ScalarBarMapper = vtkPolyDataMapper2D::New();
- this->ScalarBarMapper->SetInput(this->ScalarBar);
+ this->ScalarBarMapper->SetInputData(this->ScalarBar);
this->ScalarBarActor = vtkActor2D::New();
this->ScalarBarActor->SetMapper(this->ScalarBarMapper);
this->ScalarBarActor->GetPositionCoordinate()->
// we hard code how many steps to display
int numColors = this->MaximumNumberOfColors;
- vtkFloatingPointType *range = lut->GetRange();
+ double *range = lut->GetRange();
int numPts = 2*(numColors + 1);
vtkPoints *pts = vtkPoints::New();
this->SizeBar(barWidth, barHeight, size, viewport, range);
// generate points
- vtkFloatingPointType x[3]; x[2] = 0.0;
- vtkFloatingPointType delta, val;
+ double x[3]; x[2] = 0.0;
+ double delta, val;
if ( this->Orientation == VTK_ORIENT_VERTICAL )
{
- delta=(vtkFloatingPointType)barHeight/numColors;
+ delta=(double)barHeight/numColors;
for (i=0; i<numPts/2; i++)
{
x[0] = 0;
}
else
{
- delta=(vtkFloatingPointType)barWidth/numColors;
+ delta=(double)barWidth/numColors;
for (i=0; i<numPts/2; i++)
{
x[0] = i*delta;
polys->InsertNextCell(4,ptIds);
if ( isLogTable ){ //SALOME specific
- vtkFloatingPointType rgbval = log10(range[0]) +
+ double rgbval = log10(range[0]) +
i*(log10(range[1])-log10(range[0]))/(numColors -1);
rgba = lut->MapValue(rgbval);
}else{
rgba = lut->MapValue(range[0] + (range[1] - range[0])*
- ((vtkFloatingPointType)i /(numColors-1.0)));
+ ((double)i /(numColors-1.0)));
}
rgb = colors->GetPointer(3*i); //write into array directly
for (i=0; i < this->NumberOfLabels; i++)
{
- val = (vtkFloatingPointType)i/(this->NumberOfLabels-1) *barHeight;
+ val = (double)i/(this->NumberOfLabels-1) *barHeight;
this->TextMappers[i]->GetSize(viewport,sizeTextData);
this->TextMappers[i]->GetTextProperty()->SetJustificationToLeft();
this->TextActors[i]->SetPosition(barWidth+3,
for (i=0; i < this->NumberOfLabels; i++)
{
this->TextMappers[i]->GetTextProperty()->SetJustificationToCentered();
- val = (vtkFloatingPointType)i/(this->NumberOfLabels-1) * barWidth;
+ val = (double)i/(this->NumberOfLabels-1) * barWidth;
this->TextActors[i]->SetPosition(val, barHeight + 0.05*size[1]);
}
void VISU_ScalarBarActor::AllocateAndSizeLabels(int *labelSize, int *size,
vtkViewport *viewport,
- vtkFloatingPointType *range)
+ double *range)
{
labelSize[0] = labelSize[1] = 0;
char string[512];
- vtkFloatingPointType val;
+ double val;
int i;
// TODO: this should be optimized, maybe by keeping a list of
this->TextMappers[i] = vtkTextMapper::New();
if(isLogTable && 0 < i && i < this->NumberOfLabels - 1){ // SALOME specific
- vtkFloatingPointType lval = log10(range[0]) + (vtkFloatingPointType)i/(this->NumberOfLabels-1) *
+ double lval = log10(range[0]) + (double)i/(this->NumberOfLabels-1) *
(log10(range[1])-log10(range[0]));
val = pow((double)10,(double)lval);
}else{
- val = range[0] + (vtkFloatingPointType)i/(this->NumberOfLabels-1) * (range[1]-range[0]);
+ val = range[0] + (double)i/(this->NumberOfLabels-1) * (range[1]-range[0]);
}
sprintf(string, this->LabelFormat, val);
this->TextMappers[i]->SetInput(string);
}
void VISU_ScalarBarActor::SizeBar(int& barSizeWidth, int& barSizeHeight, int *size,
- vtkViewport *viewport, vtkFloatingPointType *range)
+ vtkViewport *viewport, double *range)
{
if(BarRatioWidth == 0)
if ( this->Orientation == VTK_ORIENT_VERTICAL )
class VISU_PIPELINE_EXPORT VISU_ScalarBarActor : public vtkActor2D
{
public:
- vtkTypeRevisionMacro(VISU_ScalarBarActor,vtkActor2D);
+ vtkTypeMacro(VISU_ScalarBarActor,vtkActor2D);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
vtkTextMapper **TextMappers;
virtual void AllocateAndSizeLabels(int *labelSize, int *size,
- vtkViewport *viewport, vtkFloatingPointType *range);
+ vtkViewport *viewport, double *range);
private:
vtkTextMapper *TitleMapper;
void SizeTitle(int *titleSize, int *size, vtkViewport *viewport);
void SizeBar(int& barSizeWidth, int& barSizeHeight, int *size,
- vtkViewport *viewport, vtkFloatingPointType *range);
+ vtkViewport *viewport, double *range);
/** Place the distribution plot actor in the viewport according to the
* scalar bar location and orientation */
//----------------------------------------------------------------------------
void
VISU_ScalarBarCtrl
-::SetRangeLocal(vtkFloatingPointType *theRange)
+::SetRangeLocal(double *theRange)
{
myLocalLookupTable->SetTableRange(theRange);
}
void
VISU_ScalarBarCtrl
-::SetRangeLocal(vtkFloatingPointType theMin,
- vtkFloatingPointType theMax)
+::SetRangeLocal(double theMin,
+ double theMax)
{
myLocalLookupTable->SetTableRange(theMin,theMax);
}
//----------------------------------------------------------------------------
void
VISU_ScalarBarCtrl
-::SetRangeGlobal(vtkFloatingPointType *theRange)
+::SetRangeGlobal(double *theRange)
{
myGlobalLookupTable->SetTableRange(theRange);
}
void
VISU_ScalarBarCtrl
-::SetRangeGlobal(vtkFloatingPointType theMin,
- vtkFloatingPointType theMax)
+::SetRangeGlobal(double theMin,
+ double theMax)
{
myGlobalLookupTable->SetTableRange(theMin,theMax);
}
//----------------------------------------------------------------------------
void
VISU_ScalarBarCtrl
-::SetWidth(vtkFloatingPointType theWidth)
+::SetWidth(double theWidth)
{
myGlobalScalarBar->SetWidth(theWidth);
myLocalScalarBar->SetWidth(theWidth);
}
-vtkFloatingPointType
+double
VISU_ScalarBarCtrl
::GetWidth() const
{
//----------------------------------------------------------------------------
void
VISU_ScalarBarCtrl
-::SetHeight(vtkFloatingPointType theHeight)
+::SetHeight(double theHeight)
{
myGlobalScalarBar->SetHeight(theHeight);
myLocalScalarBar->SetHeight(theHeight);
}
-vtkFloatingPointType
+double
VISU_ScalarBarCtrl
::GetHeight() const
{
//----------------------------------------------------------------------------
void
VISU_ScalarBarCtrl
-::SetPosition(const vtkFloatingPointType* thePosition)
+::SetPosition(const double* thePosition)
{
myPosition[0] = thePosition[0];
myPosition[1] = thePosition[1];
}
-const vtkFloatingPointType*
+const double*
VISU_ScalarBarCtrl::GetPosition() const
{
return myPosition;
//----------------------------------------------------------------------------
void
VISU_ScalarBarCtrl
-::SetSpacing(const vtkFloatingPointType theSpacing)
+::SetSpacing(const double theSpacing)
{
myDistance = theSpacing;
}
-vtkFloatingPointType
+double
VISU_ScalarBarCtrl
::GetSpacing() const
{
//----------------------------------------------------------------------------
void
VISU_ScalarBarCtrl
-::SetMarkValue(const vtkFloatingPointType theValue)
+::SetMarkValue(const double theValue)
{
myMarkedValue = theValue;
}
-vtkFloatingPointType
+double
VISU_ScalarBarCtrl
::GetMarkValue() const
{
}
}
if(myGlobalRangeIsDefined){
- vtkFloatingPointType aLocalRange[2];
+ double aLocalRange[2];
myLocalLookupTable->GetTableRange(aLocalRange);
myGlobalLookupTable->MarkValueByColor( aLocalRange[0], myBlack );
myGlobalLookupTable->MarkValueByColor( aLocalRange[1], myBlack );
vtkCoordinate * aCoordinate = theScalarBarActor->GetPositionCoordinate();
aCoordinate->SetCoordinateSystemToNormalizedViewport();
if(theScalarBarActor->GetOrientation() == VTK_ORIENT_VERTICAL){
- vtkFloatingPointType aWidth = theScalarBarActor->GetWidth();
+ double aWidth = theScalarBarActor->GetWidth();
aCoordinate->SetValue(myPosition[0]+theId*(aWidth+myDistance), myPosition[1]);
}else{
- vtkFloatingPointType aHeight = theScalarBarActor->GetHeight();
+ double aHeight = theScalarBarActor->GetHeight();
aCoordinate->SetValue(myPosition[0], myPosition[1]+theId*(aHeight+myDistance));
}
// Initialize Lookup Tables and Scalar Bars
// Ranges
void
- SetRangeGlobal(vtkFloatingPointType theMin,
- vtkFloatingPointType theMax);
+ SetRangeGlobal(double theMin,
+ double theMax);
void
- SetRangeGlobal(vtkFloatingPointType *theRange);
+ SetRangeGlobal(double *theRange);
void
SetGlobalRangeIsDefined(bool theIsDefined);
void
- SetRangeLocal(vtkFloatingPointType theMin,
- vtkFloatingPointType theMax);
+ SetRangeLocal(double theMin,
+ double theMax);
void
- SetRangeLocal(vtkFloatingPointType *theRange);
+ SetRangeLocal(double *theRange);
// Selectors
VISU_ScalarBarActor*
// Position
void
- SetWidth(const vtkFloatingPointType theWidth);
+ SetWidth(const double theWidth);
- vtkFloatingPointType
+ double
GetWidth() const;
void
- SetHeight(const vtkFloatingPointType theHeight);
+ SetHeight(const double theHeight);
- vtkFloatingPointType
+ double
GetHeight() const;
void
- SetPosition(const vtkFloatingPointType* thePosition);
+ SetPosition(const double* thePosition);
- const vtkFloatingPointType*
+ const double*
GetPosition() const;
//
// Spacing
void
- SetSpacing(const vtkFloatingPointType theSpacing);
+ SetSpacing(const double theSpacing);
- vtkFloatingPointType
+ double
GetSpacing() const;
//
// Rainbow/bicolor
//
// Misc
void
- SetMarkValue(const vtkFloatingPointType theValue);
+ SetMarkValue(const double theValue);
- vtkFloatingPointType
+ double
GetMarkValue() const;
void
EMode myMode;
bool myGlobalRangeIsDefined;
- vtkFloatingPointType myDistance;
- vtkFloatingPointType myPosition[2];
+ double myDistance;
+ double myPosition[2];
bool myBicolor;
int myCtrlVisibility;
unsigned char myGrey[3];
//
bool myMarked;
- vtkFloatingPointType myMarkedValue;
+ double myMarkedValue;
//
VISU_ScalarBarActor *myGlobalScalarBar;
VISU_LookupTable *myGlobalLookupTable;
myMergeFilter->AddField("VISU_POINTS_MAPPER", aDataSet);
myMergeFilter->AddField("ELNO_POINT_COORDS", aDataSet);
- myElnoAssembleFilter->SetInput( InsertCustomPL() );
+ myElnoAssembleFilter->SetInputData( InsertCustomPL() );
- GetDataSetMapper()->SetInput( myElnoAssembleFilter->GetOutput() );
+ GetDataSetMapper()->SetInputConnection( myElnoAssembleFilter->GetOutputPort() );
}
{
if(IsExternalGeometryUsed()){
ClearGeometry();
- myAppendFilter->AddInput(GetClippedInput());
+ myAppendFilter->AddInputData(GetClippedInput());
}
}
if(!IsExternalGeometryUsed())
ClearGeometry();
AddGeometryName(theGeomName);
- myAppendFilter->AddInput(theGeometry);
+ myAppendFilter->AddInputData(theGeometry);
return GetNumberOfGeometry();
}
//----------------------------------------------------------------------------
void
VISU_ScalarMapPL
-::GetSourceRange(vtkFloatingPointType theRange[2])
+::GetSourceRange(double theRange[2])
{
if(!IsExternalGeometryUsed())
Superclass::GetSourceRange(theRange);
virtual
void
- GetSourceRange(vtkFloatingPointType theRange[2]);
+ GetSourceRange(double theRange[2]);
virtual
void
#include <vtkImplicitSum.h>
#include <vtkImplicitFunction.h>
-vtkCxxRevisionMacro(VISU_SphereWidget, "$Revision$");
vtkStandardNewMacro(VISU_SphereWidget);
//====================================================================
// function:
mySphereSource->SetPhiResolution(15);
mySphereSource->LatLongTessellationOn();
mySphereMapper = vtkPolyDataMapper::New();
- mySphereMapper->SetInput(mySphereSource->GetOutput());
+ mySphereMapper->SetInputConnection(mySphereSource->GetOutputPort());
mySphereActor = vtkActor::New();
mySphereActor->SetMapper(mySphereMapper);
//
// Define the point coordinates
- vtkFloatingPointType bounds[6];
+ double bounds[6];
for(int i = 0; i < 6; i += 2){
bounds[i]=-.5;
bounds[i+1]=-bounds[i];
// function: SetRadius
// purpose :
//====================================================================
-void VISU_SphereWidget::SetRadius(vtkFloatingPointType theRadius)
+void VISU_SphereWidget::SetRadius(double theRadius)
{
if ( theRadius <= myRmin ) {
theRadius = myRmin;
// function: GetRadius
// purpose :
//====================================================================
-vtkFloatingPointType VISU_SphereWidget::GetRadius()
+double VISU_SphereWidget::GetRadius()
{
return mySphereSource->GetRadius();
}
// function: SetCenter
// purpose :
//====================================================================
-void VISU_SphereWidget::SetCenter(vtkFloatingPointType theCenter[3])
+void VISU_SphereWidget::SetCenter(double theCenter[3])
{
mySphereSource->SetCenter(theCenter);
mySphere->SetCenter(theCenter);
// function: SetCenter
// purpose :
//====================================================================
-void VISU_SphereWidget::SetCenter(vtkFloatingPointType theX, vtkFloatingPointType theY, vtkFloatingPointType theZ)
+void VISU_SphereWidget::SetCenter(double theX, double theY, double theZ)
{
- vtkFloatingPointType aCenter[3] = {theX, theY, theZ};
+ double aCenter[3] = {theX, theY, theZ};
SetCenter(aCenter);
}
// function: GetCenter
// purpose :
//====================================================================
-vtkFloatingPointType* VISU_SphereWidget::GetCenter()
+double* VISU_SphereWidget::GetCenter()
{
return mySphereSource->GetCenter();
}
// function: GetCenter
// purpose :
//====================================================================
-void VISU_SphereWidget::GetCenter(vtkFloatingPointType theCenter[3])
+void VISU_SphereWidget::GetCenter(double theCenter[3])
{
mySphereSource->GetCenter(theCenter);
}
//====================================================================
void VISU_SphereWidget::Translate(double *p1, double *p2)
{
- vtkFloatingPointType v[3], aC[3], aC1[3];
+ double v[3], aC[3], aC1[3];
//
v[0] = p2[0] - p1[0];
v[1] = p2[1] - p1[1];
v[1] = p2[1] - p1[1];
v[2] = p2[2] - p1[2];
//
- vtkFloatingPointType aC[3], aR, sf, aR1;
+ double aC[3], aR, sf, aR1;
aR=mySphereSource->GetRadius();
mySphereSource->GetCenter(aC);
sf=vtkMath::Norm(v)/aR;
// function:PlaceWidget
// purpose:
//====================================================================
-void VISU_SphereWidget::PlaceWidget(vtkFloatingPointType bds[6])
+void VISU_SphereWidget::PlaceWidget(double bds[6])
{
- vtkFloatingPointType bounds[6], center[3], radius;
+ double bounds[6], center[3], radius;
this->AdjustBounds(bds, bounds, center);
- vtkFloatingPointType dX, dY, dZ;
+ double dX, dY, dZ;
//
dX=bounds[1]-bounds[0];
dY=bounds[3]-bounds[2];
(bounds[3]-bounds[2])*(bounds[3]-bounds[2]) +
(bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
- static vtkFloatingPointType EPS = 1.0E-1;
+ static double EPS = 1.0E-1;
myRmin = EPS*InitialLength;
}
// Description:
// Instantiate the object.
static VISU_SphereWidget *New();
- vtkTypeRevisionMacro(VISU_SphereWidget,VISU_ImplicitFunctionWidget);
+ vtkTypeMacro(VISU_SphereWidget,VISU_ImplicitFunctionWidget);
void PrintSelf(ostream& os, vtkIndent indent);
virtual vtkImplicitFunction* ImplicitFunction();
virtual void SetEnabled(int);
//
//PlaceWidget
- virtual void PlaceWidget(vtkFloatingPointType bounds[6]);
+ virtual void PlaceWidget(double bounds[6]);
//
// Description:
// Set/Get the resolution of the sphere in the Theta direction.
// Description:
// Set/Get the radius of sphere. Default is .5.
- void SetRadius(vtkFloatingPointType r);
- vtkFloatingPointType GetRadius();
+ void SetRadius(double r);
+ double GetRadius();
// Description:
// Set/Get the center of the sphere.
- void SetCenter(vtkFloatingPointType x,
- vtkFloatingPointType y,
- vtkFloatingPointType z);
- void SetCenter(vtkFloatingPointType x[3]);
+ void SetCenter(double x,
+ double y,
+ double z);
+ void SetCenter(double x[3]);
- vtkFloatingPointType* GetCenter();
- void GetCenter(vtkFloatingPointType xyz[3]);
+ double* GetCenter();
+ void GetCenter(double xyz[3]);
// Description:
// Set the ratio of the radius changing.
- void SetRatio(vtkFloatingPointType r) { myRatio = r; }
- vtkFloatingPointType GetRatio() { return myRatio; }
+ void SetRatio(double r) { myRatio = r; }
+ double GetRatio() { return myRatio; }
void ChangeRadius(bool up);
// the manipulator in general.
vtkProperty *mySphereProperty;
vtkProperty *mySelectedSphereProperty;
- vtkFloatingPointType myRmin;
+ double myRmin;
vtkSphere *mySphere;
vtkImplicitSum* myImplicitSum;
- vtkFloatingPointType myRatio;
+ double myRatio;
private:
VISU_SphereWidget(const VISU_SphereWidget&); //Not implemented
void operator=(const VISU_SphereWidget&); //Not implemented
#include "vtkPolyData.h"
#include "vtkPolyLine.h"
-vtkCxxRevisionMacro(VISU_StreamLine, "$Revision$");
vtkStandardNewMacro(VISU_StreamLine);
// Construct object with step size set to 1.0.
class VISU_PIPELINE_EXPORT VISU_StreamLine : public VISU_Streamer
{
public:
- vtkTypeRevisionMacro(VISU_StreamLine,VISU_Streamer);
+ vtkTypeMacro(VISU_StreamLine,VISU_Streamer);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
static int MYDEBUG = 0;
#endif
-static vtkFloatingPointType EPS = 1.0e-7;
-static vtkFloatingPointType aMinNbOfSteps = 1.0E+2;
-//static vtkFloatingPointType aMaxNbOfSteps = 1.0E+3;
-static vtkFloatingPointType aCoeffOfIntStep = 1.0E+1;
+static double EPS = 1.0e-7;
+static double aMinNbOfSteps = 1.0E+2;
+//static double aMaxNbOfSteps = 1.0E+3;
+static double aCoeffOfIntStep = 1.0E+1;
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetNecasseryMemorySize(vtkIdType theNbOfPoints,
- vtkFloatingPointType theStepLength,
- vtkFloatingPointType thePropogationTime,
- vtkFloatingPointType thePercents)
+ double theStepLength,
+ double thePropogationTime,
+ double thePercents)
{
- static vtkFloatingPointType aStreamPointSize = sizeof(vtkFloatingPointType)*15 + sizeof(vtkIdType)*2;
- static vtkFloatingPointType aStreamArraySize = aStreamPointSize*1024; // == 69632
+ static double aStreamPointSize = sizeof(double)*15 + sizeof(vtkIdType)*2;
+ static double aStreamArraySize = aStreamPointSize*1024; // == 69632
- vtkFloatingPointType aNbCells = thePercents*theNbOfPoints*2.0;
- vtkFloatingPointType aNbPointsPerCell = thePropogationTime/theStepLength;
- vtkFloatingPointType aCellsSize = aNbCells*(1+aNbPointsPerCell);
- vtkFloatingPointType aPointsSize = aCellsSize*3.0*sizeof(vtkFloatingPointType);
+ double aNbCells = thePercents*theNbOfPoints*2.0;
+ double aNbPointsPerCell = thePropogationTime/theStepLength;
+ double aCellsSize = aNbCells*(1+aNbPointsPerCell);
+ double aPointsSize = aCellsSize*3.0*sizeof(double);
- vtkFloatingPointType aConnectivitySize = aCellsSize*sizeof(vtkIdType);
- vtkFloatingPointType aTypesSize = aNbCells*sizeof(char);
- vtkFloatingPointType aLocationsSize = aNbCells*sizeof(int);
- //vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
- vtkFloatingPointType aMeshSize = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize;
+ double aConnectivitySize = aCellsSize*sizeof(vtkIdType);
+ double aTypesSize = aNbCells*sizeof(char);
+ double aLocationsSize = aNbCells*sizeof(int);
+ //double aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+ double aMeshSize = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize;
- vtkFloatingPointType anAssignedDataSize = aCellsSize*4.0*sizeof(vtkFloatingPointType);
- vtkFloatingPointType anOutputDataSetSize = aMeshSize + anAssignedDataSize;
+ double anAssignedDataSize = aCellsSize*4.0*sizeof(double);
+ double anOutputDataSetSize = aMeshSize + anAssignedDataSize;
- vtkFloatingPointType aResult = aStreamArraySize*aNbCells + anOutputDataSetSize;
+ double aResult = aStreamArraySize*aNbCells + anOutputDataSetSize;
return aResult;
}
size_t
VISU_StreamLinesPL
::FindPossibleParams(vtkDataSet* theDataSet,
- vtkFloatingPointType& theStepLength,
- vtkFloatingPointType& thePropogationTime,
- vtkFloatingPointType& thePercents)
+ double& theStepLength,
+ double& thePropogationTime,
+ double& thePercents)
{
- static vtkFloatingPointType aPercentsDecrease = 3.0, aStepLengthIncrease = 9.0;
+ static double aPercentsDecrease = 3.0, aStepLengthIncrease = 9.0;
vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints();
- vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents);
+ double aSize = GetNecasseryMemorySize(aNbOfPoints,theStepLength,thePropogationTime,thePercents);
size_t anIsPossible = CheckAvailableMemory(aSize);
if(!anIsPossible){
- vtkFloatingPointType aMaxStepLength = std::max(GetMaxStepLength(theDataSet),thePropogationTime);
- vtkFloatingPointType aMinStepLength = GetMinStepLength(theDataSet,thePercents);
- vtkFloatingPointType aDeltaStepLength = (aMaxStepLength - aMinStepLength)/aStepLengthIncrease;
+ double aMaxStepLength = std::max(GetMaxStepLength(theDataSet),thePropogationTime);
+ double aMinStepLength = GetMinStepLength(theDataSet,thePercents);
+ double aDeltaStepLength = (aMaxStepLength - aMinStepLength)/aStepLengthIncrease;
for(int i = 2, aStepChanged = 1, aPerecentsChanged = 1; aStepChanged || aPerecentsChanged; i++){
- vtkFloatingPointType aStepLength = theStepLength + aDeltaStepLength;
+ double aStepLength = theStepLength + aDeltaStepLength;
if(aStepLength < aMaxStepLength) theStepLength = aStepLength;
else if(aStepChanged){
aStepLength = aMaxStepLength;
aStepChanged = 0;
}
- vtkFloatingPointType aPercents = thePercents /= aPercentsDecrease;
+ double aPercents = thePercents /= aPercentsDecrease;
if(aPercents*aNbOfPoints > 1) thePercents = aPercents;
else if(aPerecentsChanged) {
thePercents = 1.1 / aNbOfPoints;
//----------------------------------------------------------------------------
size_t
VISU_StreamLinesPL
-::SetParams(vtkFloatingPointType theIntStep,
- vtkFloatingPointType thePropogationTime,
- vtkFloatingPointType theStepLength,
+::SetParams(double theIntStep,
+ double thePropogationTime,
+ double theStepLength,
vtkPointSet* theSource,
- vtkFloatingPointType thePercents,
+ double thePercents,
int theDirection)
{
vtkPointSet* aDataSet = theSource? theSource: GetMergedInput();
- aDataSet->Update();
+ //aDataSet->Update(); // OUV_PORTING
vtkIdType aNbOfPoints = aDataSet->GetNumberOfPoints();
vtkDataSet* aPointSet = GetExtractorFilter()->GetOutput();
thePropogationTime,
thePercents);
+ // OUV_PORTING: to do
+ /*
if (anIsAccepted) {
mySource = theSource;
myPercents = thePercents;
myStream->Modified();
Modified();
}
+ */
return anIsAccepted;
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetUsedPoints()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetVelocityCoeff()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetVelocityCoeff(vtkDataSet* theDataSet)
{
- vtkFloatingPointType* aScalarRange = theDataSet->GetScalarRange();
- vtkFloatingPointType aVelocity = (fabs(aScalarRange[1]) + fabs(aScalarRange[0]))/2.0;
+ double* aScalarRange = theDataSet->GetScalarRange();
+ double aVelocity = (fabs(aScalarRange[1]) + fabs(aScalarRange[0]))/2.0;
if (aVelocity < EPS)
return EPS;
VISU_StreamLinesPL
::IsPossible(vtkPointSet* theDataSet)
{
- vtkFloatingPointType aPercents = GetUsedPointsDefault();
- vtkFloatingPointType aStepLength = GetBaseStepLength(theDataSet,
+ double aPercents = GetUsedPointsDefault();
+ double aStepLength = GetBaseStepLength(theDataSet,
aPercents);
- vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet);
+ double aBasePropTime = GetBasePropagationTime(theDataSet);
VISU_MaskPointsFilter *aPointsFilter = VISU_MaskPointsFilter::New();
- aPointsFilter->SetInput(theDataSet);
+ aPointsFilter->SetInputData(theDataSet);
vtkDataSet* aDataSet = aPointsFilter->GetOutput();
- aDataSet->Update();
+ aPointsFilter->Update();
size_t aRes = FindPossibleParams(aDataSet,
aStepLength,
aBasePropTime,
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetIntegrationStep()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetStepLength()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetPropagationTime()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMinIntegrationStep(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
if(!theDataSet)
return -1.0;
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
int degree = 0;
- vtkFloatingPointType aVolume = 1.0;
- vtkFloatingPointType* aBounds = theDataSet->GetBounds();
+ double aVolume = 1.0;
+ double* aBounds = theDataSet->GetBounds();
for(int i = 0, j = 0; i < 3; ++i, j = 2*i){
- vtkFloatingPointType tmp = aBounds[j+1] - aBounds[j];
+ double tmp = aBounds[j+1] - aBounds[j];
if (tmp > EPS ) {
aVolume *= tmp;
degree += 1;
if (degree < 1)
return 0.0; // absolutely empty object
- vtkFloatingPointType anStepLength = GetMaxIntegrationStep(theDataSet)/aCoeffOfIntStep;
+ double anStepLength = GetMaxIntegrationStep(theDataSet)/aCoeffOfIntStep;
// 0020724: last division has been commented, seems to be a logical mistake (to discuss with APO)
- vtkFloatingPointType aBasePropTime = GetBasePropagationTime(theDataSet); // /GetVelocityCoeff(theDataSet)
+ double aBasePropTime = GetBasePropagationTime(theDataSet); // /GetVelocityCoeff(theDataSet)
thePercents = 1.0;
vtkIdType aNbOfPoints = theDataSet->GetNumberOfPoints();
- vtkFloatingPointType aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents);
+ double aSize = GetNecasseryMemorySize(aNbOfPoints,anStepLength,aBasePropTime,thePercents);
size_t aRealSize = GetAvailableMemory(aSize);
- vtkFloatingPointType anAverageVolume = aVolume / aRealSize;
- vtkFloatingPointType aStep = pow(double(anAverageVolume), double(1.0/double(degree)));
+ double anAverageVolume = aVolume / aRealSize;
+ double aStep = pow(double(anAverageVolume), double(1.0/double(degree)));
return aStep;
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMinIntegrationStep()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMaxIntegrationStep(vtkDataSet* theDataSet)
{
if(!theDataSet)
return -1.0;
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
- vtkFloatingPointType aLength = theDataSet->GetLength();
- vtkFloatingPointType* aBounds = theDataSet->GetBounds();
- vtkFloatingPointType aMaxSizeY = (aBounds[3]-aBounds[2])/aLength;
- vtkFloatingPointType aMaxSizeZ = (aBounds[5]-aBounds[4])/aLength;
- vtkFloatingPointType aMinMax = (aBounds[1] - aBounds[0])/aLength;
+ double aLength = theDataSet->GetLength();
+ double* aBounds = theDataSet->GetBounds();
+ double aMaxSizeY = (aBounds[3]-aBounds[2])/aLength;
+ double aMaxSizeZ = (aBounds[5]-aBounds[4])/aLength;
+ double aMinMax = (aBounds[1] - aBounds[0])/aLength;
if (aMinMax < EPS || (aMaxSizeY < aMinMax && aMaxSizeY > EPS))
aMinMax = aMaxSizeY;
if (aMinMax < EPS || (aMaxSizeZ < aMinMax && aMaxSizeZ > EPS))
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMaxIntegrationStep()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetBaseIntegrationStep(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
- vtkFloatingPointType aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
- vtkFloatingPointType anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
- vtkFloatingPointType aMinMax = theDataSet->GetLength() / theDataSet->GetNumberOfPoints();
+ double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
+ double anIntegrationStep = aMaxIntegrationStep / aCoeffOfIntStep;
+ double aMinMax = theDataSet->GetLength() / theDataSet->GetNumberOfPoints();
if(aMinMax > anIntegrationStep)
anIntegrationStep = (anIntegrationStep*aCoeffOfIntStep*0.9+aMinMax)/aCoeffOfIntStep;
- vtkFloatingPointType aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
+ double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
if(aMinIntegrationStep > anIntegrationStep)
anIntegrationStep = aMinIntegrationStep;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
-::CorrectIntegrationStep(vtkFloatingPointType theStep,
+::CorrectIntegrationStep(double theStep,
vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
- theDataSet->Update();
+ //theDataSet->Update(); // OUV_PORTING
- vtkFloatingPointType aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
+ double aMinIntegrationStep = GetMinIntegrationStep(theDataSet, thePercents);
if(aMinIntegrationStep > theStep)
theStep = aMinIntegrationStep;
- vtkFloatingPointType aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
+ double aMaxIntegrationStep = GetMaxIntegrationStep(theDataSet);
if(aMaxIntegrationStep < theStep)
theStep = aMaxIntegrationStep;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMinPropagationTime(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
if(!theDataSet)
return -1.0;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMinPropagationTime()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMaxPropagationTime(vtkDataSet* theDataSet)
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMaxPropagationTime()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
-::CorrectPropagationTime(vtkFloatingPointType thePropagationTime,
+::CorrectPropagationTime(double thePropagationTime,
vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
- vtkFloatingPointType aMinPropagationTime = GetMinPropagationTime(theDataSet, thePercents);
+ double aMinPropagationTime = GetMinPropagationTime(theDataSet, thePercents);
if(aMinPropagationTime > thePropagationTime)
thePropagationTime = aMinPropagationTime;
- vtkFloatingPointType aMaxPropagationTime = GetMaxPropagationTime(theDataSet);
+ double aMaxPropagationTime = GetMaxPropagationTime(theDataSet);
if(aMaxPropagationTime < thePropagationTime)
thePropagationTime = aMaxPropagationTime;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetBasePropagationTime(vtkDataSet* theDataSet)
{
if(!theDataSet)
return -1.0;
- theDataSet->Update();
- vtkFloatingPointType aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet);
+ //theDataSet->Update(); // OUV_PORTING
+ double aPropagationTime = theDataSet->GetLength() / GetVelocityCoeff(theDataSet);
return aPropagationTime;
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetBasePropagationTime()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMinStepLength(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
- static vtkFloatingPointType aNbOfStepsOfIntStep = 1.0E+1;
- vtkFloatingPointType anIntStep = GetMinIntegrationStep(theDataSet, thePercents);
- vtkFloatingPointType aStepLength = anIntStep * aNbOfStepsOfIntStep / GetVelocityCoeff(theDataSet);
+ static double aNbOfStepsOfIntStep = 1.0E+1;
+ double anIntStep = GetMinIntegrationStep(theDataSet, thePercents);
+ double aStepLength = anIntStep * aNbOfStepsOfIntStep / GetVelocityCoeff(theDataSet);
return aStepLength;
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMinStepLength()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMaxStepLength(vtkDataSet* theDataSet)
{
- vtkFloatingPointType aStepLength = GetBasePropagationTime(theDataSet);
+ double aStepLength = GetBasePropagationTime(theDataSet);
return aStepLength;
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetMaxStepLength()
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
-::CorrectStepLength(vtkFloatingPointType theStep,
+::CorrectStepLength(double theStep,
vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
- vtkFloatingPointType aMinStep = GetMinStepLength(theDataSet, thePercents);
+ double aMinStep = GetMinStepLength(theDataSet, thePercents);
if(theStep < aMinStep)
theStep = aMinStep;
- vtkFloatingPointType aMaxStep = GetMaxStepLength(theDataSet);
+ double aMaxStep = GetMaxStepLength(theDataSet);
if(theStep > aMaxStep)
theStep = aMaxStep;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetBaseStepLength(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents)
+ double thePercents)
{
- static vtkFloatingPointType anAvgNbOfSteps = 1.0E+2;
- vtkFloatingPointType aPropagationTime = GetBasePropagationTime(theDataSet);
- vtkFloatingPointType aStepLength = aPropagationTime/anAvgNbOfSteps;
+ static double anAvgNbOfSteps = 1.0E+2;
+ double aPropagationTime = GetBasePropagationTime(theDataSet);
+ double aStepLength = aPropagationTime/anAvgNbOfSteps;
aStepLength = CorrectStepLength(aStepLength,theDataSet,thePercents);
return aStepLength;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_StreamLinesPL
::GetUsedPointsDefault()
{
Superclass::Init();
vtkDataSet* aDataSet = GetExtractorFilter()->GetOutput();
- vtkFloatingPointType anIntStep = GetBaseIntegrationStep(aDataSet, GetUsedPoints());
- vtkFloatingPointType aPropagationTime = GetBasePropagationTime(aDataSet);
- vtkFloatingPointType aStepLength = GetBaseStepLength(aDataSet, GetUsedPoints());
+ double anIntStep = GetBaseIntegrationStep(aDataSet, GetUsedPoints());
+ double aPropagationTime = GetBasePropagationTime(aDataSet);
+ double aStepLength = GetBaseStepLength(aDataSet, GetUsedPoints());
SetParams(anIntStep,
aPropagationTime,
aStepLength,
myCellDataToPointData,
GetMergedInput());
- myGeomFilter->SetInput(myStream->GetOutput());
+ myGeomFilter->SetInputConnection(myStream->GetOutputPort());
myGeomFilter->ExtentClippingOn();
}
try{
Superclass::Update();
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
GetMergedInput()->GetBounds(aBounds);
myGeomFilter->SetExtent(aBounds);
//{
//----------------------------------------------------------------------------
void
VISU_StreamLinesPL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
Superclass::SetMapScale(theMapScale);
}
//----------------------------------------------------------------------------
virtual
size_t
- SetParams(vtkFloatingPointType theIntStep,
- vtkFloatingPointType thePropogationTime,
- vtkFloatingPointType theStepLength,
+ SetParams(double theIntStep,
+ double thePropogationTime,
+ double theStepLength,
vtkPointSet* theSource,
- vtkFloatingPointType thePercents,
+ double thePercents,
int theDirection = VTK_INTEGRATE_BOTH_DIRECTIONS);
virtual
GetSource();
virtual
- vtkFloatingPointType
+ double
GetUsedPoints();
virtual
- vtkFloatingPointType
+ double
GetIntegrationStep();
virtual
- vtkFloatingPointType
+ double
GetPropagationTime();
virtual
- vtkFloatingPointType
+ double
GetStepLength();
virtual
GetStreamerSource();
virtual
- vtkFloatingPointType
+ double
GetVelocityCoeff();
virtual
- vtkFloatingPointType
+ double
GetMaxIntegrationStep();
virtual
- vtkFloatingPointType
+ double
GetMinIntegrationStep();
virtual
- vtkFloatingPointType
+ double
GetMinStepLength();
virtual
- vtkFloatingPointType
+ double
GetMaxStepLength();
virtual
- vtkFloatingPointType
+ double
GetMinPropagationTime();
virtual
- vtkFloatingPointType
+ double
GetMaxPropagationTime();
virtual
- vtkFloatingPointType
+ double
GetBasePropagationTime();
public:
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
public:
static
- vtkFloatingPointType
+ double
GetMaxIntegrationStep(vtkDataSet* theDataSet);
static
- vtkFloatingPointType
+ double
GetMinIntegrationStep(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
+ double
GetBaseIntegrationStep(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
+ double
GetMinPropagationTime(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
+ double
GetMaxPropagationTime(vtkDataSet* theDataSet);
static
- vtkFloatingPointType
+ double
GetBasePropagationTime(vtkDataSet* theDataSet);
static
- vtkFloatingPointType
+ double
GetMinStepLength(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
+ double
GetMaxStepLength(vtkDataSet* theDataSet);
static
- vtkFloatingPointType
+ double
GetBaseStepLength(vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
+ double
GetVelocityCoeff(vtkDataSet* theDataSet);
static
bool theIsCopyInput);
static
- vtkFloatingPointType
+ double
GetNecasseryMemorySize(vtkIdType theNbOfPoints,
- vtkFloatingPointType theStepLength,
- vtkFloatingPointType thePropogationTime,
- vtkFloatingPointType thePercents);
+ double theStepLength,
+ double thePropogationTime,
+ double thePercents);
static
size_t
FindPossibleParams(vtkDataSet* theDataSet,
- vtkFloatingPointType& theStepLength,
- vtkFloatingPointType& thePropogationTime,
- vtkFloatingPointType& thePercents);
+ double& theStepLength,
+ double& thePropogationTime,
+ double& thePercents);
static
- vtkFloatingPointType
- CorrectIntegrationStep(vtkFloatingPointType theStep,
+ double
+ CorrectIntegrationStep(double theStep,
vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
- CorrectPropagationTime(vtkFloatingPointType thePropagationTime,
+ double
+ CorrectPropagationTime(double thePropagationTime,
vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
- CorrectStepLength(vtkFloatingPointType theStep,
+ double
+ CorrectStepLength(double theStep,
vtkDataSet* theDataSet,
- vtkFloatingPointType thePercents);
+ double thePercents);
static
- vtkFloatingPointType
+ double
GetUsedPointsDefault();
vtkStreamLine* myStream;
VTKViewer_CellCenters* myCenters;
VTKViewer_GeometryFilter *myGeomFilter;
VISU_MaskPointsFilter *myPointsFilter;
- vtkFloatingPointType myPercents;
+ double myPercents;
private:
VISU_StreamLinesPL(const VISU_StreamLinesPL&); // Not implemented.
#include "vtkPointData.h"
#include "vtkRungeKutta2.h"
-vtkCxxRevisionMacro(VISU_Streamer, "$Revision$");
-
#define VTK_START_FROM_POSITION 0
#define VTK_START_FROM_LOCATION 1
class VISU_PIPELINE_EXPORT VISU_Streamer : public vtkStreamer
{
public:
- vtkTypeRevisionMacro(VISU_Streamer,vtkStreamer);
+ vtkTypeMacro(VISU_Streamer,vtkStreamer);
protected:
// Description:
VISU_UsedPointsFilter* theUsedPointsFilter )
{
if ( VISU::IsDataOnCells( theDataSet ) ) {
- theCellCenters->SetInput( theDataSet );
+ theCellCenters->SetInputData( theDataSet );
theCellCenters->VertexCellsOn();
- theOutputFilter->SetInput( theCellCenters->GetOutput() );
+ theOutputFilter->SetInputConnection( theCellCenters->GetOutputPort() );
}else {
- theUsedPointsFilter->SetInput( theDataSet );
- theOutputFilter->SetInput( theUsedPointsFilter->GetOutput() );
+ theUsedPointsFilter->SetInputData( theDataSet );
+ theOutputFilter->SetInputConnection( theUsedPointsFilter->GetOutputPort() );
}
}
//----------------------------------------------------------------------------
void
VISU_VectorsPL
-::SetScale(vtkFloatingPointType theScale)
+::SetScale(double theScale)
{
if ( VISU::CheckIsSameValue( myScaleFactor, theScale ) )
return;
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU_VectorsPL
::GetScale()
{
GetMergedInput(),
myUsedPointsFilter );
- myGlyph->SetInput( myTransformFilter->GetOutput() );
+ myGlyph->SetInputConnection( myTransformFilter->GetOutputPort() );
myGlyph->SetVectorModeToUseVector();
myGlyph->SetScaleModeToScaleByVector();
myGlyph->SetColorModeToColorByScalar();
case CENTER:
myGlyphSource->SetCenter(0.0, 0.0, 0.0);
}
- myGlyph->SetSource(myGlyphSource->GetOutput());
+ myGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
}
break;
case CONE2:
case CENTER:
myConeSource->SetCenter(0.0, 0.0, 0.0);
}
- myGlyph->SetSource(myConeSource->GetOutput());
+ myGlyph->SetSourceConnection(myConeSource->GetOutputPort());
}
break;
case NONE:
default: {
- myGlyph->SetSource(myLineSource->GetOutput());
+ myGlyph->SetSourceConnection(myLineSource->GetOutputPort());
}
}
//----------------------------------------------------------------------------
void
VISU_VectorsPL
-::SetMapScale(vtkFloatingPointType theMapScale)
+::SetMapScale(double theMapScale)
{
VISU_ScalarMapPL::SetMapScale(theMapScale);
myMapScaleFactor = theMapScale;
//----------------------------------------------------------------------------
virtual
void
- SetScale(vtkFloatingPointType theScale);
+ SetScale(double theScale);
virtual
- vtkFloatingPointType
+ double
GetScale();
enum GlyphType{ ARROW, CONE2, CONE6, NONE};
virtual
void
- SetMapScale(vtkFloatingPointType theMapScale = 1.0);
+ SetMapScale(double theMapScale = 1.0);
protected:
VISU_VectorsPL();
#include <vtkCallbackCommand.h>
#include <vtkCommand.h>
//
-vtkCxxRevisionMacro(VISU_WidgetCtrl,"$Revision$");
vtkStandardNewMacro(VISU_WidgetCtrl);
//==================================================================
// function: PlaceWidget
// purpose :
//==================================================================
-void VISU_WidgetCtrl::PlaceWidget(vtkFloatingPointType theBounds[6])
+void VISU_WidgetCtrl::PlaceWidget(double theBounds[6])
{
for (int i=0; i<myNbWidgets; ++i) {
myWidgets[i]->PlaceWidget(theBounds);
// function: SetPlaceFactor
// purpose :
//==================================================================
-void VISU_WidgetCtrl::SetPlaceFactor(vtkFloatingPointType theFactor)
+void VISU_WidgetCtrl::SetPlaceFactor(double theFactor)
{
for (int i=0; i<myNbWidgets; ++i) {
myWidgets[i]->SetPlaceFactor(theFactor);
// function: GetPlaceFactor
// purpose :
//==================================================================
-vtkFloatingPointType VISU_WidgetCtrl::GetPlaceFactor()
+double VISU_WidgetCtrl::GetPlaceFactor()
{
return myWidgets[0]->GetPlaceFactor();
}
}
//==================================================================
-vtkFloatingPointType
+double
VISU_WidgetCtrl
-::EvaluateFunction(vtkFloatingPointType theX[3])
+::EvaluateFunction(double theX[3])
{
if(VISU_ImplicitFunctionWidget* aWidget = GetActiveWidget()){
if(vtkImplicitFunction* aFunction = aWidget->ImplicitFunction())
//==================================================================
void
VISU_WidgetCtrl
-::EvaluateGradient(vtkFloatingPointType theX[3],
- vtkFloatingPointType theG[3])
+::EvaluateGradient(double theX[3],
+ double theG[3])
{
theG[0] = theG[1] = theG[2] = 0.0;
if(VISU_ImplicitFunctionWidget* aWidget = GetActiveWidget()){
{
public:
static VISU_WidgetCtrl *New();
- vtkTypeRevisionMacro(VISU_WidgetCtrl,vtkObject);
+ vtkTypeMacro(VISU_WidgetCtrl,vtkObject);
vtkImplicitFunction* ImplicitFunction();
virtual
- vtkFloatingPointType
- EvaluateFunction(vtkFloatingPointType theX[3]);
+ double
+ EvaluateFunction(double theX[3]);
virtual
void
- EvaluateGradient(vtkFloatingPointType theX[3],
- vtkFloatingPointType theG[3]);
+ EvaluateGradient(double theX[3],
+ double theG[3]);
virtual
unsigned long
GetMTime();
- void PlaceWidget(vtkFloatingPointType theBounds[6]);
+ void PlaceWidget(double theBounds[6]);
void SetEnabled(int theFlag);
int GetEnabled();
void On() {SetEnabled(1);}
vtkRenderWindowInteractor* GetInteractor();
//
void
- SetPlaceFactor(vtkFloatingPointType theFactor);
+ SetPlaceFactor(double theFactor);
- vtkFloatingPointType
+ double
GetPlaceFactor();
//
void SetActiveIndex(const int theFlag);
int myActiveIndex;
int myCounter;
int myDisableAll;
- vtkFloatingPointType myPriority;
+ double myPriority;
VISU_ImplicitFunctionWidget *myWidgets[2];
VISU_ImplicitFunctionWidget *myDummyWidget;
VISU_PlanesWidget *myPlanesWidget;
#include "vtkProperty2D.h"
#include "vtkTextMapper.h"
#include "vtkTextProperty.h"
+#include "vtkVersion.h"
#include "vtkViewport.h"
#include "vtkTransformPolyDataFilter.h" // RKV
#include "vtkTransform.h" // RKV
using namespace std;
-vtkCxxRevisionMacro(VISU_XYPlotActor, "$Revision$");
vtkStandardNewMacro(VISU_XYPlotActor);
vtkCxxSetObjectMacro(VISU_XYPlotActor,TitleTextProperty,vtkTextProperty);
for (mtime=0, this->InputList->InitTraversal(dsit);
(ds = this->InputList->GetNextDataSet(dsit)); )
{
- ds->Update();
+ //ds->Update(); // OUV_PORTING
dsMtime = ds->GetMTime();
if ( dsMtime > mtime )
{
for (mtime=0, this->DataObjectInputList->InitTraversal(doit);
(dobj = this->DataObjectInputList->GetNextDataObject(doit)); )
{
- dobj->Update();
+ //dobj->Update(); // OUV_PORTING
dsMtime = dobj->GetMTime();
if ( dsMtime > mtime )
{
{
this->PlotData[i] = vtkPolyData::New();
this->PlotGlyph[i] = vtkGlyph2D::New();
- this->PlotGlyph[i]->SetInput(this->PlotData[i]);
+ this->PlotGlyph[i]->SetInputData(this->PlotData[i]);
this->PlotGlyph[i]->SetScaleModeToDataScalingOff();
this->PlotAppend[i] = vtkAppendPolyData::New();
- this->PlotAppend[i]->AddInput(this->PlotData[i]);
+ this->PlotAppend[i]->AddInputData(this->PlotData[i]);
if ( this->LegendActor->GetEntrySymbol(i) != NULL &&
this->LegendActor->GetEntrySymbol(i) != this->GlyphSource->GetOutput() )
{
- this->PlotGlyph[i]->SetSource(this->LegendActor->GetEntrySymbol(i));
+ this->PlotGlyph[i]->SetSourceData(this->LegendActor->GetEntrySymbol(i));
this->PlotGlyph[i]->SetScaleFactor(this->ComputeGlyphScale(i,pos,pos2));
- this->PlotAppend[i]->AddInput(this->PlotGlyph[i]->GetOutput());
+ this->PlotAppend[i]->AddInputConnection(this->PlotGlyph[i]->GetOutputPort());
}
this->PlotMapper[i] = vtkPolyDataMapper2D::New();
// Insert a transformation filter into the pipeline to
// take into account a plot location.
this->PlotTransform[i] = vtkTransformPolyDataFilter::New();
- this->PlotTransform[i]->SetInput(this->PlotAppend[i]->GetOutput());
+ this->PlotTransform[i]->SetInputConnection(this->PlotAppend[i]->GetOutputPort());
this->PlotTransform[i]->SetTransform(tf);
- this->PlotMapper[i]->SetInput(this->PlotTransform[i]->GetOutput());
+ this->PlotMapper[i]->SetInputConnection(this->PlotTransform[i]->GetOutputPort());
// RKV : End
-// RKV this->PlotMapper[i]->SetInput(this->PlotAppend[i]->GetOutput());
+// RKV this->PlotMapper[i]->SetInputConnection(this->PlotAppend[i]->GetOutputPort());
this->PlotMapper[i]->ScalarVisibilityOff();
this->PlotActor[i] = vtkActor2D::New();
this->PlotActor[i]->SetMapper(this->PlotMapper[i]);
double VISU_XYPlotActor::ComputeGlyphScale(int i, int *pos, int *pos2)
{
vtkPolyData *pd=this->LegendActor->GetEntrySymbol(i);
- pd->Update();
+ //pd->Update(); // OUV_PORTING
double length=pd->GetLength();
double sf = this->GlyphSize * sqrt((double)(pos[0]-pos2[0])*(pos[0]-pos2[0]) +
(pos[1]-pos2[1])*(pos[1]-pos2[1])) / length;
class VISU_PIPELINE_EXPORT VISU_XYPlotActor : public vtkActor2D
{
public:
- vtkTypeRevisionMacro(VISU_XYPlotActor,vtkActor2D);
+ vtkTypeMacro(VISU_XYPlotActor,vtkActor2D);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
aReader->Update();
vtkXMLImageDataWriter* aWriter = vtkXMLImageDataWriter::New();
- aWriter->SetInput( aReader->GetOutput() );
+ aWriter->SetInputConnection( aReader->GetOutputPort() );
aWriter->SetFileName( argv[3] );
aWriter->Write();
// Create and display actor
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput(myPlaneSource->GetOutput());
+ myMapper->SetInputConnection(myPlaneSource->GetOutputPort());
myActor = SALOME_Actor::New();
myActor->VisibilityOff();
VISU_PipeLine* aPL = myPrs3d->GetPipeLine();
vtkMapper* aMapper = aPL->GetMapper();
vtkDataSet* aPrsData = aMapper->GetInput();
- aPrsData->Update();
+ aMapper->Update();
if (aPrsData->GetNumberOfCells() < 1) {
isFailed = true;
}
OrientedPlane* aPlane = myPlanes[aCurPlaneIndex].GetPointer();
- vtkFloatingPointType aNormal[3];
+ double aNormal[3];
VISU::Orientation anOrientation;
- vtkFloatingPointType aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
+ double aDir[3][3] = {{0, 0, 0}, {0, 0, 0}};
{
static double aCoeff = vtkMath::Pi()/180.0;
- vtkFloatingPointType aRot[2] = {getRotation1(), getRotation2()};
+ double aRot[2] = {getRotation1(), getRotation2()};
aPlane->myAngle[0] = aRot[0];
aPlane->myAngle[1] = aRot[1];
- vtkFloatingPointType anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
- vtkFloatingPointType aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
+ double anU[2] = {cos(aCoeff*aRot[0]), cos(aCoeff*aRot[1])};
+ double aV[2] = {sqrt(1.0-anU[0]*anU[0]), sqrt(1.0-anU[1]*anU[1])};
aV[0] = aRot[0] > 0? aV[0]: -aV[0];
aV[1] = aRot[1] > 0? aV[1]: -aV[1];
myPrs3d->SetPlaneParam(aNormal, 1. - getDistance(), aPlane);
//Get bounds of the visible part of the dataset
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
myPrs3d->GetPipeLine()->GetVisibleBounds(aBounds);
//Get center
- vtkFloatingPointType aPnt[3];
+ double aPnt[3];
VISU::ComputeBoxCenter(aBounds,aPnt);
- vtkFloatingPointType* anOrigin = aPlane->GetOrigin();
+ double* anOrigin = aPlane->GetOrigin();
//Get Length of the diagonal
- vtkFloatingPointType aDel = VISU::ComputeBoxDiagonal(aBounds)/2.0;
+ double aDel = VISU::ComputeBoxDiagonal(aBounds)/2.0;
- vtkFloatingPointType aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
+ double aDelta[2][3] = {{aDir[0][0]*aDel, aDir[0][1]*aDel, aDir[0][2]*aDel},
{aDir[1][0]*aDel, aDir[1][1]*aDel, aDir[1][2]*aDel}};
- vtkFloatingPointType aParam, aPnt0[3], aPnt1[3], aPnt2[3];
+ double aParam, aPnt0[3], aPnt1[3], aPnt2[3];
- vtkFloatingPointType aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
+ double aPnt01[3] = {aPnt[0] - aDelta[0][0] - aDelta[1][0],
aPnt[1] - aDelta[0][1] - aDelta[1][1],
aPnt[2] - aDelta[0][2] - aDelta[1][2]};
- vtkFloatingPointType aPnt02[3] = {aPnt01[0] + aNormal[0],
+ double aPnt02[3] = {aPnt01[0] + aNormal[0],
aPnt01[1] + aNormal[1],
aPnt01[2] + aNormal[2]};
vtkPlane::IntersectWithLine(aPnt01,aPnt02,aNormal,anOrigin,aParam,aPnt0);
- vtkFloatingPointType aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
+ double aPnt11[3] = {aPnt[0] - aDelta[0][0] + aDelta[1][0],
aPnt[1] - aDelta[0][1] + aDelta[1][1],
aPnt[2] - aDelta[0][2] + aDelta[1][2]};
- vtkFloatingPointType aPnt12[3] = {aPnt11[0] + aNormal[0],
+ double aPnt12[3] = {aPnt11[0] + aNormal[0],
aPnt11[1] + aNormal[1],
aPnt11[2] + aNormal[2]};
vtkPlane::IntersectWithLine(aPnt11,aPnt12,aNormal,anOrigin,aParam,aPnt1);
- vtkFloatingPointType aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
+ double aPnt21[3] = {aPnt[0] + aDelta[0][0] - aDelta[1][0],
aPnt[1] + aDelta[0][1] - aDelta[1][1],
aPnt[2] + aDelta[0][2] - aDelta[1][2]};
- vtkFloatingPointType aPnt22[3] = {aPnt21[0] + aNormal[0],
+ double aPnt22[3] = {aPnt21[0] + aNormal[0],
aPnt21[1] + aNormal[1],
aPnt21[2] + aNormal[2]};
vtkPlane::IntersectWithLine(aPnt21,aPnt22,aNormal,anOrigin,aParam,aPnt2);
aPlaneSource->SetOrigin(aPnt0[0],aPnt0[1],aPnt0[2]);
aPlaneSource->SetPoint1(aPnt1[0],aPnt1[1],aPnt1[2]);
aPlaneSource->SetPoint2(aPnt2[0],aPnt2[1],aPnt2[2]);
+ aPlaneSource->Update();
if (AutoApplyCheckBox->isChecked())
ClickOnApply();
VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axId;
gp_Dir dir;
CORBA::String_var aMeshName = myPrs3d->GetMeshName();
- const vector<vtkFloatingPointType> * values =
+ const vector<double> * values =
result->GetAxisInfo(aMeshName.in(), axis, dir);
if (!values)
return;
// find distance;
int index = SpinBoxIJKIndex->value();
- vtkFloatingPointType distance = 0;
+ double distance = 0;
if (index < values->size())
distance = (*values)[ index ];
}
}
// find rotation angles
- vtkFloatingPointType angle[2];
+ double angle[2];
int rotId[2] = {
(axId == 0) ? 2 : axId - 1,
(axId == 2) ? 0 : axId + 1
};
static double aCoeff = 180.0/vtkMath::Pi();
for (i = 0; i < 2; ++i) {
- vtkFloatingPointType cosin = cos[ rotId[ i ]];
+ double cosin = cos[ rotId[ i ]];
// if (maxCos < 0)
// cosin = -cosin;
angle[ i ] = asin(cosin) * aCoeff;
int planeIndex = ComboBoxPlanes->currentIndex();
OrientedPlane* plane = myPlanes[ planeIndex ].GetPointer();
vtkPlaneSource* planeSource = plane->myPlaneSource;
- vtkFloatingPointType * planeNormal = planeSource->GetNormal();
+ double * planeNormal = planeSource->GetNormal();
gp_Dir normal(planeNormal[0], planeNormal[1], planeNormal[2]);
// find a grid axis most co-directed with plane normal
int i, maxAx = 0, gridAxId = 0;
gp_Dir dir, gridDir;
double maxDot = 0;
- const vector<vtkFloatingPointType> *curValues, *values = 0;
+ const vector<double> *curValues, *values = 0;
VISU::Result_i* result = myPrs3d->GetCResult();
int aNbAxes = 3;
VISU_PipeLine* aPipeLine = myPrs3d->GetPipeLine();
VISU::Result_i::TAxis axis = (VISU::Result_i::TAxis) axisId;
gp_Dir dir;
CORBA::String_var aMeshName = myPrs3d->GetMeshName();
- const vector<vtkFloatingPointType> * indices = result->GetAxisInfo(aMeshName.in(),
+ const vector<double> * indices = result->GetAxisInfo(aMeshName.in(),
axis, dir);
if (indices)
maxIndex = indices->size() - 1;
(aBound[5]-aBound[4]));
myCutter = vtkEDFCutter::New();
- myCutter->SetInput(myBox);
+ myCutter->SetInputData(myBox);
myCutter->SetCutFunction(myPlane);
myMapper = vtkPolyDataMapper::New();
- myMapper->SetInput(myCutter->GetOutput());
+ myMapper->SetInputConnection(myCutter->GetOutputPort());
myActor = vtkActor::New();
myActor->VisibilityOff();
myCutLines->GetPipeLine()->Update();
vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
aPlaneMapper->ScalarVisibilityOff();
myPreviewActorGlyphs = SALOME_Actor::New();
createPlanes();
}
}
- vtkFloatingPointType aPos = myCutLines->GetBasePlanePosition();
+ double aPos = myCutLines->GetBasePlanePosition();
myBasePlanePos->setText( QString::number(aPos) );
myBasePlanePos->setEnabled(false);
} else {
void VisuGUI_CutLinesDlg::updateGlyphs(bool update){
if (myPreviewActorGlyphs == 0 ) return;
- const vtkFloatingPointType *aDirLn = myCutLines->GetSpecificPL()->GetRealDirLn();
- vtkFloatingPointType aSecondPnt[3];
- vtkFloatingPointType aBoundCenter[3];
+ const double *aDirLn = myCutLines->GetSpecificPL()->GetRealDirLn();
+ double aSecondPnt[3];
+ double aBoundCenter[3];
vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
- vtkFloatingPointType bounds[6];
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
+ double bounds[6];
aPlaneMapper->GetBounds(bounds);
for(int i=0; i<3; i++) aBoundCenter[i] = (bounds[i*2] + bounds[i*2+1])/2.0;
aSecondPnt[i] = - aDirLn[i];
}
- vtkFloatingPointType max_bound = 0;
+ double max_bound = 0;
max_bound < bounds[1]-bounds[0] ? max_bound = bounds[1] - bounds[0] : max_bound = max_bound;
max_bound < bounds[3]-bounds[2] ? max_bound = bounds[3] - bounds[2] : max_bound = max_bound;
max_bound < bounds[5]-bounds[4] ? max_bound = bounds[5] - bounds[4] : max_bound = max_bound;
glyphs->SetScaleFactor(0.25*max_bound);
glyphs->SetVectorModeToUseVector();
glyphs->SetScaleModeToScaleByVector();
- glyphs->SetInput(profile);
- glyphs->SetSource(source->GetOutput());
+ glyphs->SetInputData(profile);
+ glyphs->SetSourceConnection(source->GetOutputPort());
vtkPolyDataMapper* aGlyphsMapper = vtkPolyDataMapper::New();
aGlyphsMapper->ScalarVisibilityOff();
- aGlyphsMapper->SetInput(glyphs->GetOutput());
+ aGlyphsMapper->SetInputConnection(glyphs->GetOutputPort());
myPreviewActorGlyphs->SetMapper(aGlyphsMapper);
return;
}
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aDataSet);
+ aPlaneMapper->SetInputData(aDataSet);
aPlaneMapper->ScalarVisibilityOff();
myPreviewActor = SALOME_Actor::New();
myUseAbsoluteLengthCheck->setChecked( myCutSegment->IsUseAbsoluteLength() );
vtkDataSet* anInput = myCutSegment->GetPipeLine()->GetInput();
- anInput->Update();
+ myCutSegment->GetPipeLine()->Update();
- vtkFloatingPointType bounds[6];
+ double bounds[6];
anInput->GetBounds( bounds );
for( int i = 0; i < 3; i++ ) {
myCutSegment->GetPipeLine()->Update();
vtkAppendPolyData* aPolyData = myCutSegment->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
aPlaneMapper->ScalarVisibilityOff();
myPreviewActorGlyphs = SALOME_Actor::New();
//------------------------------------------------------------------------------
void VisuGUI_CutSegmentDlg::updateGlyphs(bool update){
if (myPreviewActorGlyphs == 0 ) return;
- const vtkFloatingPointType *aDirLn = myCutSegment->GetSpecificPL()->GetRealDirLn();
- vtkFloatingPointType aSecondPnt[3];
- vtkFloatingPointType aBoundCenter[3];
+ const double *aDirLn = myCutSegment->GetSpecificPL()->GetRealDirLn();
+ double aSecondPnt[3];
+ double aBoundCenter[3];
vtkAppendPolyData* aPolyData = myCutSegment->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
- aPlaneMapper->SetInput(aPolyData->GetOutput());
- vtkFloatingPointType bounds[6];
+ aPlaneMapper->SetInputConnection(aPolyData->GetOutputPort());
+ double bounds[6];
aPlaneMapper->GetBounds(bounds);
for(int i=0; i<3; i++) aBoundCenter[i] = (bounds[i*2] + bounds[i*2+1])/2.0;
aSecondPnt[i] = - aDirLn[i];
}
- vtkFloatingPointType max_bound = 0;
+ double max_bound = 0;
max_bound < bounds[1]-bounds[0] ? max_bound = bounds[1] - bounds[0] : max_bound = max_bound;
max_bound < bounds[3]-bounds[2] ? max_bound = bounds[3] - bounds[2] : max_bound = max_bound;
max_bound < bounds[5]-bounds[4] ? max_bound = bounds[5] - bounds[4] : max_bound = max_bound;
glyphs->SetScaleFactor(0.25*max_bound);
glyphs->SetVectorModeToUseVector();
glyphs->SetScaleModeToScaleByVector();
- glyphs->SetInput(profile);
- glyphs->SetSource(source->GetOutput());
+ glyphs->SetInputData(profile);
+ glyphs->SetSourceConnection(source->GetOutputPort());
vtkPolyDataMapper* aGlyphsMapper = vtkPolyDataMapper::New();
aGlyphsMapper->ScalarVisibilityOff();
- aGlyphsMapper->SetInput(glyphs->GetOutput());
+ aGlyphsMapper->SetInputConnection(glyphs->GetOutputPort());
myPreviewActorGlyphs->SetMapper(aGlyphsMapper);
if( !myPreviewActorPoints )
return;
- vtkFloatingPointType aPoint1[3], aPoint2[3];
+ double aPoint1[3], aPoint2[3];
myCutSegment->GetSpecificPL()->GetPoint1( aPoint1[0], aPoint1[1], aPoint1[2] );
myCutSegment->GetSpecificPL()->GetPoint2( aPoint2[0], aPoint2[1], aPoint2[2] );
vtkPolyDataMapper* aPointsMapper = vtkPolyDataMapper::New();
aPointsMapper->ScalarVisibilityOff();
- aPointsMapper->SetInput( aProfile );
+ aPointsMapper->SetInputData( aProfile );
myPreviewActorPoints->SetMapper( aPointsMapper );
myPreviewActorPoints->GetProperty()->SetRepresentationToPoints();
VISU::PNamedIDMapper aMapper = aResult->GetInput()->GetMeshOnEntity( myEngine->getMeshName(), myEngine->getEntity() );
vtkDataSetMapper* aPreviewMapper = vtkDataSetMapper::New();
- aPreviewMapper->SetInput( aMapper->GetOutput() );
+ aPreviewMapper->SetInputData( aMapper->GetOutput() );
vtkProperty* aProperty = vtkProperty::New();
aProperty->SetColor( 1, 1, 1 );
// "Title"
myTextDlg->setTitleText(QString(thePrs->GetTitle()));
- vtkFloatingPointType R, G, B;
+ double R, G, B;
thePrs->GetTitleColor(R, G, B);
int lp = VISU::ToPrecision( thePrs->GetLabelsFormat() );
const char* theSuffix,
std::ostringstream& theStr)
{
- vtkFloatingPointType aColor[3];
+ double aColor[3];
vtkRenderer* aRenderer = theViewWindow->getRenderer();
aRenderer->GetBackground(aColor);
Storable::DataToStream(theStr,(std::string("myColor") + theSuffix + ".R").c_str(),aColor[0]);
Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[1]").c_str(),aViewUp[1]);
Storable::DataToStream(theStr,(std::string("myViewUp") + theSuffix + "[2]").c_str(),aViewUp[2]);
- vtkFloatingPointType aParallelScale = aCamera->GetParallelScale();
+ double aParallelScale = aCamera->GetParallelScale();
Storable::DataToStream(theStr,(std::string("myParallelScale") + theSuffix).c_str(),aParallelScale);
double aScaleFactor[3];
const char* theSuffix,
const Storable::TRestoringMap& theMap)
{
- vtkFloatingPointType aColor[3];
+ double aColor[3];
aColor[0] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".R").toDouble();
aColor[1] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".G").toDouble();
aColor[2] = Storable::FindValue(theMap,std::string("myColor") + theSuffix + ".B").toDouble();
aViewUp[2] = Storable::FindValue(theMap,std::string("myViewUp") + theSuffix + "[2]").toDouble();
aCamera->SetViewUp(aViewUp);
- vtkFloatingPointType aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble();
+ double aParallelScale = Storable::FindValue(theMap,std::string("myParallelScale") + theSuffix).toDouble();
aCamera->SetParallelScale(aParallelScale);
double aScaleFactor[3];
std::string aSegmentationMode;
if(aWidgetCtrl->IsPlanesActive()){
VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
- vtkFloatingPointType anOrigin[3];
+ double anOrigin[3];
aPlanesWidget->GetOrigin(anOrigin);
Storable::DataToStream(theStr,"myCursorOrigin[0]",anOrigin[0]);
Storable::DataToStream(theStr,"myCursorOrigin[1]",anOrigin[1]);
Storable::DataToStream(theStr,"myCursorOrigin[2]",anOrigin[2]);
- vtkFloatingPointType aNormal[3];
+ double aNormal[3];
aPlanesWidget->GetNormal(aNormal);
Storable::DataToStream(theStr,"myCursorNormal[0]",aNormal[0]);
Storable::DataToStream(theStr,"myCursorNormal[1]",aNormal[1]);
Storable::DataToStream(theStr,"myCursorNormal[2]",aNormal[2]);
- vtkFloatingPointType aDepth = aPlanesWidget->Distance();
+ double aDepth = aPlanesWidget->Distance();
Storable::DataToStream(theStr,"myCursorDepth",aDepth);
aSegmentationMode = "Planes";
}else if(aWidgetCtrl->IsSphereActive()){
VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
- vtkFloatingPointType aCenter[3];
+ double aCenter[3];
aSphereWidget->GetCenter(aCenter);
Storable::DataToStream(theStr,"mySphereCursorCenter[0]",aCenter[0]);
Storable::DataToStream(theStr,"mySphereCursorCenter[1]",aCenter[1]);
Storable::DataToStream(theStr,"mySphereCursorCenter[2]",aCenter[2]);
- vtkFloatingPointType aRadius = aSphereWidget->GetRadius();
+ double aRadius = aSphereWidget->GetRadius();
Storable::DataToStream(theStr,"mySphereCursorRaduis",aRadius);
aSegmentationMode = "Sphere";
if(aSegmentationMode == "Planes"){
VISU_PlanesWidget *aPlanesWidget = aWidgetCtrl->GetPlanesWidget();
- vtkFloatingPointType anOrigin[3];
+ double anOrigin[3];
anOrigin[0] = Storable::FindValue(aMap,"myCursorOrigin[0]").toDouble();
anOrigin[1] = Storable::FindValue(aMap,"myCursorOrigin[1]").toDouble();
anOrigin[2] = Storable::FindValue(aMap,"myCursorOrigin[2]").toDouble();
aPlanesWidget->SetOrigin(anOrigin);
- vtkFloatingPointType aNormal[3];
+ double aNormal[3];
aNormal[0] = Storable::FindValue(aMap,"myCursorNormal[0]").toDouble();
aNormal[1] = Storable::FindValue(aMap,"myCursorNormal[1]").toDouble();
aNormal[2] = Storable::FindValue(aMap,"myCursorNormal[2]").toDouble();
aPlanesWidget->SetNormal(aNormal);
- vtkFloatingPointType aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble();
+ double aDepth = Storable::FindValue(aMap,"myCursorDepth").toDouble();
aPlanesWidget->SetDistance(aDepth);
aMainWindow->SetPlanesSegementation(true);
}else if(aSegmentationMode == "Sphere"){
VISU_SphereWidget *aSphereWidget = aWidgetCtrl->GetSphereWidget();
- vtkFloatingPointType aCenter[3];
+ double aCenter[3];
aCenter[0] = Storable::FindValue(aMap,"mySphereCursorCenter[0]").toDouble();
aCenter[1] = Storable::FindValue(aMap,"mySphereCursorCenter[1]").toDouble();
aCenter[2] = Storable::FindValue(aMap,"mySphereCursorCenter[2]").toDouble();
aSphereWidget->SetCenter(aCenter);
- vtkFloatingPointType aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble();
+ double aRadius = Storable::FindValue(aMap,"mySphereCursorRaduis").toDouble();
aSphereWidget->SetRadius(aRadius);
aMainWindow->SetSphereSegementation(true);
ip->setParameter( entry, param, QString::number( vActor->GetQuadratic2DRepresentation() ).toLatin1().data() );
param = vtkParam + "Opacity";
ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).toLatin1().data() );
- vtkFloatingPointType r, g, b;
+ double r, g, b;
vActor->GetColor(r, g, b);
QString colorStr = QString::number( r ); colorStr += gDigitsSep;
colorStr += QString::number( g ); colorStr += gDigitsSep;
ip->setParameter( entry, param, "Off" );
for ( int p = 0; p < nPlanes; p++ ) {
vtkPlane* plane = vPrs->GetClippingPlane( p );
- vtkFloatingPointType normal[3], origin[3];
+ double normal[3], origin[3];
plane->GetNormal( normal );
plane->GetOrigin( origin );
std::string planeValue = QString::number( normal[0] ).toLatin1().data(); planeValue += gDigitsSep;
ip->setParameter( entry, param, QString::number( vActor->GetRepresentation() ).toLatin1().data() );
param = vtkParam + "Opacity";
ip->setParameter( entry, param, QString::number( vActor->GetOpacity() ).toLatin1().data() );
- vtkFloatingPointType r, g, b;
+ double r, g, b;
vActor->GetColor(r, g, b);
QString colorStr = QString::number( r ); colorStr += gDigitsSep;
colorStr += QString::number( g ); colorStr += gDigitsSep;
if ( val != "Off" ) {
QStringList vals = val.split( gDigitsSep, QString::SkipEmptyParts );
if ( vals.count() == 6 ) { // format check: 6 float values
- vtkFloatingPointType normal[3], origin[3];
+ double normal[3], origin[3];
for (int x = 0; x < 3; x++ ) {
normal[x] = vals[x].toFloat();
origin[x] = vals[x+3].toFloat();
}
}
-void VisuGUI_OffsetDlg::setOffset (const vtkFloatingPointType* theOffset)
+void VisuGUI_OffsetDlg::setOffset (const double* theOffset)
{
myDxEdt->setValue(theOffset[0]);
myDyEdt->setValue(theOffset[1]);
myDzEdt->setValue(theOffset[2]);
}
-void VisuGUI_OffsetDlg::getOffset (vtkFloatingPointType* theOffset) const
+void VisuGUI_OffsetDlg::getOffset (double* theOffset) const
{
theOffset[0] = myDxEdt->value();
theOffset[1] = myDyEdt->value();
return false;
}
-void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset)
+void VisuGUI_OffsetDlg::updateOffset (VISU::Prs3d_i* thePrs, double* theOffset)
{
if (myPrsList.count() == 0)
return;
}
}
-void VisuGUI_OffsetDlg::updatePointMapOffset (VISU::PointMap3d_i* thePrs, vtkFloatingPointType* theOffset)
+void VisuGUI_OffsetDlg::updatePointMapOffset (VISU::PointMap3d_i* thePrs, double* theOffset)
{
if (myPointMapList.count() == 0)
return;
void VisuGUI_OffsetDlg::accept()
{
- vtkFloatingPointType anOffset[3];
+ double anOffset[3];
getOffset(anOffset);
for (int i = 0; i < myPrsList.count(); i++) {
updateOffset(myPrsList.at(i), anOffset);
void VisuGUI_OffsetDlg::onApply()
{
- vtkFloatingPointType anOffset[3];
+ double anOffset[3];
getOffset(anOffset);
for (int i = 0; i < myPrsList.count(); i++) {
struct OffsetStruct
{
- vtkFloatingPointType myOffset[3];
+ double myOffset[3];
OffsetStruct()
{
myOffset[0] = myOffset[1] = myOffset[2] = 0;
}
- OffsetStruct(vtkFloatingPointType theX,
- vtkFloatingPointType theY,
- vtkFloatingPointType theZ)
+ OffsetStruct(double theX,
+ double theY,
+ double theZ)
{
myOffset[0] = theX;
myOffset[1] = theY;
int getPrsCount() const { return myPrsList.count() + myPointMapList.count(); }
void clearPresentations();
- void setOffset (const vtkFloatingPointType* theOffset);
- void getOffset (vtkFloatingPointType* theOffset) const;
+ void setOffset (const double* theOffset);
+ void getOffset (double* theOffset) const;
bool isToSave() const;
private:
void onSelectionChanged();
private:
- void updateOffset (VISU::Prs3d_i* thePrs, vtkFloatingPointType* theOffset);
- void updatePointMapOffset (VISU::PointMap3d_i* thePrs, vtkFloatingPointType* theOffset);
+ void updateOffset (VISU::Prs3d_i* thePrs, double* theOffset);
+ void updatePointMapOffset (VISU::PointMap3d_i* thePrs, double* theOffset);
VisuGUI * myModule;
LightApp_SelectionMgr* mySelectionMgr;
//=======================================================================
class TPlane : public SALOME_Actor
{
- vtkFloatingPointType mySize;
+ double mySize;
vtkDataSetMapper* myMapper;
vtkPlaneSource* myPlaneSource;
public:
// constructor
- TPlane(vtkFloatingPointType planeSize): mySize(planeSize)
+ TPlane(double planeSize): mySize(planeSize)
{
Init();
}
// set plane parameters
- void Set(vtkFloatingPointType origin[3], vtkFloatingPointType normal[3])
+ void Set(double origin[3], double normal[3])
{
- vtkFloatingPointType point2[3], point1[3];
+ double point2[3], point1[3];
vtkMath::Perpendiculars(normal, point1, point2, 0.);
for (int i = 0; i < 3; ++i) {
point1[ i ] = point1[ i ] * mySize + origin[ i ];
void Init() {
myPlaneSource = vtkPlaneSource::New();
myMapper = vtkDataSetMapper::New();
- myMapper->SetInput(myPlaneSource->GetOutput());
+ myMapper->SetInputConnection(myPlaneSource->GetOutputPort());
// actor methods
VisibilityOff();
PickableOff();
void VisuGUI_Plot3DPane::onPositionSpn()
{
if (myPrs && !RelativeChkB->isChecked()) {
- vtkFloatingPointType minPos, maxPos;
+ double minPos, maxPos;
storePrsParams();
myPrs->GetSpecificPL()->GetMinMaxPosition(minPos, maxPos);
restorePrsParams();
//=======================================================================
void VisuGUI_Plot3DPane::onRelativePos(bool isRelativePos)
{
- vtkFloatingPointType minPos = 0., maxPos = 1., pos = PositionSpn->value();
+ double minPos = 0., maxPos = 1., pos = PositionSpn->value();
if (myPrs) {
storePrsParams();
myPrs->GetSpecificPL()->GetMinMaxPosition(minPos, maxPos);
}
// set plane parameters corresponding to control values
storePrsParams();
- vtkFloatingPointType normal[3], origin[3];
+ double normal[3], origin[3];
myPrs->GetSpecificPL()->GetBasePlane(origin, normal, true);
planePreview->Set(origin, normal);
restorePrsParams();
myBarDlg->setLabelsPrecision( VISU::ToPrecision( myScalarMap->GetLabelsFormat() ) );
myBarDlg->setUnitsVisible(myScalarMap->IsUnitsVisible());
- vtkFloatingPointType R, G, B;
+ double R, G, B;
myScalarMap->GetTitleColor(R, G, B);
QColor aTextColor = QColor((int)(R*255.), (int)(G*255.), (int)(B*255.));
if ( RBFrange->isChecked() ) {
myScalarMapPL->SetSourceRange();
} else {
- vtkFloatingPointType aRange[2];
- aRange[0] = (vtkFloatingPointType)MinEdit->text().toDouble();
- aRange[1] = (vtkFloatingPointType)MaxEdit->text().toDouble();
+ double aRange[2];
+ aRange[0] = (double)MinEdit->text().toDouble();
+ aRange[1] = (double)MaxEdit->text().toDouble();
myScalarMapPL->SetScalarRange( aRange );
}
isTitleBold,isTitleItalic,isTitleShadow);
vtkTextProperty* aTitleProp = aScalarBarActor->GetTitleTextProperty();
aTitleProp->SetFontFamily(aTitleFontFamily);
- aTitleProp->SetColor(vtkFloatingPointType(aTitleColor.red())/255.,
- vtkFloatingPointType(aTitleColor.green())/255.,
- vtkFloatingPointType(aTitleColor.blue())/255.);
+ aTitleProp->SetColor(double(aTitleColor.red())/255.,
+ double(aTitleColor.green())/255.,
+ double(aTitleColor.blue())/255.);
(isTitleBold)? aTitleProp->BoldOn() : aTitleProp->BoldOff();
(isTitleItalic)? aTitleProp->ItalicOn() : aTitleProp->ItalicOff();
(isTitleShadow)? aTitleProp->ShadowOn() : aTitleProp->ShadowOff();
isLabelBold, isLabelItalic, isLabelShadow);
vtkTextProperty* aLabelProp = aScalarBarActor->GetLabelTextProperty();
aLabelProp->SetFontFamily(aLabelFontFamily);
- aLabelProp->SetColor(vtkFloatingPointType(aLabelColor.red())/255.,
- vtkFloatingPointType(aLabelColor.green())/255.,
- vtkFloatingPointType(aLabelColor.blue())/255.);
+ aLabelProp->SetColor(double(aLabelColor.red())/255.,
+ double(aLabelColor.green())/255.,
+ double(aLabelColor.blue())/255.);
(isLabelBold)? aLabelProp->BoldOn() : aLabelProp->BoldOff();
(isLabelItalic)? aLabelProp->ItalicOn() : aLabelProp->ItalicOff();
(isLabelShadow)? aLabelProp->ShadowOn() : aLabelProp->ShadowOff();
#include <vtkPointData.h>
#include <vtkCellData.h>
#include <vtkCell.h>
+#include <vtkDataArray.h>
// STL Includes
#include <map>
template<class TData> QString getScalar(TData* theData, int theId){
if (vtkDataArray *aScalar = theData->GetScalars()){
- vtkFloatingPointType aVal = aScalar->GetTuple1(theId);
+ double aVal = aScalar->GetTuple1(theId);
return QString::number(aVal);
} else {
return QString("No data");
template<class TData> QString getVector(TData* theData, int theId){
if (vtkDataArray *aVector = theData->GetVectors()) {
- vtkFloatingPointType *aVal = aVector->GetTuple3(theId);
+ double *aVal = aVector->GetTuple3(theId);
return QString("%1; %2; %3").arg(aVal[0]).arg(aVal[1]).arg(aVal[2]);
} else {
return QString("No data");
vtkDataSet* aDataSet = theActor->GetMapper()->GetInput();
- vtkFloatingPointType* aCoord = aDataSet->GetPoint( thePointVTKID );
+ double* aCoord = aDataSet->GetPoint( thePointVTKID );
aPointData.X = aCoord[0];
aPointData.Y = aCoord[1];
aPointData.Z = aCoord[2];
VISU::FindActor(VISU::GetAppStudy(myModule), aViewWindow, aSObject->GetID().c_str());
myFindPane->setActor( anVISUActor );
if (anVISUActor) {
- vtkFloatingPointType aCoord[6];
+ double aCoord[6];
anVISUActor->GetBounds(aCoord);
myXPosLbl->setText(QString::number( aCoord[0] ));
myYPosLbl->setText(QString::number( aCoord[2] ));
struct TPointData
{
- vtkFloatingPointType X;
- vtkFloatingPointType Y;
- vtkFloatingPointType Z;
+ double X;
+ double Y;
+ double Z;
vtkIdType I;
vtkIdType J;
vtkIdType K;
myPyramidHeightSpinBox->setValue( aPickingSettings->GetPyramidHeight() );
myPointToleranceSpinBox->setValue( aPickingSettings->GetPointTolerance() );
- vtkFloatingPointType* aColor = aPickingSettings->GetColor();
+ double* aColor = aPickingSettings->GetColor();
mySelectionColorButton->setColor( QColor( ( int )( aColor[0] * 255.0 ),
( int )( aColor[1] * 255.0 ),
( int )( aColor[2] * 255.0 ) ) );
myInfoWindowGroup->setChecked( aPickingSettings->GetInfoWindowEnabled() );
// VSR 28.06.2011 : IPAL 22513: add 0.5 to eliminate any prevision problems
- vtkFloatingPointType transparency = aPickingSettings->GetInfoWindowTransparency() * 100.0 + 0.5;
+ double transparency = aPickingSettings->GetInfoWindowTransparency() * 100.0 + 0.5;
myTransparencySpinBox->setValue( (int) transparency );
myPositionComboBox->setCurrentIndex( aPickingSettings->GetInfoWindowPosition() );
myCameraGroup->setChecked( aPickingSettings->GetCameraMovementEnabled() );
aPickingSettings->SetPointTolerance( myPointToleranceSpinBox->value() );
QColor aButtonColor = mySelectionColorButton->color();
- vtkFloatingPointType aColor[3];
+ double aColor[3];
aColor[0] = aButtonColor.red() / 255.0;
aColor[1] = aButtonColor.green() / 255.0;
aColor[2] = aButtonColor.blue() / 255.0;
myTextDlg->setTitleText( aTitle.in() );
myTitle = aTitle.in();
- vtkFloatingPointType R, G, B;
+ double R, G, B;
myBarPrs->GetTitleColor( R, G, B );
setPosAndSize( myBarPrs->GetPosX(),
FieldData& aData = myAnimator->getFieldData(myFieldLst->currentRow());
if (aData.myPrs.empty())
GeneratePresentations(myFieldLst->currentRow(),myAnimator);
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
aData.myPrs[0]->GetBounds(aBounds);
- vtkFloatingPointType aDist = 0;
+ double aDist = 0;
int aAxis = getAxis();
switch (aAxis) {
case XAxis:
aDist = fabs(aBounds[5] - aBounds[4]);
}
- vtkFloatingPointType dx = fabs(aBounds[1] - aBounds[0]);
- vtkFloatingPointType dy = fabs(aBounds[3] - aBounds[2]);
- vtkFloatingPointType dz = fabs(aBounds[5] - aBounds[4]);
- vtkFloatingPointType max = (dx > dy) ? dx : dy;
+ double dx = fabs(aBounds[1] - aBounds[0]);
+ double dy = fabs(aBounds[3] - aBounds[2]);
+ double dz = fabs(aBounds[5] - aBounds[4]);
+ double max = (dx > dy) ? dx : dy;
max = (dz > max) ? dz : max;
max /= 100.0;
aPrs->SetOffset(aOffs.myOffset[0],aOffs.myOffset[1],aOffs.myOffset[2]);
}
} else {
- vtkFloatingPointType aDist = 0;
- vtkFloatingPointType aShift = 0;
- vtkFloatingPointType aPrevDist = 0;
- vtkFloatingPointType aPrevShift = 0;
+ double aDist = 0;
+ double aShift = 0;
+ double aPrevDist = 0;
+ double aPrevShift = 0;
int i = 0;
QMap<VISU::Prs3d_i*, int>::Iterator it;
for (it = myPrsMap.begin(); it != myPrsMap.end(); ++it, i++) {
if (VISU_Actor* aActor = VISU::FindActor(myViewWindow, aPrs)) {
int aAxis = getAxis();
- vtkFloatingPointType aZeroOffset[3];
+ double aZeroOffset[3];
aZeroOffset[0] = aZeroOffset[1] = aZeroOffset[2] = 0;
aActor->SetPosition(aZeroOffset);
aActor->GetMapper()->Update();
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
aActor->GetBounds(aBounds);
switch (aAxis) {
case XAxis:
case ZAxis:
aDist = fabs(aBounds[5] - aBounds[4]);
}
- vtkFloatingPointType aOffset[3];
+ double aOffset[3];
aOffset[0] = aOffset[1] = aOffset[2] = 0;
aOffset[aAxis] =
(aBounds[2*aAxis+1] < aBounds[2*aAxis]) ? -aBounds[2*aAxis+1] : -aBounds[2*aAxis];
if (i > 0) {
- vtkFloatingPointType aCCDist = (aDist + aPrevDist) / 2.0;
+ double aCCDist = (aDist + aPrevDist) / 2.0;
- vtkFloatingPointType dx = fabs(aBounds[1] - aBounds[0]);
- vtkFloatingPointType dy = fabs(aBounds[3] - aBounds[2]);
- vtkFloatingPointType dz = fabs(aBounds[5] - aBounds[4]);
- vtkFloatingPointType max = (dx > dy) ? dx : dy;
+ double dx = fabs(aBounds[1] - aBounds[0]);
+ double dy = fabs(aBounds[3] - aBounds[2]);
+ double dz = fabs(aBounds[5] - aBounds[4]);
+ double max = (dx > dy) ? dx : dy;
max = (dz > max) ? dz : max;
max /= 100.0;
if (VISU_ActorBase* aActor = VISU::FindActorBase(myViewWindow, aPrs)) {
int aAxis = getAxis();
- vtkFloatingPointType aZeroOffset[3];
+ double aZeroOffset[3];
aZeroOffset[0] = aZeroOffset[1] = aZeroOffset[2] = 0;
aActor->SetPosition(aZeroOffset);
aActor->GetMapper()->Update();
- vtkFloatingPointType aBounds[6];
+ double aBounds[6];
aActor->GetBounds(aBounds);
switch (aAxis) {
case XAxis:
case ZAxis:
aDist = fabs(aBounds[5] - aBounds[4]);
}
- vtkFloatingPointType aOffset[3];
+ double aOffset[3];
aOffset[0] = aOffset[1] = aOffset[2] = 0;
aOffset[aAxis] =
(aBounds[2*aAxis+1] < aBounds[2*aAxis]) ? -aBounds[2*aAxis+1] : -aBounds[2*aAxis];
if (i > 0) {
- vtkFloatingPointType aCCDist = (aDist + aPrevDist) / 2.0;
+ double aCCDist = (aDist + aPrevDist) / 2.0;
- vtkFloatingPointType dx = fabs(aBounds[1] - aBounds[0]);
- vtkFloatingPointType dy = fabs(aBounds[3] - aBounds[2]);
- vtkFloatingPointType dz = fabs(aBounds[5] - aBounds[4]);
- vtkFloatingPointType max = (dx > dy) ? dx : dy;
+ double dx = fabs(aBounds[1] - aBounds[0]);
+ double dy = fabs(aBounds[3] - aBounds[2]);
+ double dz = fabs(aBounds[5] - aBounds[4]);
+ double max = (dx > dy) ? dx : dy;
max = (dz > max) ? dz : max;
max /= 100.0;
private:
struct Offset {
- vtkFloatingPointType myOffset[3];
+ double myOffset[3];
};
//------------------------------------------------------------
bool
ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow,
- vtkFloatingPointType allBounds[6],
+ double allBounds[6],
const char* theActorClassName)
{
vtkRenderer *aRen = theViewWindow->getRenderer();
VTK::ActorCollectionCopy aCopy(aRen->GetActors());
vtkActorCollection *anActColl = aCopy.GetActors();
vtkProp *prop;
- vtkFloatingPointType *bounds;
+ double *bounds;
int somethingVisible = false;
allBounds[0] = allBounds[2] = allBounds[4] = VTK_LARGE_FLOAT;
//------------------------------------------------------------
void SetFitAll(SVTK_ViewWindow* theViewWindow)
{
- static vtkFloatingPointType PRECISION = 0.000001;
- static vtkFloatingPointType DEVIATION = 600;
- vtkFloatingPointType XYZ_Bnd[6];
+ static double PRECISION = 0.000001;
+ static double DEVIATION = 600;
+ double XYZ_Bnd[6];
if (!ComputeVisiblePropBounds(theViewWindow, XYZ_Bnd)) return;
- vtkFloatingPointType absX = XYZ_Bnd[1] - XYZ_Bnd[0];
- vtkFloatingPointType absY = XYZ_Bnd[3] - XYZ_Bnd[2];
- vtkFloatingPointType absZ = XYZ_Bnd[5] - XYZ_Bnd[4];
+ double absX = XYZ_Bnd[1] - XYZ_Bnd[0];
+ double absY = XYZ_Bnd[3] - XYZ_Bnd[2];
+ double absZ = XYZ_Bnd[5] - XYZ_Bnd[4];
enum CameraOrient {e3D, eFront, eLeft, eTop};
CameraOrient aCameraOrient = e3D;
if (absZ <= PRECISION) aCameraOrient = eTop;
else {
// all the three dimensions exceeds precision
- vtkFloatingPointType dev_abs_XY = absX / absY;
- vtkFloatingPointType dev_abs_YZ = absY / absZ;
- vtkFloatingPointType dev_abs_XZ = absX / absZ;
+ double dev_abs_XY = absX / absY;
+ double dev_abs_YZ = absY / absZ;
+ double dev_abs_XZ = absX / absZ;
if (dev_abs_XY >= DEVIATION || 1./dev_abs_YZ >= DEVIATION)
aCameraOrient = eLeft;
else {
VISU::Prs3d_i* thePrs);
bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow,
- vtkFloatingPointType allBounds[6],
+ double allBounds[6],
const char* theActorClassName = "VISU_Actor");
/*!
bool isItalic = thePrs->IsItalicValLbl();
bool isShadow = thePrs->IsShadowValLbl();
- vtkFloatingPointType aGRB[ 3 ];
+ double aGRB[ 3 ];
thePrs->GetValLblFontColor( aGRB[ 0 ], aGRB[ 1 ], aGRB[ 2 ] );
// font
//---------------------------------------------------------------
- vtkFloatingPointType
+ double
TMinMaxController
::GetComponentMin(vtkIdType theCompID)
{
//---------------------------------------------------------------
- vtkFloatingPointType
+ double
TMinMaxController
::GetComponentMax(vtkIdType theCompID)
{
{}
virtual
- vtkFloatingPointType
+ double
GetComponentMin(vtkIdType theCompID)
{
if ( VISU::PField aField = myColoredPrs3d->GetScalarField() ) {
}
virtual
- vtkFloatingPointType
+ double
GetComponentMax(vtkIdType theCompID)
{
if ( VISU::PField aField = myColoredPrs3d->GetScalarField() ) {
SetItalicTitle(anOrigin->IsItalicTitle());
SetShadowTitle(anOrigin->IsShadowTitle());
SetTitFontType(anOrigin->GetTitFontType());
- vtkFloatingPointType r,g,b;
+ double r,g,b;
anOrigin->GetTitleColor(r,g,b);
SetTitleColor(r,g,b);
{
VISU::TSetModified aModified(this);
- vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+ double aScalarRange[2] = {theMin, theMax};
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, double*>
(GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
UseFixedRange(true);
}
{
VISU::TSetModified aModified(this);
- vtkFloatingPointType aScalarRange[ 2 ] = { theMin, theMax };
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+ double aScalarRange[ 2 ] = { theMin, theMax };
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, double*>
(GetSpecificPL(), &VISU_ColoredPL::SetScalarFilterRange, aScalarRange) );
}
VISU::ColoredPrs3d_i
::GetScalarFilterMin()
{
- vtkFloatingPointType aScalarRange[ 2 ];
+ double aScalarRange[ 2 ];
GetSpecificPL()->GetScalarFilterRange( aScalarRange );
return aScalarRange[ 0 ];
VISU::ColoredPrs3d_i
::GetScalarFilterMax()
{
- vtkFloatingPointType aScalarRange[ 2 ];
+ double aScalarRange[ 2 ];
GetSpecificPL()->GetScalarFilterRange( aScalarRange );
return aScalarRange[ 1 ];
ProcessVoidEvent(new TVoidMemFunEvent<VISU_ColoredPL>
(GetSpecificPL(), &VISU_ColoredPL::SetSourceRange));
}else{
- vtkFloatingPointType aScalarRange[ 2 ] = {GetSourceMin(), GetSourceMax()};
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+ double aScalarRange[ 2 ] = {GetSourceMin(), GetSourceMax()};
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, double*>
(GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
}
UseFixedRange(false);
::GetSourceMin()
{
if(IsTimeStampFixed()){
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSpecificPL()->GetSourceRange(aRange);
return aRange[0];
}
::GetSourceMax()
{
if(IsTimeStampFixed()){
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSpecificPL()->GetSourceRange(aRange);
return aRange[1];
}
//----------------------------------------------------------------------------
void
VISU::ColoredPrs3d_i
-::GetTitleColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB)
+::GetTitleColor(double& theR,
+ double& theG,
+ double& theB)
{
theR = myTitleColor[0];
theG = myTitleColor[1];
//----------------------------------------------------------------------------
void
VISU::ColoredPrs3d_i
-::SetTitleColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB)
+::SetTitleColor(double theR,
+ double theG,
+ double theB)
{
bool anIsSameValue = VISU::CheckIsSameValue(myTitleColor[0], theR);
anIsSameValue &= VISU::CheckIsSameValue(myTitleColor[1], theG);
//----------------------------------------------------------------------------
void
VISU::ColoredPrs3d_i
-::GetLabelColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB)
+::GetLabelColor(double& theR,
+ double& theG,
+ double& theB)
{
theR = myLabelColor[0];
theG = myLabelColor[1];
//----------------------------------------------------------------------------
void
VISU::ColoredPrs3d_i
-::SetLabelColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB)
+::SetLabelColor(double theR,
+ double theG,
+ double theB)
{
bool anIsSameValue = VISU::CheckIsSameValue(myLabelColor[0], theR);
anIsSameValue &= VISU::CheckIsSameValue(myLabelColor[1], theG);
// Scalar Bar origin
QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" );
- vtkFloatingPointType aXorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.1;
+ double aXorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.1;
aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
myPosition[0] = aXorigin;
- vtkFloatingPointType aYorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.01;
+ double aYorigin = (myOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.01;
aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
myPosition[1] = aYorigin;
void
VISU::ColoredPrs3d_i
-::GetValLblFontColor( vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB ) const
+::GetValLblFontColor( double& theR,
+ double& theG,
+ double& theB ) const
{
theR = myValLblFontColor[ 0 ];
theG = myValLblFontColor[ 1 ];
void
VISU::ColoredPrs3d_i
-::SetValLblFontColor( const vtkFloatingPointType theR,
- const vtkFloatingPointType theG,
- const vtkFloatingPointType theB )
+::SetValLblFontColor( const double theR,
+ const double theG,
+ const double theB )
{
if ( VISU::CheckIsSameValue( myValLblFontColor[ 0 ], theR ) &&
VISU::CheckIsSameValue( myValLblFontColor[ 1 ], theG ) &&
UpdateReference(ColoredPrs3d_i* theFromPrs3, ColoredPrs3d_i* theToPrs3d);
virtual
- vtkFloatingPointType
+ double
GetComponentMin(vtkIdType theCompID);
virtual
- vtkFloatingPointType
+ double
GetComponentMax(vtkIdType theCompID);
virtual
SetRange(CORBA::Double theMin, CORBA::Double theMax);
virtual
- vtkFloatingPointType
+ double
GetComponentMin(vtkIdType theCompID) = 0;
virtual
- vtkFloatingPointType
+ double
GetComponentMax(vtkIdType theCompID) = 0;
virtual
virtual
void
- GetTitleColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB);
+ GetTitleColor(double& theR,
+ double& theG,
+ double& theB);
virtual
void
- SetTitleColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB);
+ SetTitleColor(double theR,
+ double theG,
+ double theB);
virtual
bool
virtual
void
- GetLabelColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB);
+ GetLabelColor(double& theR,
+ double& theG,
+ double& theB);
virtual
void
- SetLabelColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB);
+ SetLabelColor(double theR,
+ double theG,
+ double theB);
virtual
void
virtual
void
- GetValLblFontColor( vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB ) const;
+ GetValLblFontColor( double& theR,
+ double& theG,
+ double& theB ) const;
virtual
void
- SetValLblFontColor( const vtkFloatingPointType theR,
- const vtkFloatingPointType theG,
- const vtkFloatingPointType theB );
+ SetValLblFontColor( const double theR,
+ const double theG,
+ const double theB );
virtual
void
std::string myLabelsFormat;
VISU::ColoredPrs3dBase::Orientation myOrientation;
- vtkFloatingPointType myPosition[2],
+ double myPosition[2],
myWidth, myHeight,
myTitleSize, myLabelSize,
myBarWidth, myBarHeight;
bool myIsItalicTitle;
bool myIsShadowTitle;
int myTitFontType;
- vtkFloatingPointType myTitleColor[3];
+ double myTitleColor[3];
bool myIsBoldLabel;
bool myIsItalicLabel;
bool myIsShadowLabel;
int myLblFontType;
- vtkFloatingPointType myLabelColor[3];
+ double myLabelColor[3];
VISU_ColoredPL* myColoredPL;
bool myIsFixedRange;
bool myIsBoldValLbl;
bool myIsItalicValLbl;
bool myIsShadowValLbl;
- vtkFloatingPointType myValLblFontColor[ 3 ];
+ double myValLblFontColor[ 3 ];
};
#include <vtkAppendPolyData.h>
-static vtkFloatingPointType EPS_machine = 1.0E-7;
+static double EPS_machine = 1.0E-7;
#ifdef _DEBUG_
static int MYDEBUG = 0;
anAttr = aStudyBuilder->FindOrCreateAttribute(theSObject, "AttributeTableOfReal");
SALOMEDS::AttributeTableOfReal_var aTableOfReal = SALOMEDS::AttributeTableOfReal::_narrow(anAttr);
- typedef set<vtkFloatingPointType> TXCont;
- typedef map<vtkFloatingPointType,vtkFloatingPointType> TXYMap;
+ typedef set<double> TXCont;
+ typedef map<double,double> TXYMap;
typedef map<int,TXYMap> TXYMapCont;
typedef map<long,long> TLineIdCont;
TXCont aXCont;
TXYMapCont aXYMapCont;
TLineIdCont aLineIdCont; // Define internal numeration of lines
- const vtkFloatingPointType *aDirLn = myCutLinesBasePL->GetDirLn();
- const vtkFloatingPointType *aBasePnt = myCutLinesBasePL->GetBasePnt();
- const vtkFloatingPointType *aBoundPrjLn = myCutLinesBasePL->GetBoundPrjLn();
+ const double *aDirLn = myCutLinesBasePL->GetDirLn();
+ const double *aBasePnt = myCutLinesBasePL->GetBasePnt();
+ const double *aBoundPrjLn = myCutLinesBasePL->GetBoundPrjLn();
for(int iLine = 0, jLine = 0; iLine < iLineEnd; iLine++){
vtkDataSet *aDataSet = myCutLinesBasePL->GetAppendPolyData()->GetInput(iLine);
- aDataSet->Update();
+ myCutLinesBasePL->GetAppendPolyData()->Update();
int aNbPoints = aDataSet->GetNumberOfPoints();
if(!aNbPoints) continue;
vtkPointData *aPointData = aDataSet->GetPointData();
VISU_CellDataToPointData *aFilter = NULL;
if(!aScalars) {
aFilter = VISU_CellDataToPointData::New();
- aFilter->SetInput(aDataSet);
+ aFilter->SetInputData(aDataSet);
aFilter->PassCellDataOn();
aDataSet = aFilter->GetOutput();
- aDataSet->Update();
+ aFilter->Update();
}
aPointData = aDataSet->GetPointData();
aScalars = aPointData->GetScalars();
if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLine = "<<iLine<<"; aNbPoints = "<<aNbPoints);
aLineIdCont[iLine] = jLine++;
TXYMap& aXYMap = aXYMapCont[iLine];
- vtkFloatingPointType aPnt[3], aVect[3], aDist, aTopBnd, aDivide;
+ double aPnt[3], aVect[3], aDist, aTopBnd, aDivide;
aTopBnd = aBoundPrjLn[2];
aDivide = aBoundPrjLn[2];
if( !IsUseAbsoluteLength() ){
TXYMap aNewXYMap;
TXYMap& aXYMap = aXYMapCont[iLine];
TXYMap::const_iterator aXYMapIter = aXYMap.begin();
- std::list<vtkFloatingPointType> XKeys;
+ std::list<double> XKeys;
for (;aXYMapIter != aXYMap.end() ; aXYMapIter++) XKeys.push_back(aXYMapIter->first);
XKeys.sort();
if (XKeys.size() > 1) {
- vtkFloatingPointType a_first_indx = XKeys.front();
- vtkFloatingPointType a_last_indx = XKeys.back();
+ double a_first_indx = XKeys.front();
+ double a_last_indx = XKeys.back();
if (a_first_indx > a_last_indx){
XKeys.reverse();
- vtkFloatingPointType tmp = a_first_indx;
+ double tmp = a_first_indx;
a_first_indx = a_last_indx;
a_last_indx = tmp;
}
- std::list<vtkFloatingPointType>::const_iterator aIter = XKeys.begin();
+ std::list<double>::const_iterator aIter = XKeys.begin();
for (int k=0;k<XKeys.size() && aIter != XKeys.end();k++,aIter++){
// Warning: value '1.0' come from workaround:
// see also aDist = vtkMath::Dot(aVect,aDirLn) / aBoundPrjLn[2];
// aDist >= 0 and aDist<=1.0
- vtkFloatingPointType aTopBnd = aBoundPrjLn[2];
+ double aTopBnd = aBoundPrjLn[2];
if( !IsUseAbsoluteLength() ){
aTopBnd = 1.0;
}
aNewXYMap[aXYMapIter[0]->first] = aXYMapIter[0]->second;
aXCont.insert(aXYMapIter[0]->first);
for(; aXYMapIter[1] != aXYMap.end(); aXYMapIter[0]++, aXYMapIter[1]++){
- vtkFloatingPointType aY[3] = {aXYMapIter[0]->second, aXYMapIter[1]->second, 0.0};
+ double aY[3] = {aXYMapIter[0]->second, aXYMapIter[1]->second, 0.0};
aY[2] = (aY[0] + aY[1])/2.0;
- vtkFloatingPointType aX[3] = {aXYMapIter[0]->first, aXYMapIter[1]->first, 0.0};
+ double aX[3] = {aXYMapIter[0]->first, aXYMapIter[1]->first, 0.0};
aX[2] = (aX[0] + aX[1])/2.0;
aNewXYMap[aX[2]] = aY[2];
aXCont.insert(aX[2]);
int iEnd = aXCont.size();
aTableOfReal->SetNbColumns(iEnd);
TXCont::const_iterator aXContIter = aXCont.begin();
- vtkFloatingPointType aMinDist = *aXContIter;
+ double aMinDist = *aXContIter;
aXContIter = aXCont.end();
aXContIter--;
- vtkFloatingPointType aMaxDist = *aXContIter;
+ double aMaxDist = *aXContIter;
if(aMaxDist < aMinDist)
throw std::runtime_error("CutPlanes_i::BuildTableOfReal aMaxDist < aMinDist !!!");
aXContIter = aXCont.begin();
for(long i = 0; aXContIter != aXCont.end(); aXContIter++, i++){
- vtkFloatingPointType aDist = *aXContIter;
- vtkFloatingPointType aXVal = aDist;
+ double aDist = *aXContIter;
+ double aXVal = aDist;
if(theIsCutSegment){
aXVal -= aMinDist;
if(!IsUseAbsoluteLength() && fabs(aMaxDist - aMinDist) > EPS_machine)
TXYMap::const_iterator aXYMapIter = aXYMap.find(aDist);
// Can we find some value that belong to the line and have the same X coordinate?
if(aXYMapIter == aXYMap.end()) continue;
- vtkFloatingPointType aVal = aXYMapIter->second;
+ double aVal = aXYMapIter->second;
aTableOfReal->PutValue(aVal,iLineId+2,i+1);
}
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutLinesPL, vtkFloatingPointType, int>
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutLinesPL, double, int>
(GetSpecificPL(), &VISU_CutLinesPL::SetDisplacement, theDisp, 0));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutLinesPL, vtkFloatingPointType, int>
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutLinesPL, double, int>
(GetSpecificPL(), &VISU_CutLinesPL::SetDisplacement, theDisp, 1));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_CutLinesPL, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_CutLinesPL, double>
(GetSpecificPL(), &VISU_CutLinesPL::SetPosition, thePlanePosition));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutLinesPL, int, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutLinesPL, int, double>
(GetSpecificPL(), &VISU_CutLinesPL::SetPartPosition, thePlaneNumber, thePlanePosition));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutPlanesPL, vtkFloatingPointType, int>
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutPlanesPL, double, int>
(GetSpecificPL(), &VISU_CutPlanesPL::SetDisplacement, theDisp, 0));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutPlanesPL, int, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_CutPlanesPL, int, double>
(GetSpecificPL(), &VISU_CutPlanesPL::SetPartPosition, thePlaneNumber, thePlanePosition));
}
VISU::TSetModified aModified(GetColoredPrs3d());
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformationPL, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformationPL, double>
(GetSpecificDeformedPL(), &VISU_DeformationPL::SetScale, theScale));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedShapeAndScalarMapPL, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedShapeAndScalarMapPL, double>
(GetSpecificPL(), &VISU_DeformedShapeAndScalarMapPL::SetScale, theScale));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedShapePL, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedShapePL, double>
(GetSpecificPL(), &VISU_DeformedShapePL::SetScale, theScale));
}
typename TMeshValue::TCValueSliceArr aMValueSliceArr = aMeshValue->GetCompValueSliceArr( iElem );
VISU::Comp2Value& aComp2Value = theElem2Comp2Value[ iElem ];
- vtkFloatingPointType& aModulusValue = aComp2Value[ 0 ];
+ double& aModulusValue = aComp2Value[ 0 ];
aModulusValue = 0.0;
for( vtkIdType iComp = 0; iComp < aNbComp; iComp++ )
{
const typename TMeshValue::TCValueSlice& aMValueSlice = aMValueSliceArr[ iComp ];
- vtkFloatingPointType& aValue = aComp2Value[ iComp+1 ];
+ double& aValue = aComp2Value[ iComp+1 ];
aValue = 0.0;
for(vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++)
{
- const vtkFloatingPointType& aVal = aMValueSlice[iGauss];
+ const double& aVal = aMValueSlice[iGauss];
aValue += aVal;
}
if( aNbGauss != 0 )
VISU::Comp2Value::const_iterator it3 = aComp2Value.find( theComponentId );
if( it3 != aComp2Value.end() )
{
- vtkFloatingPointType aValue = it3.value();
+ double aValue = it3.value();
theTimeStampValueList.append( aValue );
}
}
VISU::TimeStampValueListIterator it( aTimeStampValueList );
while( it.hasNext() )
{
- vtkFloatingPointType aValue = it.next();
+ double aValue = it.next();
VISU::TimeStampData aTimeStampData = myTimeStampDataList[ aTimeStamp ];
double aTimeValue = aTimeStampData.first;
namespace VISU
{
- typedef QMap< vtkIdType, vtkFloatingPointType > Comp2Value;
- typedef QMapIterator< vtkIdType, vtkFloatingPointType > Comp2ValueIterator;
+ typedef QMap< vtkIdType, double > Comp2Value;
+ typedef QMapIterator< vtkIdType, double > Comp2ValueIterator;
typedef QMap< vtkIdType, Comp2Value > Elem2Comp2Value;
typedef QMapIterator< vtkIdType, Comp2Value > Elem2Comp2ValueIterator;
typedef QList< ComponentData > ComponentDataList;
typedef QListIterator< ComponentData > ComponentDataListIterator;
- typedef QList< vtkFloatingPointType > TimeStampValueList;
- typedef QListIterator< vtkFloatingPointType > TimeStampValueListIterator;
+ typedef QList< double > TimeStampValueList;
+ typedef QListIterator< double > TimeStampValueListIterator;
};
class VISU_I_EXPORT VISU_Evolution
int aBicolor = aResourceMgr->integerValue( "VISU", "scalar_bar_bicolor", GetBiColor() );
SetBiColor( aBicolor == 0 );
- vtkFloatingPointType aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() );
+ double aSpacing = aResourceMgr->doubleValue( "VISU", "scalar_bar_spacing", GetSpacing() );
SetSpacing( aSpacing );
- vtkFloatingPointType aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() );
+ double aScaleFactor = aResourceMgr->doubleValue( "VISU", "deformed_shape_scale_factor", GetScaleFactor() );
SetScaleFactor( aScaleFactor );
int aPrimitiveType = aResourceMgr->integerValue( "VISU", "point_sprite_primitive_type", GetPrimitiveType() );
SetPrimitiveType( VISU::GaussPoints::PrimitiveType(aPrimitiveType) );
- vtkFloatingPointType aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() );
+ double aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", GetClamp() );
SetClamp( aClamp );
int aMinSize = aResourceMgr->integerValue( "VISU", "point_sprite_min_size", ( int )( GetMinSize() * 100.0 ) );
int aMagnification = aResourceMgr->integerValue( "VISU", "point_sprite_magnification", ( int )( GetMagnification() * 100.0 ) );
SetMagnification( aMagnification / 100.0 );
- vtkFloatingPointType anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() );
+ double anIncrement = aResourceMgr->doubleValue( "VISU", "point_sprite_increment", GetMagnificationIncrement() );
SetMagnificationIncrement( anIncrement );
bool isColored = aResourceMgr->booleanValue( "VISU", "point_sprite_results", GetIsColored() );
QColor aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", GetQColor() );
SetQColor( aColor );
- vtkFloatingPointType anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() );
+ double anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", GetAlphaThreshold() );
SetAlphaThreshold( anAlphaThreshold );
int aResolution = aResourceMgr->integerValue( "VISU", "geom_sphere_resolution", GetResolution() );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU::GaussPoints_i
::GetMaximumSupportedSize()
{
theLookupTable->SetNumberOfColors(aLookupTable->GetNumberOfColors());
theScalarBar->SetMaximumNumberOfColors(aLookupTable->GetNumberOfColors());
- vtkFloatingPointType anRGB[3];
+ double anRGB[3];
vtkTextProperty* aTitleProp = theScalarBar->GetTitleTextProperty();
aTitleProp->SetFontFamily(GetTitFontType());
GetPipeLine()->GetMapper()->SetScalarVisibility(1);
if(IsRangeFixed()){
- vtkFloatingPointType* aRange = GetSpecificPL()->GetScalarRange();
+ double* aRange = GetSpecificPL()->GetScalarRange();
aScalarBarCtrl->SetRangeLocal(aRange);
}else{
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSpecificPL()->GetSourceRange(aRange);
aScalarBarCtrl->SetRangeLocal(aRange);
}
}
if(aScalarBarMode == VISU_ScalarBarCtrl::eGlobal){
- vtkFloatingPointType aRangeGlobal[2];
+ double aRangeGlobal[2];
//
aRangeGlobal[0] = aTMinMax.first;
aRangeGlobal[1] = aTMinMax.second;
aScalarBarCtrl->SetWidth(GetWidth());
aScalarBarCtrl->SetHeight(GetHeight());
- vtkFloatingPointType aPosition[] = {GetPosX(), GetPosY()};
+ double aPosition[] = {GetPosX(), GetPosY()};
aScalarBarCtrl->SetPosition(aPosition);
aScalarBarCtrl->SetSpacing(mySpacing);
aProp->SetItalic( IsItalicValLbl() );
aProp->SetShadow( IsShadowValLbl() );
- vtkFloatingPointType anRGB[ 3 ];
+ double anRGB[ 3 ];
GetValLblFontColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
aProp->SetColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
}
{
VISU::TSetModified aModified(this);
- vtkFloatingPointType aScalarRange[2] = {GetSourceMin(), GetSourceMax()};
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, vtkFloatingPointType*>
+ double aScalarRange[2] = {GetSourceMin(), GetSourceMax()};
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_ColoredPL, double*>
(GetSpecificPL(), &VISU_ColoredPL::SetScalarRange, aScalarRange));
UseFixedRange(false);
Execute()
{
if ( myColoredPrs3d->IsTimeStampFixed() || myColoredPrs3d->GetIsActiveLocalScalarBar() ) {
- vtkFloatingPointType aRange[2];
+ double aRange[2];
myColoredPrs3d->GetSpecificPL()->GetSourceRange(aRange);
myResult = aRange[0];
}else{
Execute()
{
if ( myColoredPrs3d->IsTimeStampFixed() || myColoredPrs3d->GetIsActiveLocalScalarBar() ) {
- vtkFloatingPointType aRange[2];
+ double aRange[2];
myColoredPrs3d->GetSpecificPL()->GetSourceRange(aRange);
myResult = aRange[1];
}else{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU::GaussPoints_i
::GetComponentMin(vtkIdType theCompID)
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU::GaussPoints_i
::GetComponentMax(vtkIdType theCompID)
{
GetPrimitiveType();
//! Redirect the request to VISU_GaussPointsPL::GetMaximumSupportedSize.
- vtkFloatingPointType
+ double
GetMaximumSupportedSize();
//! Redirect the request to VISU_GaussPointsPL::SetClamp.
RemoveAllGeom();
virtual
- vtkFloatingPointType
+ double
GetComponentMin(vtkIdType theCompID);
virtual
- vtkFloatingPointType
+ double
GetComponentMax(vtkIdType theCompID);
protected:
bool myIsDispGlobalScalarBar;
bool myIsActiveLocalScalarBar;
QColor myColor;
- vtkFloatingPointType mySpacing;
+ double mySpacing;
int myFaceLimit;
QString myMainTexture;
VISU::TSetModified aModified(this);
bool isForced = false;
- vtkFloatingPointType aRange[2] = {theMin, theMax};
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_IsoSurfacesPL, vtkFloatingPointType*, bool>
+ double aRange[2] = {theMin, theMax};
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_IsoSurfacesPL, double*, bool>
(GetSpecificPL(), &VISU_IsoSurfacesPL::SetRange, aRange, isForced));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_Plot3DPL, vtkFloatingPointType, bool>
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_Plot3DPL, double, bool>
(GetSpecificPL(), &VISU_Plot3DPL::SetPlanePosition, thePlanePosition, theIsRelative));
}
{
VISU::TSetModified aModified(this);
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_Plot3DPL, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_Plot3DPL, double>
(GetSpecificPL(), &VISU_Plot3DPL::SetScaleFactor, theScaleFactor));
}
// Scalar Bar origin
QString propertyName = QString( "scalar_bar_%1_" ).arg( anOrientation == 0 ? "vertical" : "horizontal" );
- vtkFloatingPointType aXorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.2;
+ double aXorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.01 : 0.2;
aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
myPosition[0] = aXorigin;
- vtkFloatingPointType aYorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.012;
+ double aYorigin = (myBarOrientation == VISU::ColoredPrs3dBase::VERTICAL) ? 0.1 : 0.012;
aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
myPosition[1] = aYorigin;
aScalarBar->SetNumberOfLabels(GetLabels());
aScalarBar->SetLabelFormat(GetLabelsFormat());
- vtkFloatingPointType anRGB[3];
+ double anRGB[3];
vtkTextProperty* aTitleProp = aScalarBar->GetTitleTextProperty();
aTitleProp->SetFontFamily(GetTitFontType());
void VISU::PointMap3d_i::SetRange(CORBA::Double theMin, CORBA::Double theMax)
{
- vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, vtkFloatingPointType*>
+ double aScalarRange[2] = {theMin, theMax};
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, double*>
(GetSpecificPL(), &VISU_DeformedGridPL::SetScalarRange, aScalarRange));
UseFixedRange(true);
CORBA::Double VISU::PointMap3d_i::GetSourceMin()
{
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSpecificPL()->GetSourceRange(aRange);
return aRange[0];
}
CORBA::Double VISU::PointMap3d_i::GetSourceMax()
{
- vtkFloatingPointType aRange[2];
+ double aRange[2];
GetSpecificPL()->GetSourceRange(aRange);
return aRange[1];
}
if ( ( theBarOrientation == VISU::ColoredPrs3dBase::VERTICAL && myHeight < myWidth ) ||
( theBarOrientation == VISU::ColoredPrs3dBase::HORIZONTAL && myHeight > myWidth ) ) {
- vtkFloatingPointType tmp = myHeight;
+ double tmp = myHeight;
myHeight = myWidth;
myWidth = tmp;
}
void VISU::PointMap3d_i::SetScaleFactor (CORBA::Double theScaleFactor)
{
- ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, vtkFloatingPointType>
+ ProcessVoidEvent(new TVoidMemFun1ArgEvent<VISU_DeformedGridPL, double>
(GetSpecificPL(), &VISU_DeformedGridPL::SetScaleFactor, theScaleFactor));
}
}
//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::GetTitleColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB)
+void VISU::PointMap3d_i::GetTitleColor(double& theR,
+ double& theG,
+ double& theB)
{
theR = myTitleColor[0];
theG = myTitleColor[1];
}
//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetTitleColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB)
+void VISU::PointMap3d_i::SetTitleColor(double theR,
+ double theG,
+ double theB)
{
bool anIsSameValue = VISU::CheckIsSameValue(myTitleColor[0], theR);
anIsSameValue &= VISU::CheckIsSameValue(myTitleColor[1], theG);
}
//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::GetLabelColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB)
+void VISU::PointMap3d_i::GetLabelColor(double& theR,
+ double& theG,
+ double& theB)
{
theR = myLabelColor[0];
theG = myLabelColor[1];
}
//----------------------------------------------------------------------------
-void VISU::PointMap3d_i::SetLabelColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB)
+void VISU::PointMap3d_i::SetLabelColor(double theR,
+ double theG,
+ double theB)
{
bool anIsSameValue = VISU::CheckIsSameValue(myLabelColor[0], theR);
anIsSameValue &= VISU::CheckIsSameValue(myLabelColor[1], theG);
virtual void SetShadowTitle(bool isShadow);
virtual int GetTitFontType();
virtual void SetTitFontType(int theType);
- virtual void GetTitleColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB);
- virtual void SetTitleColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB);
+ virtual void GetTitleColor(double& theR,
+ double& theG,
+ double& theB);
+ virtual void SetTitleColor(double theR,
+ double theG,
+ double theB);
virtual bool IsBoldLabel();
virtual void SetBoldLabel(bool isBold);
virtual void SetShadowLabel(bool isShadow);
virtual int GetLblFontType();
virtual void SetLblFontType(int theType);
- virtual void GetLabelColor(vtkFloatingPointType& theR,
- vtkFloatingPointType& theG,
- vtkFloatingPointType& theB);
- virtual void SetLabelColor(vtkFloatingPointType theR,
- vtkFloatingPointType theG,
- vtkFloatingPointType theB);
+ virtual void GetLabelColor(double& theR,
+ double& theG,
+ double& theB);
+ virtual void SetLabelColor(double theR,
+ double theG,
+ double theB);
//-------------------------------------------------------------------
virtual CORBA::Long GetTitleSize();
SALOMEDS::SObject_var mySObj;
int myNumberOfLabels;
std::string myLabelsFormat;
- vtkFloatingPointType myPosition[2],
+ double myPosition[2],
myWidth, myHeight,
myTitleSize,
myLabelSize,
bool myIsItalicTitle;
bool myIsShadowTitle;
int myTitFontType;
- vtkFloatingPointType myTitleColor[3];
+ double myTitleColor[3];
bool myIsBoldLabel;
bool myIsItalicLabel;
bool myIsShadowLabel;
int myLblFontType;
- vtkFloatingPointType myLabelColor[3];
+ double myLabelColor[3];
boost::signal0<void> myUpdateActorsSignal;
boost::signal0<void> myRemoveActorsFromRendererSignal;
if (!aDataSet)
throw std::runtime_error("There is no input data !!!");
- aDataSet->Update();
+ aMapper->Update();
static float eps = VTK_LARGE_FLOAT * 0.1 ;
if (!aDataSet->GetNumberOfCells())
throw std::runtime_error("There are no visible elements");
//----------------------------------------------------------------------------
void
VISU::Prs3d_i
-::SetPlaneParam(vtkFloatingPointType theDir[3],
- vtkFloatingPointType theDist,
+::SetPlaneParam(double theDir[3],
+ double theDist,
vtkPlane* thePlane)
{
GetPipeLine()->SetPlaneParam(theDir, theDist, thePlane);
//----------------------------------------------------------------------------
void
VISU::Prs3d_i
-::GetBounds(vtkFloatingPointType aBounds[6])
+::GetBounds(double aBounds[6])
{
GetPipeLine()->GetMapper()->GetBounds(aBounds);
}
void RemoveClippingPlane(vtkIdType theID);
void
- SetPlaneParam(vtkFloatingPointType theDir[3],
- vtkFloatingPointType theDist,
+ SetPlaneParam(double theDir[3],
+ double theDist,
vtkPlane* thePlane);
//----------------------------------------------------------------------------
void
- GetBounds(vtkFloatingPointType aBounds[6]);
+ GetBounds(double aBounds[6]);
int
GetNumberOfActors();
cell->GetCellType() != VTK_QUADRATIC_HEXAHEDRON )
continue;
vtkPoints * points = cell->GetPoints();
- vtkFloatingPointType coords[ 4 ][3];
+ double coords[ 4 ][3];
points->GetPoint( 0, coords[0] );
points->GetPoint( 1, coords[1] );
points->GetPoint( 3, coords[2] );
points->GetPoint( 4, coords[3] );
gp_Pnt p0( coords[0][0], coords[0][1], coords[0][2] );
for ( iAx = 0; iAx < nbAxes; ++iAx ) {
- vtkFloatingPointType* coo = coords[ iAx + 1 ];
+ double* coo = coords[ iAx + 1 ];
gp_Pnt p( coo[0], coo[1], coo[2] );
// min size
- vtkFloatingPointType size = p0.SquareDistance( p );
+ double size = p0.SquareDistance( p );
if ( size > FLT_MIN && size < minSize[ iAx ] )
minSize[ iAx ] = size;
// axis direction
// get and sort intermediate component values - projections of nodes
// on axis direction; define bnd box
- set< vtkFloatingPointType > comps[ 3 ];
+ set< double > comps[ 3 ];
Bnd_Box box;
vtkPoints * points = aMesh->GetPoints();
vtkIdType iP, nbP = aMesh->GetNumberOfPoints();
for ( iP = 0; iP < nbP; ++iP ) {
- vtkFloatingPointType coo[3];
+ double coo[3];
points->GetPoint( iP, coo );
gp_Pnt p( coo[0], coo[1], coo[2] );
box.Add( p );
for ( iAx = 0; iAx < nbAxes; ++iAx ) {
const gp_Dir& dir = gInfo->myAxis[ iAx ];
- vtkFloatingPointType dot = dir.XYZ() * p.XYZ();
+ double dot = dir.XYZ() * p.XYZ();
comps[ iAx ].insert( dot );
}
}
// find a range of projections of bnd box corners on each axis
- vtkFloatingPointType range[3], firstValue[3];
+ double range[3], firstValue[3];
double x[2],y[2],z[2];
box.Get(x[0],y[0],z[0],x[1],y[1],z[1]);
for ( iAx = 0; iAx < nbAxes; ++iAx ) {
- set< vtkFloatingPointType > bndComps;
+ set< double > bndComps;
const gp_Dir& dir = gInfo->myAxis[ iAx ];
for ( int iX = 0; iX < 2; ++iX ) {
for ( int iY = 0; iY < 2; ++iY ) {
for ( int iZ = 0; iZ < 2; ++iZ ) {
gp_Pnt p( x[ iX ], y[ iY ], z[ iZ ] );
- vtkFloatingPointType dot = dir.XYZ() * p.XYZ();
+ double dot = dir.XYZ() * p.XYZ();
bndComps.insert( dot );
}
}
// compute component values
for ( iAx = 0; iAx < nbAxes; ++iAx ) {
- list< vtkFloatingPointType > values;
+ list< double > values;
int nbVals = 0;
- set< vtkFloatingPointType >& comp = comps[ iAx ];
- set< vtkFloatingPointType >::iterator val = comp.begin();
- vtkFloatingPointType bnd = -1., rng = range[ iAx ], first = firstValue[ iAx ];
- vtkFloatingPointType tol = 0.1 * sqrt( minSize[ iAx ]) / rng;
+ set< double >& comp = comps[ iAx ];
+ set< double >::iterator val = comp.begin();
+ double bnd = -1., rng = range[ iAx ], first = firstValue[ iAx ];
+ double tol = 0.1 * sqrt( minSize[ iAx ]) / rng;
for ( ; val != comp.end(); ++val ) {
- vtkFloatingPointType value = ( *val - first ) / rng;
+ double value = ( *val - first ) / rng;
if ( value > bnd ) {
values.push_back( value );
bnd = value + tol;
}
}
// store values in gInfo
- vector< vtkFloatingPointType >& myComp = gInfo->myComponets[ iAx ];
+ vector< double >& myComp = gInfo->myComponets[ iAx ];
myComp.resize( nbVals );
- list< vtkFloatingPointType >::iterator v = values.begin();
+ list< double >::iterator v = values.begin();
for ( int i = 0; v != values.end(); ++v ){
myComp[ i++ ] = *v;
}
}}
TStructuredId aStructuredId = theMesh->GetStructure();
- vector<vtkFloatingPointType> PointsCoords[3];
+ vector<double> PointsCoords[3];
vtkPoints* aPoints = aMesh->GetPoints();
switch ( aMeshDim ) {
case 3: {
aCoordIJK[2] = i + 1;
vtkIdType aObjID = anIDMapper->GetObjectIDByIndexes(aCoordIJK);
vtkIdType aVTKID = anIDMapper->GetNodeVTKID(aObjID);
- vtkFloatingPointType* aPCoord = aPoints->GetPoint(aVTKID);
+ double* aPCoord = aPoints->GetPoint(aVTKID);
PointsCoords[2].push_back(aPCoord[2]);
}
}
aCoordIJK[1] = i + 1;
vtkIdType aObjID = anIDMapper->GetObjectIDByIndexes(aCoordIJK);
vtkIdType aVTKID = anIDMapper->GetNodeVTKID(aObjID);
- vtkFloatingPointType* aPCoord = aPoints->GetPoint(aVTKID);
+ double* aPCoord = aPoints->GetPoint(aVTKID);
PointsCoords[1].push_back(aPCoord[1]);
}
}
aCoordIJK[0] = i + 1;
vtkIdType aObjID = anIDMapper->GetObjectIDByIndexes(aCoordIJK);
vtkIdType aVTKID = anIDMapper->GetNodeVTKID(aObjID);
- vtkFloatingPointType* aPCoord = aPoints->GetPoint(aVTKID);
+ double* aPCoord = aPoints->GetPoint(aVTKID);
PointsCoords[0].push_back(aPCoord[0]);
}
}}
for ( int i = 0; i < aMeshDim; i++ ) {
- vector< vtkFloatingPointType >& myComp = gInfo->myComponets[ i ];
+ vector< double >& myComp = gInfo->myComponets[ i ];
int aSize = PointsCoords[i].size();
if ( aSize > 0 ) {
- vtkFloatingPointType aLen = PointsCoords[i][aSize-1] - PointsCoords[i][0];
+ double aLen = PointsCoords[i][aSize-1] - PointsCoords[i][0];
myComp.resize(aSize);
myComp[0] = 0;
for ( int k = 1; k < aSize; k++ ) {
// Info on structured mesh contained in TInput
public:
typedef enum { AXIS_X = 0, AXIS_Y, AXIS_Z } TAxis;
- typedef std::vector< vtkFloatingPointType > TAxisInfo;
+ typedef std::vector< double > TAxisInfo;
const TAxisInfo* GetAxisInfo(const std::string& theMeshName,
TAxis theAxis,
gp_Dir& thePlaneNormal);
aScalarBar->SetNumberOfLabels(GetLabels());
aScalarBar->SetLabelFormat(GetLabelsFormat());
- vtkFloatingPointType anRGB[3];
+ double anRGB[3];
vtkTextProperty* aTitleProp = aScalarBar->GetTitleTextProperty();
aTitleProp->SetFontFamily(GetTitFontType());
aProp->SetItalic( IsItalicValLbl() );
aProp->SetShadow( IsShadowValLbl() );
- vtkFloatingPointType anRGB[ 3 ];
+ double anRGB[ 3 ];
GetValLblFontColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
aProp->SetColor( anRGB[ 0 ], anRGB[ 1 ], anRGB[ 2 ] );
}
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU::ScalarMap_i
::GetComponentMin(vtkIdType theCompID)
{
//----------------------------------------------------------------------------
-vtkFloatingPointType
+double
VISU::ScalarMap_i
::GetComponentMax(vtkIdType theCompID)
{
UpdateActor(VISU_ActorBase* theActor);
virtual
- vtkFloatingPointType
+ double
GetComponentMin(vtkIdType theCompID);
virtual
- vtkFloatingPointType
+ double
GetComponentMax(vtkIdType theCompID);
private:
myPrs3dServant = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(myPrs3d).in());
if(myPrs3dServant){
myAppendFilter->RemoveAllInputs();
- myAppendFilter->AddInput(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput());
+ myAppendFilter->AddInputData(myPrs3dServant->GetPipeLine()->GetMapper()->GetInput());
aSource = myAppendFilter->GetOutput();
}
}
}
virtual
- vtkFloatingPointType
+ double
GetComponentMin(vtkIdType theCompID)
{
- vtkFloatingPointType aMin = TMinMaxController::GetComponentMin(theCompID);
+ double aMin = TMinMaxController::GetComponentMin(theCompID);
if ( !myMinMaxContainer.empty() ) {
TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin();
for(; anIter != myMinMaxContainer.end(); anIter++){
}
virtual
- vtkFloatingPointType
+ double
GetComponentMax(vtkIdType theCompID)
{
- vtkFloatingPointType aMax = TMinMaxController::GetComponentMax(theCompID);
+ double aMax = TMinMaxController::GetComponentMax(theCompID);
if ( !myMinMaxContainer.empty() ) {
TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin();
for(; anIter != myMinMaxContainer.end(); anIter++){
void
Execute()
{
- vtkFloatingPointType backint[3];
+ double backint[3];
GetRenderer(myVW)->GetBackground(backint);
myResult.R = backint[0];
myResult.G = backint[1];
void View3D_i::ToStream (SUIT_ViewWindow* theViewWindow, std::ostringstream& theStr)
{
- vtkFloatingPointType backint[3];
+ double backint[3];
GetRenderer(theViewWindow)->GetBackground(backint);
Storable::DataToStream(theStr,"myColor.R",backint[0]);
Storable::DataToStream(theStr,"myColor.G",backint[1]);
SALOMEDS::Color View3D_i::GetBackground (SUIT_ViewWindow* theViewWindow)
{
SALOMEDS::Color aColor;
- vtkFloatingPointType backint[3];
+ double backint[3];
GetRenderer(theViewWindow)->GetBackground(backint);
aColor.R = backint[0]; aColor.G = backint[1]; aColor.B = backint[2];
return aColor;
TPrsManageEvent(theView3D, thePrs), myResult(-1.0) {}
virtual void Execute() {
if (VISU_Actor* anActor = GetMyActor()) {
- vtkFloatingPointType oldvalue = anActor->GetOpacity();
+ double oldvalue = anActor->GetOpacity();
myResult = (double)oldvalue;
}
}
TPrsManageEvent(theView3D, thePrs), myResult(-1.0) {}
virtual void Execute() {
if (VISU_Actor* anActor = GetMyActor()) {
- vtkFloatingPointType oldvalue = anActor->GetLineWidth();
+ double oldvalue = anActor->GetLineWidth();
myResult = (double)oldvalue;
}
}
return;
}
if (VISU_Actor* anActor = GetMyActor()) {
- anActor->SetOpacity((vtkFloatingPointType)myOpacity);
+ anActor->SetOpacity((double)myOpacity);
SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(myView3D->GetViewWindow());
vw->Repaint();
myResult = "";
return;
}
if (VISU_Actor* anActor = GetMyActor()) {
- anActor->SetLineWidth((vtkFloatingPointType)myLineWidth);
+ anActor->SetLineWidth((double)myLineWidth);
SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(myView3D->GetViewWindow());
vw->Repaint();
myResult = "";