From 4afe27dd5ac14de1604c8ca0d5db81114f89f930 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 22 Sep 2005 05:58:33 +0000 Subject: [PATCH] Implementation of InteractorObserver functionality for the GaussPoints Actor class --- src/VISU_I/VISU_GaussPoints_i.cc | 66 ++++++++++++++++++++++++++------ src/VISU_I/VISU_GaussPoints_i.hh | 36 ++++++++++++----- src/VISU_I/VISU_Prs3d_i.cc | 26 ++++++++----- src/VISU_I/VISU_Prs3d_i.hh | 8 +++- 4 files changed, 104 insertions(+), 32 deletions(-) diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 7fa87b1d..abd082fb 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -33,7 +33,7 @@ using namespace VISU; using namespace std; #ifdef _DEBUG_ -static int MYDEBUG = 0; +static int MYDEBUG = 1; #else static int MYDEBUG = 0; #endif @@ -146,6 +146,43 @@ VISU::GaussPoints_i } +//---------------------------------------------------------------------------- +VISU_GaussPointsPL* +VISU::GaussPoints_i +::GetGaussPointsPL() +{ + return myGaussPointsPL; +} + +QColor +VISU::GaussPoints_i +::GetColor() +{ + return myColor; +} + +void +VISU::GaussPoints_i +::SetColor( const QColor& theColor ) +{ + myColor = theColor; +} + +bool +VISU::GaussPoints_i +::IsColored() +{ + return myIsColored; +} + +void +VISU::GaussPoints_i +::ShowColored( bool theColored ) +{ + myIsColored = theColored; +} + + //---------------------------------------------------------------------------- void VISU::GaussPoints_i @@ -188,10 +225,7 @@ VISU_PipeLine* VISU::GaussPoints_i ::GetPipeLine() { - VISU_GaussPointsPL* aPipeLine = VISU_GaussPointsPL::New(); - aPipeLine->ShallowCopy(myPipeLine); - aPipeLine->Update(); - return aPipeLine; + return GetPL(); } @@ -213,6 +247,13 @@ VISU::GaussPoints_i return anActor; } +//---------------------------------------------------------------------------- +VISU_Actor* +VISU::GaussPoints_i +::CloneActor(VISU_Actor* theActor) +{ + VISU::ScalarMap_i::CloneActor(theActor); +} //---------------------------------------------------------------------------- void @@ -235,23 +276,26 @@ VISU::GaussPoints_i } } - //---------------------------------------------------------------------------- -VISU_Actor* +void VISU::GaussPoints_i -::CloneActor(VISU_Actor* theActor) +::UpdateFromActor(VISU_Actor* theActor) { - VISU::ScalarMap_i::CloneActor(theActor); + if(VISU_GaussPtsAct* anActor = dynamic_cast(theActor)){ + bool aChangeMagnification = anActor->ChangeMagnification(); + if(MYDEBUG) MESSAGE("GaussPoints_i::UpdateFromActor - this = "<