VISU_Actor
::UpdateFromFactory()
{
- myActorFactory->UpdateActor(this);
- Update();
+ if(GetMTime() < myActorFactory->GetMTime()){
+ myActorFactory->UpdateActor(this);
+ Update();
+ }
}
void
~TActorFactory()
{}
+ //! Return modified time of the factory
+ virtual
+ unsigned long int
+ GetMTime() = 0;
+
//! To update the actor
virtual
void
VISU::Prs3d_i
::UpdateActor(VISU_Actor* theActor)
{
- if(theActor->GetMTime() < myUpdateTime.GetMTime())
- return;
-
if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor - this = "<<this<<"; theActor = "<<theActor);
-
- theActor->ShallowCopyPL(GetPipeLine());
theActor->SetPosition(myOffset[0],myOffset[1],myOffset[2]);
+ theActor->ShallowCopyPL(GetPipeLine());
theActor->Modified();
}
anActors->InitTraversal();
while (vtkActor *anAct = anActors->GetNextActor()) {
if (VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(anAct)) {
- VISU::Prs3d_i* aPrs3d = anActor->GetPrs3d();
- if (anActor->GetVisibility() && aPrs3d) {
- aPrs3d->Update();
- aPrs3d->UpdateActor(anActor);
- }
+ if (anActor->GetVisibility())
+ anActor->UpdateFromFactory();
}
}
RepaintView(myViewWindow);