// Check contents of the resulting (clipped) presentation data
if (!isFailed) {
- VISU_PipeLine* aPL = myPrs3d->GetPL();
+ VISU_PipeLine* aPL = myPrs3d->GetPipeLine();
VISU_PipeLine::TMapper* aM = aPL->GetMapper();
vtkDataSet* aPrsData = aM->GetInput();
aPrsData->Update();
if (myPreviewActor != 0) return;
storeToPrsObject(myCutLines);
- myCutLines->GetPL()->Update();
+ myCutLines->GetPipeLine()->Update();
vtkAppendPolyData* aPolyData = myCutLines->GetSpecificPL()->GetAppendPolyData();
vtkDataSetMapper* aPlaneMapper = vtkDataSetMapper::New();
aPlaneMapper->SetInput(aPolyData->GetOutput());
myRotXSpn2->value()*PI/180.,
myRotYSpn2->value()*PI/180.);
myCutLines->SetDisplacement2(myPosSpn2->value());*/
- //myCutLines->GetPL()->Update();
+ //myCutLines->GetPipeLine()->Update();
deletePlanes();
createPlanes();
//aView->Repaint();
if (aView) {
if (theUpdate && myPreviewCheck->isChecked() && (myCutLines != NULL)) {
//myCutLines->SetBasePlanePosition(aPos);
- // myCutLines->GetPL()->Update();
+ // myCutLines->GetPipeLine()->Update();
deletePlanes();
createPlanes();
//aView->Repaint();
SVTK_ViewWindow* aView = VISU::GetActiveViewWindow<SVTK_ViewWindow>();
if (aView) {
if (myPreviewCheck->isChecked()) {
- // myCutLines->GetPL()->Update();
+ // myCutLines->GetPipeLine()->Update();
deletePlanes();
createPlanes();
//aView->Repaint();
if (myPreviewCheck->isChecked()) {
//Update Preview
//myCutLines->SetLinePosition( theRow, aTxt.toDouble());
- // myCutLines->GetPL()->Update();
+ // myCutLines->GetPipeLine()->Update();
deletePlanes();
createPlanes();
//aView->Repaint();
if (aView) {
if (myPreviewCheck->isChecked()) {
//Update Preview
- // myCutLines->GetPL()->Update();
+ // myCutLines->GetPipeLine()->Update();
deletePlanes();
createPlanes();
//aView->Repaint();
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
if (thePreview) {
//storeToPrsObject(myCutLines);
- // myCutLines->GetPL()->Update();
+ // myCutLines->GetPipeLine()->Update();
createPlanes();
//vf->onFitAll();
} else {
myCutLines->SetOrientation2(getOrientaion(false),
myRotXSpn2->value()*PI/180.,
myRotYSpn2->value()*PI/180.);*/
- // myCutLines->GetPL()->Update();
+ // myCutLines->GetPipeLine()->Update();
deletePlanes();
createPlanes();
//aView->Repaint();
if (aView) {
if (myPreviewCheck->isChecked()) {
//myCutLines->SetBasePlanePosition(theValue.toDouble());
- // myCutLines->GetPL()->Update();
+ // myCutLines->GetPipeLine()->Update();
deletePlanes();
createPlanes();
//aView->Repaint();
// Update preview
if (myPreviewCheck->isChecked()) {
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
- myCutPlanes->GetPL()->Update();
+ myCutPlanes->GetPipeLine()->Update();
deletePlanes();
createPlanes();
vf->Repaint();
//Update Preview
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
myCutPlanes->SetPlanePosition( theRow, aTxt.toDouble());
- myCutPlanes->GetPL()->Update();
+ myCutPlanes->GetPipeLine()->Update();
deletePlanes();
createPlanes();
vf->Repaint();
if (myPreviewCheck->isChecked()) {
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
//Update Preview
- myCutPlanes->GetPL()->Update();
+ myCutPlanes->GetPipeLine()->Update();
deletePlanes();
createPlanes();
vf->Repaint();
if (myPreviewCheck->isChecked()) {
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.);
- myCutPlanes->GetPL()->Update();
+ myCutPlanes->GetPipeLine()->Update();
deletePlanes();
createPlanes();
vf->Repaint();
if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
if (thePreview) {
storeToPrsObject(myCutPlanes);
- myCutPlanes->GetPL()->Update();
+ myCutPlanes->GetPipeLine()->Update();
createPlanes();
vf->onFitAll();
} else {
if (!myPipeCopy)
myPipeCopy = VISU_Plot3DPL::New();
if (myPrs) {
- myPipeCopy->SetIDMapper(myPrs->GetPL()->GetIDMapper());
- myPipeCopy->ShallowCopy(myPrs->GetPL());
+ myPipeCopy->SetIDMapper(myPrs->GetPipeLine()->GetIDMapper());
+ myPipeCopy->ShallowCopy(myPrs->GetPipeLine());
storeToPrsObject(myPrs);
}
}
if (!myPipeCopy)
myPipeCopy = VISU_Plot3DPL::New();
if (myPrs)
- myPrs->GetPL()->ShallowCopy(myPipeCopy);
+ myPrs->GetPipeLine()->ShallowCopy(myPipeCopy);
}
//=======================================================================
// disable cutting plane controls if the mesh is planar
- if (thePrs->GetPL()->IsPlanarInput())
+ if (thePrs->GetPipeLine()->IsPlanarInput())
{
GBOrientation->setEnabled(false);
Rot1 ->setEnabled(false);
if (aPrs3d) {
int anId = theText.toInt();
- vtkDataSet* aDataSet = aPrs3d->GetPL()->GetMapper()->GetInput();
+ vtkDataSet* aDataSet = aPrs3d->GetPipeLine()->GetMapper()->GetInput();
int aMaxId = (aDataSet->*theMethod)();
if (anId < 0) anId = 0;
if (anId >= aMaxId) anId = aMaxId - 1;
VISU::ColoredPrs3d_i
::OnSetInput()
{
- bool anIsNotCreated = GetPL() == NULL;
+ bool anIsNotCreated = !IsPipeLineExists();
if(anIsNotCreated)
- CreatePipeLine(); // to create proper pipeline
+ CreatePipeLine(NULL); // to create proper pipeline
DoSetInput();
//----------------------------------------------------------------------------
void
VISU::ColoredPrs3d_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(MYDEBUG) MESSAGE("ColoredPrs3d_i::CreatePipeLine() - "<<myPipeLine);
- if(!myPipeLine){
- myPipeLine = VISU_ScalarMapPL::New();
- myPipeLine->GetMapper()->SetScalarVisibility(1);
- }
- myScalarMapPL = dynamic_cast<VISU_ScalarMapPL*>(myPipeLine);
+ if(MYDEBUG) MESSAGE("ColoredPrs3d_i::CreatePipeLine() - "<<thePipeLine);
+ if(!thePipeLine){
+ myScalarMapPL = VISU_ScalarMapPL::New();
+ myScalarMapPL->GetMapper()->SetScalarVisibility(1);
+ }else
+ myScalarMapPL = dynamic_cast<VISU_ScalarMapPL*>(thePipeLine);
+
+ SetPipeLine(myScalarMapPL);
}
//----------------------------------------------------------------------------
*/
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
/*!
First checks whether corresponding VTK pipeline exists and create it if not.
//---------------------------------------------------------------
void
VISU::CutLines_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(!myPipeLine)
- myPipeLine = VISU_CutLinesPL::New();
- myCutLinesPL = dynamic_cast<VISU_CutLinesPL*>(myPipeLine);
+ if(!thePipeLine){
+ myCutLinesPL = VISU_CutLinesPL::New();
+ }else
+ myCutLinesPL = dynamic_cast<VISU_CutLinesPL*>(thePipeLine);
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myCutLinesPL);
}
//! Extends VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Extends VISU_ColoredPrs3d_i::CheckIsPossible
virtual
//----------------------------------------------------------------------------
void
VISU::CutPlanes_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(!myPipeLine)
- myPipeLine = VISU_CutPlanesPL::New();
- myCutPlanesPL = dynamic_cast<VISU_CutPlanesPL*>(myPipeLine);
+ if(!thePipeLine){
+ myCutPlanesPL = VISU_CutPlanesPL::New();
+ }else
+ myCutPlanesPL = dynamic_cast<VISU_CutPlanesPL*>(thePipeLine);
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myCutPlanesPL);
}
//! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
virtual
//---------------------------------------------------------------
void
VISU::DeformedShape_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(!myPipeLine)
- myPipeLine = VISU_DeformedShapePL::New();
- myDeformedShapePL = dynamic_cast<VISU_DeformedShapePL*>(myPipeLine);
- myPipeLine->GetMapper()->SetScalarVisibility(IsColored());
+ if(!thePipeLine){
+ myDeformedShapePL = VISU_DeformedShapePL::New();
+ }else
+ myDeformedShapePL = dynamic_cast<VISU_DeformedShapePL*>(thePipeLine);
- TSuperClass::CreatePipeLine();
+ myDeformedShapePL->GetMapper()->SetScalarVisibility(IsColored());
+
+ TSuperClass::CreatePipeLine(myDeformedShapePL);
}
if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
if(IsColored()){
anActor->SetBarVisibility(true);
- myPipeLine->GetMapper()->SetScalarVisibility(1);
+ GetPipeLine()->GetMapper()->SetScalarVisibility(1);
}else{
anActor->SetBarVisibility(false);
- myPipeLine->GetMapper()->SetScalarVisibility(0);
+ GetPipeLine()->GetMapper()->SetScalarVisibility(0);
anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
}
TSuperClass::UpdateActor(theActor);
//! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
virtual
//----------------------------------------------------------------------------
void
VISU::GaussPoints_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(!myPipeLine)
- myPipeLine = VISU_GaussPointsPL::New();
+ if(!thePipeLine){
+ myGaussPointsPL = VISU_GaussPointsPL::New();
+ }else
+ myGaussPointsPL = dynamic_cast<VISU_GaussPointsPL*>(thePipeLine);
- myGaussPointsPL = dynamic_cast<VISU_GaussPointsPL*>(myPipeLine);
-
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myGaussPointsPL);
}
//----------------------------------------------------------------------------
VISU_PipeLine*
VISU::GaussPoints_i
-::GetPipeLine()
+::GetPL()
{
// We create a new PipeLine instance in order to provide
// different representations for different actors (basic and segmented)
VISU_GaussPointsPL* aPipeLine = VISU_GaussPointsPL::New();
aPipeLine->SetGaussPtsIDMapper(myGaussPointsPL->GetGaussPtsIDMapper());
- aPipeLine->ShallowCopy(myPipeLine);
+ aPipeLine->ShallowCopy(GetPipeLine());
aPipeLine->Update();
return aPipeLine;
}
theScalarBar->SetOrientation(myOrientation);
theScalarBar->SetNumberOfLabels(myNumberOfLabels);
- vtkLookupTable* aLookupTable = myScalarMapPL->GetBarTable();
+ vtkLookupTable* aLookupTable = GetSpecificPL()->GetBarTable();
theLookupTable->SetNumberOfColors(aLookupTable->GetNumberOfColors());
theScalarBar->SetMaximumNumberOfColors(aLookupTable->GetNumberOfColors());
VISU_ScalarBarCtrl *aScalarBarCtrl = anActor->GetScalarBarCtrl();
if(GetIsColored()){
anActor->SetBarVisibility(true);
- myPipeLine->GetMapper()->SetScalarVisibility(1);
+ GetPipeLine()->GetMapper()->SetScalarVisibility(1);
vtkFloatingPointType aRange[2];
- myScalarMapPL->GetSourceRange(aRange);
+ GetSpecificPL()->GetSourceRange(aRange);
aScalarBarCtrl->SetRangeLocal(aRange);
TMinMax aTMinMax(-VTK_LARGE_FLOAT,VTK_LARGE_FLOAT);
}else{
anActor->SetBarVisibility(false);
- myPipeLine->GetMapper()->SetScalarVisibility(0);
+ GetPipeLine()->GetMapper()->SetScalarVisibility(0);
anActor->GetProperty()->SetColor(myColor.red() / 255.0,
myColor.green() / 255.0,
//! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
virtual
virtual
VISU_PipeLine*
- GetPipeLine();
+ GetPL();
bool
OnCreateActor(VISU_GaussPtsAct* theActor,
//---------------------------------------------------------------
void
VISU::IsoSurfaces_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(MYDEBUG) MESSAGE("IsoSurfaces_i::DoHook()- "<<myPipeLine);
- if(!myPipeLine) myPipeLine = VISU_IsoSurfacesPL::New();
- myIsoSurfacesPL = dynamic_cast<VISU_IsoSurfacesPL*>(myPipeLine);
+ if(!thePipeLine){
+ myIsoSurfacesPL = VISU_IsoSurfacesPL::New();
+ }else
+ myIsoSurfacesPL = dynamic_cast<VISU_IsoSurfacesPL*>(thePipeLine);
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myIsoSurfacesPL);
}
//! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
virtual
Prs3d_i(theResult,false),
myMeshPL(VISU_MeshPL::New())
{
- myPipeLine = myMeshPL;
+ SetPipeLine(myMeshPL);
}
Prs3d_i(theResult,theSObject),
myMeshPL(VISU_MeshPL::New())
{
- myPipeLine = myMeshPL;
+ SetPipeLine(myMeshPL);
}
//---------------------------------------------------------------
void
VISU::Plot3D_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if (!myPipeLine)
- myPipeLine = VISU_Plot3DPL::New();
- myPlot3DPL = dynamic_cast<VISU_Plot3DPL*>(myPipeLine);
+ if(!thePipeLine){
+ myPlot3DPL = VISU_Plot3DPL::New();
+ }else
+ myPlot3DPL = dynamic_cast<VISU_Plot3DPL*>(thePipeLine);
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myPlot3DPL);
}
//! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
virtual
::SameAs(const Prs3d_i* theOrigin)
{
if(Prs3d_i* anOrigin = const_cast<Prs3d_i*>(theOrigin)){
- myPipeLine->SameAs(anOrigin->GetPL());
+ GetPipeLine()->SameAs(anOrigin->GetPipeLine());
anOrigin->GetOffset(myOffset);
}
}
{
if(MYDEBUG) MESSAGE("Prs3d_i::~Prs3d_i - this = "<<this);
myRemoveActorsFromRendererSignal();
- myPipeLine->Delete();
+ if(IsPipeLineExists())
+ GetPipeLine()->Delete();
if(myResult)
myResult->Destroy();
}
::GetMTime()
{
unsigned long int aTime = myParamsTime.GetMTime();
- if(myPipeLine)
- aTime = std::max(aTime,myPipeLine->GetMTime());
+ if(IsPipeLineExists())
+ aTime = std::max(aTime,GetPipeLine()->GetMTime());
return aTime;
}
if(MYDEBUG) MESSAGE("Prs3d_i::Update - this = "<<this);
try{
- if(myPipeLine){
- myPipeLine->Update();
- myUpdateTime.Modified();
- }
+ GetPipeLine()->Update();
+ myUpdateTime.Modified();
} catch(std::exception&){
throw;
}catch(...){
if(GetMTime() < myUpdateTime.GetMTime())
return;
- vtkMapper *aMapper = myPipeLine->GetMapper();
+ vtkMapper *aMapper = GetPipeLine()->GetMapper();
vtkDataSet *aDataSet = aMapper->GetInput();
if (!aDataSet)
throw std::runtime_error("There is no input data !!!");
//----------------------------------------------------------------------------
VISU_PipeLine*
VISU::Prs3d_i
-::GetPipeLine()
+::GetPipeLine() const
{
- return GetPL();
+ if(!myPipeLine)
+ throw std::runtime_error("VISU::Prs3d_i::myPipeLine == NULL !!!");
+
+ return myPipeLine;
}
+void
+VISU::Prs3d_i
+::SetPipeLine(VISU_PipeLine* thePipeLine)
+{
+ myPipeLine = thePipeLine;
+}
+
+bool
+VISU::Prs3d_i
+::IsPipeLineExists()
+{
+ return myPipeLine != NULL;
+}
VISU_PipeLine*
VISU::Prs3d_i
::GetPL()
{
- return myPipeLine;
+ return GetPipeLine();
}
vtkUnstructuredGrid*
VISU::Prs3d_i::
GetInput()
{
- return myPipeLine->GetInput();
+ return GetPipeLine()->GetInput();
}
if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor - this = "<<this<<"; theActor = "<<theActor);
- theActor->ShallowCopyPL(myPipeLine);
+ theActor->ShallowCopyPL(GetPipeLine());
theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
theActor->Modified();
}
VISU::Prs3d_i
::RemoveAllClippingPlanes()
{
- myPipeLine->RemoveAllClippingPlanes();
+ GetPipeLine()->RemoveAllClippingPlanes();
}
bool
VISU::Prs3d_i
::AddClippingPlane(vtkPlane* thePlane)
{
- return myPipeLine->AddClippingPlane(thePlane);
+ return GetPipeLine()->AddClippingPlane(thePlane);
}
vtkIdType
VISU::Prs3d_i
::GetNumberOfClippingPlanes() const
{
- return myPipeLine->GetNumberOfClippingPlanes();
+ return GetPipeLine()->GetNumberOfClippingPlanes();
}
vtkPlane*
VISU::Prs3d_i::
GetClippingPlane(vtkIdType theID) const
{
- return myPipeLine->GetClippingPlane(theID);
+ return GetPipeLine()->GetClippingPlane(theID);
}
void
vtkFloatingPointType theDist,
vtkPlane* thePlane)
{
- myPipeLine->SetPlaneParam(theDir, theDist, thePlane);
+ GetPipeLine()->SetPlaneParam(theDir, theDist, thePlane);
}
VISU::Prs3d_i
::GetBounds(vtkFloatingPointType aBounds[6])
{
- myPipeLine->GetMapper()->GetBounds(aBounds);
+ GetPipeLine()->GetMapper()->GetBounds(aBounds);
}
void
//----------------------------------------------------------------------------
//! Get corresponding VISU_PipeLine
VISU_PipeLine*
- GetPL();
+ GetPipeLine() const;
+
+ bool
+ IsPipeLineExists();
//! Get input of the VISU_PipeLine
vtkUnstructuredGrid*
bool
SetInput();
+ void
+ SetPipeLine(VISU_PipeLine* thePipeLine);
+
void
CreateActor(VISU_Actor* theActor,
const Handle(SALOME_InteractiveObject)& theIO = NULL);
virtual
VISU_PipeLine*
- GetPipeLine();
+ GetPL();
//! To check dataset validity, throws std::exception if not valid
virtual
CORBA::Float myOffset[3];
vtkTimeStamp myParamsTime;
- VISU_PipeLine *myPipeLine;
-
SALOMEDS::SObject_var mySObject;
bool myAddToStudy;
boost::signal0<void> myUpdateActorsSignal;
boost::signal0<void> myRemoveActorsFromRendererSignal;
vtkSmartPointer<vtkActorCollection> myActorCollection;
+
+ private:
+ VISU_PipeLine *myPipeLine;
};
//----------------------------------------------------------------------------
//---------------------------------------------------------------
void
VISU::ScalarMapOnDeformedShape_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::DoHook:"<<__LINE__<<endl;
- if(!myPipeLine)
- myPipeLine = VISU_ScalarMapOnDeformedShapePL::New();
-
- myScalarMapOnDeformedShapePL = dynamic_cast<VISU_ScalarMapOnDeformedShapePL*>(myPipeLine);
- myPipeLine->GetMapper()->SetScalarVisibility(IsColored());
+ if(!thePipeLine){
+ myScalarMapOnDeformedShapePL = VISU_ScalarMapOnDeformedShapePL::New();
+ }else
+ myScalarMapOnDeformedShapePL = dynamic_cast<VISU_ScalarMapOnDeformedShapePL*>(thePipeLine);
+
+ myScalarMapOnDeformedShapePL->GetMapper()->SetScalarVisibility(IsColored());
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myScalarMapOnDeformedShapePL);
}
if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
if(IsColored()){
anActor->SetBarVisibility(true);
- myPipeLine->GetMapper()->SetScalarVisibility(1);
+ GetPipeLine()->GetMapper()->SetScalarVisibility(1);
}else{
anActor->SetBarVisibility(false);
- myPipeLine->GetMapper()->SetScalarVisibility(0);
+ GetPipeLine()->GetMapper()->SetScalarVisibility(0);
anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
}
TSuperClass::UpdateActor(theActor);
//! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
virtual
CORBA::Double thePercents,
VISU::StreamLines::Direction theDirection)
{
- VISU::Prs3d_i* aPrs3di = NULL;
+ VISU::Prs3d_i* aPrs3d = NULL;
vtkPointSet* aSource = NULL;
if(!thePrs3d->_is_nil())
- if((aPrs3di = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(thePrs3d).in()))){
+ if((aPrs3d = dynamic_cast<VISU::Prs3d_i*>(VISU::GetServant(thePrs3d).in()))){
for(int i = myAppendFilter->GetNumberOfInputs()-1; i >= 0; i--)
myAppendFilter->RemoveInput(myAppendFilter->GetInput(i));
- myAppendFilter->AddInput(aPrs3di->GetPL()->GetMapper()->GetInput());
+ myAppendFilter->AddInput(aPrs3d->GetPipeLine()->GetMapper()->GetInput());
aSource = myAppendFilter->GetOutput();
}
int anIsAccepted = myStreamLinesPL->SetParams(theIntStep,
theDirection,
1);
if(anIsAccepted == 1)
- SetSource(aPrs3di);
+ SetSource(aPrs3d);
return anIsAccepted == 1;
}
//---------------------------------------------------------------
void
VISU::StreamLines_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(!myPipeLine)
- myPipeLine = VISU_StreamLinesPL::New();
- myStreamLinesPL = dynamic_cast<VISU_StreamLinesPL*>(myPipeLine);
+ if(!thePipeLine){
+ myStreamLinesPL = VISU_StreamLinesPL::New();
+ }else
+ myStreamLinesPL = dynamic_cast<VISU_StreamLinesPL*>(thePipeLine);
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myStreamLinesPL);
}
//! Extends VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Extends VISU_ColoredPrs3d_i::CheckIsPossible
virtual
//---------------------------------------------------------------
void
VISU::Vectors_i
-::CreatePipeLine()
+::CreatePipeLine(VISU_PipeLine* thePipeLine)
{
- if(!myPipeLine)
- myPipeLine = VISU_VectorsPL::New();
- myVectorsPL = dynamic_cast<VISU_VectorsPL*>(myPipeLine);
+ if(!thePipeLine){
+ myVectorsPL = VISU_VectorsPL::New();
+ }else
+ myVectorsPL = dynamic_cast<VISU_VectorsPL*>(thePipeLine);
- TSuperClass::CreatePipeLine();
+ TSuperClass::CreatePipeLine(myVectorsPL);
}
//---------------------------------------------------------------
VISU_PipeLine*
VISU::Vectors_i
-::GetPipeLine()
+::GetPL()
{
VISU_PipeLine* aPipeLine = VISU_VectorsPL::New();
- aPipeLine->SetIDMapper(myPipeLine->GetIDMapper());
- aPipeLine->ShallowCopy(myPipeLine);
+ aPipeLine->SetIDMapper(GetPipeLine()->GetIDMapper());
+ aPipeLine->ShallowCopy(GetPipeLine());
aPipeLine->Update();
return aPipeLine;
}
TSuperClass::UpdateActor(anActor);
anActor->GetProperty()->SetLineWidth(GetLineWidth());
if(VISU_VectorsPL* aVectorsPL = dynamic_cast<VISU_VectorsPL*>(anActor->GetPipeLine())){
- aVectorsPL->ShallowCopy(myPipeLine);
+ aVectorsPL->ShallowCopy(GetPipeLine());
aVectorsPL->Update();
aVectorsPL->SetMapScale(myVectorsPL->GetMapScale());
}
//! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
virtual
void
- CreatePipeLine();
+ CreatePipeLine(VISU_PipeLine* thePipeLine);
//! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
virtual
virtual
VISU_PipeLine*
- GetPipeLine();
+ GetPL();
VISU_VectorsPL *myVectorsPL;
float myLineWidth;