* Gets the animation mode.
*/
AnimationMode getAnimationMode();
+
+ /*!
+ * Apply the presentation properties to all fields. The exception is raised in the following cases:
+ * 1) presentations for the given field is not yet created;
+ * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
+ * 3) the MED file is not the same;
+ * 4) the mesh name is not the same;
+ * 5) the field name is not the same;
+ * 6) the entity is not the same.
+ */
+ void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs);
};
/*! \brief Interface %Result
myView = 0;
}
+void VISU_TimeAnimation::ApplyProperties(CORBA::Long theFieldNum, VISU::ColoredPrs3d_ptr thePrs)
+ throw (SALOME::SALOME_Exception)
+{
+ FieldData& aData = myFieldsLst[theFieldNum];
+
+ if ( aData.myPrs.empty() )
+ throw SALOME_Exception(LOCALIZED("Error : presentations for the given field is not yet created!"));
+
+ VISU::ColoredPrs3d_i* aPrs_i = dynamic_cast<VISU::ColoredPrs3d_i*>(GetServant(thePrs).in());
+
+ if ( !aPrs_i )
+ throw SALOME_Exception(LOCALIZED("Error : invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i"));
+
+ if ( aPrs_i->GetResult() != aData.myPrs[0]->GetResult() )
+ throw SALOME_Exception(LOCALIZED("Error : the MED file is not the same!"));
+
+ if ( aPrs_i->GetMeshName() != aData.myPrs[0]->GetMeshName() )
+ throw SALOME_Exception(LOCALIZED("Error : the mesh name is not the same!"));
+
+ if ( aPrs_i->GetFieldName() != aData.myPrs[0]->GetFieldName() )
+ throw SALOME_Exception(LOCALIZED("Error : the field name is not the same!"));
+
+ if ( aPrs_i->GetEntity() != aData.myPrs[0]->GetEntity() )
+ throw SALOME_Exception(LOCALIZED("Error : the entity is not the same!"));
+
+ for (int i = 0; i < aData.myNbFrames; i++) {
+ aData.myPrs[i]->SameAsParams(aPrs_i);
+ }
+
+}
//========================================================================
//========================================================================
{
return VISU::Animation::AnimationMode(myAnim->getAnimationMode());
}
+
+void VISU_TimeAnimation_i::ApplyProperties(CORBA::Long theFieldNum, VISU::ColoredPrs3d_ptr thePrs)
+ throw (SALOME::SALOME_Exception)
+{
+ myAnim->ApplyProperties(theFieldNum, thePrs);
+}
void setAnimationMode(int theMode) { myAnimationMode = theMode; }
int getAnimationMode() { return myAnimationMode; }
+ void ApplyProperties(CORBA::Long theFieldNum, VISU::ColoredPrs3d_ptr thePrs) throw (SALOME::SALOME_Exception);
+
public slots:
void setProportionalSlot(bool theProp) { myProportional = theProp; }
void setCyclingSlot(bool theCycle) { myCycling = theCycle; }
virtual void setAnimationMode(VISU::Animation::AnimationMode theMode);
virtual VISU::Animation::AnimationMode getAnimationMode();
+
+ virtual void ApplyProperties(CORBA::Long theFieldNum, VISU::ColoredPrs3d_ptr thePrs) throw (SALOME::SALOME_Exception);
};
#endif //VISU_TIMEANIMATION_H