return myScaleFactor;
}
+//----------------------------------------------------------------------------
void
VISU_DeformedShapePL
::Init()
SetScale(0.0);
}
+//----------------------------------------------------------------------------
VISU_ScalarMapPL::THook*
VISU_DeformedShapePL
::DoHook()
return myWarpVector->GetOutput();
}
+//----------------------------------------------------------------------------
void
VISU_DeformedShapePL
::Update()
VISU_ScalarMapPL::Update();
}
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_DeformedShapePL
+::GetMemorySize()
+{
+ vtkDataSet* aDataSet = myCellDataToPointData->GetOutput();
+ unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
+
+ aDataSet = myWarpVector->GetOutput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+
+ aSize += Superclass::GetMemorySize();
+
+ return aSize;
+}
+
+
+//----------------------------------------------------------------------------
void
VISU_DeformedShapePL
::SetMapScale(vtkFloatingPointType theMapScale)
static int MYDEBUG = 0;
#endif
+//----------------------------------------------------------------------------
VISU_PipeLine
::VISU_PipeLine():
myMapper(vtkDataSetMapper::New()),
myIsShrinkable = false;
}
+//----------------------------------------------------------------------------
VISU_PipeLine
::~VISU_PipeLine()
{
if(MYDEBUG) MESSAGE("VISU_PipeLine::~VISU_PipeLine - "<<this);
}
+//----------------------------------------------------------------------------
unsigned long int
VISU_PipeLine
::GetMTime()
return aTime;
}
+//----------------------------------------------------------------------------
// Turn debugging output on.
void
VISU_PipeLine
Superclass::DebugOn();
}
+//----------------------------------------------------------------------------
// Turn debugging output off.
void
VISU_PipeLine
Superclass::DebugOff();
}
+//----------------------------------------------------------------------------
void
VISU_PipeLine
::ShallowCopy(VISU_PipeLine *thePipeLine)
Build();
}
+//----------------------------------------------------------------------------
void
VISU_PipeLine
::SameAs(VISU_PipeLine *thePipeLine)
GetImplicitFunction()->Delete();
}
+//----------------------------------------------------------------------------
TInput*
VISU_PipeLine
::GetInput() const
return myInput.GetPointer();
}
+//----------------------------------------------------------------------------
vtkDataSet*
VISU_PipeLine
::GetOutput()
return GetMapper()->GetInput();
}
+//----------------------------------------------------------------------------
TInput*
VISU_PipeLine
::GetInput2() const
return aDataSet;
}
+//----------------------------------------------------------------------------
void
VISU_PipeLine
::SetInput(TInput* theInput)
myInput = theInput;
}
+//----------------------------------------------------------------------------
VISU_PipeLine::TMapper*
VISU_PipeLine
::GetMapper()
return myMapper.GetPointer();
}
+//----------------------------------------------------------------------------
void
VISU_PipeLine
::Update()
myMapper->Update();
}
+//----------------------------------------------------------------------------
size_t
VISU_PipeLine
::CheckAvailableMemory(size_t theSize)
return 0;
}
+//----------------------------------------------------------------------------
size_t
VISU_PipeLine
::GetAvailableMemory(size_t theSize,
return aMax;
}
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_PipeLine
+::GetMemorySize()
+{
+ vtkDataSet* aDataSet = myExtractGeometry->GetInput();
+ unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
+
+ aDataSet = myExtractGeometry->GetOutput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+
+ aDataSet = GetMapper()->GetInput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+
+ return aSize;
+}
+
//------------------------ Clipping planes -----------------------------------
bool
VISU_PipeLine
return true;
}
+//----------------------------------------------------------------------------
vtkPlane*
VISU_PipeLine
::GetClippingPlane(vtkIdType theID) const
return aPlane;
}
+//----------------------------------------------------------------------------
void
VISU_PipeLine
::RemoveAllClippingPlanes()
}
}
+//----------------------------------------------------------------------------
vtkIdType
VISU_PipeLine
::GetNumberOfClippingPlanes() const
return 0;
}
+//----------------------------------------------------------------------------
static
void
ComputeBoundsParam (vtkDataSet* theDataSet,
theMinPnt[2] = aMinPnt[2];
}
+//----------------------------------------------------------------------------
static
void
DistanceToPosition(vtkDataSet* theDataSet,
thePos[2] = aMinPnt[2]-theDirection[2]*aLength;
}
+//----------------------------------------------------------------------------
static
void
PositionToDistance (vtkDataSet* theDataSet,
theDist = (aPrj-aMinBoundPrj)/(aMaxBoundPrj-aMinBoundPrj);
}
+//----------------------------------------------------------------------------
void
VISU_PipeLine
::SetPlaneParam(vtkFloatingPointType theDir[3],
thePlane->SetOrigin(anOrigin);
}
+//----------------------------------------------------------------------------
void
VISU_PipeLine
::GetPlaneParam(vtkFloatingPointType theDir[3],
::PositionToDistance(GetInput(),theDir,anOrigin,theDist);
}
-//=======================================================================
-//function : IsPlanarInput
-//purpose :
-//=======================================================================
+//----------------------------------------------------------------------------
bool
VISU_PipeLine
::IsPlanarInput() const
VISU::Prs3d_i
::GetMemorySize()
{
- static int INCMEMORY = 4;
- vtkDataSet* aDataSet = GetPipeLine()->GetMapper()->GetInput();
- CORBA::Float aSize = aDataSet->GetActualMemorySize() * INCMEMORY * 1024.0;
- //cout<<"Prs3d_i::GetMemorySize - "<<this<<"; aDataSet = "<<aSize / (1024.0 * 1024.0)<<endl;
+ // To calculate memory used by VISU Converter
+ static int INCMEMORY = 2;
+ vtkDataSet* aDataSet = GetPipeLine()->GetInput();
+ CORBA::Float aSize = aDataSet->GetActualMemorySize() * INCMEMORY / 1024.0;
+ // To calculate memory used by VISU PipeLine
+ aSize += GetPipeLine()->GetMemorySize();
+
+ // To calculate memory used by VISU Actos
int anEnd = myActorCollection->GetNumberOfItems();
for(int anId = 0; anId < anEnd; anId++)
if(vtkObject* anObject = myActorCollection->GetItemAsObject(anId))
if(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(anObject)){
aSize += anActor->GetMemorySize();
- //cout<<"Prs3d_i::GetMemorySize - "<<this<<"; anActor = "<<anActor->GetMemorySize() / (1024.0 * 1024.0)<<endl;
}
- //cout<<"Prs3d_i::GetMemorySize - "<<this<<"; aSize = "<<aSize / (1024.0 * 1024.0)<<endl;
+ // Convert to mega bytes
return aSize / (1024.0 * 1024.0);
}