-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// File : VISU_TimeAnimation.cxx
// Author : Vitaly SMETANNIKOV
// Module : VISU
#include "VISU_CutPlanes_i.hh"
#include "VISU_Plot3D_i.hh"
#include "VISU_CutLines_i.hh"
+#include "VISU_CutSegment_i.hh"
#include "VISU_Vectors_i.hh"
#include "VISU_StreamLines_i.hh"
#include "VISU_GaussPoints_i.hh"
void
AddController(ColoredPrs3d_i* theReference,
- VISU::PMinMaxController theMinMaxController)
+ VISU::PMinMaxController theMinMaxController)
{
myMinMaxContainer[ TKey( theReference ) ] = theMinMaxController;
}
{
TMinMaxContainer::iterator anIter = myMinMaxContainer.find( TKey( theFromPrs3 ) );
if ( anIter != myMinMaxContainer.end() ) {
- myMinMaxContainer.erase( anIter );
- myMinMaxContainer[ TKey( theToPrs3d ) ] = VISU::CreateDefaultMinMaxController( theToPrs3d );
+ myMinMaxContainer.erase( anIter );
+ myMinMaxContainer[ TKey( theToPrs3d ) ] = VISU::CreateDefaultMinMaxController( theToPrs3d );
}
}
{
vtkFloatingPointType aMin = TMinMaxController::GetComponentMin(theCompID);
if ( !myMinMaxContainer.empty() ) {
- TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin();
- for(; anIter != myMinMaxContainer.end(); anIter++){
- VISU::PMinMaxController aMinMaxController = anIter->second;
- aMin = std::min(aMin, aMinMaxController->GetComponentMin(theCompID));
- }
+ TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin();
+ for(; anIter != myMinMaxContainer.end(); anIter++){
+ VISU::PMinMaxController aMinMaxController = anIter->second;
+ aMin = std::min(aMin, aMinMaxController->GetComponentMin(theCompID));
+ }
}
return aMin;
}
{
vtkFloatingPointType aMax = TMinMaxController::GetComponentMax(theCompID);
if ( !myMinMaxContainer.empty() ) {
- TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin();
- for(; anIter != myMinMaxContainer.end(); anIter++){
- VISU::PMinMaxController aMinMaxController = anIter->second;
- aMax = std::max(aMax, aMinMaxController->GetComponentMax(theCompID));
- }
+ TMinMaxContainer::const_iterator anIter = myMinMaxContainer.begin();
+ for(; anIter != myMinMaxContainer.end(); anIter++){
+ VISU::PMinMaxController aMinMaxController = anIter->second;
+ aMax = std::max(aMax, aMinMaxController->GetComponentMax(theCompID));
+ }
}
return aMax;
}
myDumpPath = "";
myAVIMaker = "jpeg2yuv";
+
+ myDumpMode = VISU::GetResourceMgr()->integerValue("VISU", "dump_mode", 0);
+ myTimeStampFrequency = VISU::GetResourceMgr()->integerValue("VISU", "time_stamp_frequency", 1);
}
VISU::Storable::TRestoringMap aFMap = VISU::Storable::GetStorableMap(myFieldsLst.first().myField);
long aNumComp = VISU::Storable::FindValue(aFMap, "myNumComponent").toLong();
if ( aNumCompCurr != aNumComp )
- return false;
+ return false;
}
if ( !myFieldsLst.isEmpty() )
if (!theData.myActors.empty()) {
for (int i = 0, iEnd = theData.myActors.size(); i < iEnd; i++) {
if (theData.myActors[i] != 0) {
- theData.myActors[i]->RemoveFromRender(aRen);
+ theData.myActors[i]->RemoveFromRender(aRen);
}
}
theData.myActors.clear();
if (!theData.myPrs.empty()) {
for (int i = 0, iEnd = theData.myPrs.size(); i < iEnd; i++)
if (theData.myPrs[i] != 0) {
- theData.myPrs[i]->_remove_ref();
+ theData.myPrs[i]->_remove_ref();
}
theData.myPrs.clear();
}
template<class TPrs3d>
void
GeneratePresentations(_PTR(Study) theStudy,
- FieldData& theData,
- VISU::Result_i* theResult,
- bool theIsRangeDefined,
- CORBA::Double theTimeMin,
- CORBA::Double theTimeMax,
- QList<long> theSequence)
+ FieldData& theData,
+ VISU::Result_i* theResult,
+ bool theIsRangeDefined,
+ CORBA::Double theTimeMin,
+ CORBA::Double theTimeMax,
+ QList<long> theSequence)
{
_PTR(ChildIterator) anIter = theStudy->NewChildIterator(theData.myField);
anIter->Next(); // First is reference on support
long aSequenceIndex = 1;
for(; anIter->More(); anIter->Next(), aSequenceIndex++){
if (aFrameId == theData.myNbTimes) {
- MESSAGE("There are extra timestamps in field");
- return;
+ MESSAGE("There are extra timestamps in field");
+ return;
}
_PTR(SObject) aTimeStamp = anIter->Value();
if(!aTimeStamp)
- continue;
+ continue;
long aSequenceId = -1;
theData.myTiming[aFrameId] = VISU_TimeAnimation::getTimeValue(aTimeStamp);
if (theIsRangeDefined) {
- if (theData.myTiming[aFrameId] < theTimeMin)
- continue;
- if (theData.myTiming[aFrameId] > theTimeMax)
- break;
+ if (theData.myTiming[aFrameId] < theTimeMin)
+ continue;
+ if (theData.myTiming[aFrameId] > theTimeMax)
+ break;
}
else if (isSequenceDefined) {
- aSequenceId = theSequence.indexOf( aSequenceIndex );
- if( aSequenceId == -1 )
- continue;
+ aSequenceId = theSequence.indexOf( aSequenceIndex );
+ if( aSequenceId == -1 )
+ continue;
}
VISU::Storable::TRestoringMap aTimeMap = VISU::Storable::GetStorableMap(aTimeStamp);
#endif
if(aPresent->Apply(false)){
/*
- if(isSequenceDefined)
- {
- theData.myPrs[aSequenceId] = aPresent;
- aFrameId++;
- }
- else
+ if(isSequenceDefined)
+ {
+ theData.myPrs[aSequenceId] = aPresent;
+ aFrameId++;
+ }
+ else
*/
theData.myPrs[aFrameId++] = aPresent;
anIsCreated = true;
INFOS("Unknown exception was occured!");
}
if(!anIsCreated)
- aPresent->_remove_ref();
+ aPresent->_remove_ref();
}
theData.myNbFrames = aFrameId;
if (theData.myPrsType != VISU::TGAUSSPOINTS) {
for(long aFrameId = 0; aFrameId < theData.myNbFrames; aFrameId++) {
- if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(theData.myPrs[aFrameId])){
- aPrs->SetOffset(theData.myOffset);
- }
+ if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(theData.myPrs[aFrameId])){
+ aPrs->SetOffset(theData.myOffset);
+ }
}
}
}
switch (aData.myPrsType) {
case VISU::TSCALARMAP:
GeneratePresentations<ScalarMap_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TISOSURFACES: // Iso Surfaces
GeneratePresentations<IsoSurfaces_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TCUTPLANES: // Cut Planes
GeneratePresentations<CutPlanes_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TCUTLINES: // Cut Lines
GeneratePresentations<CutLines_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
+ break;
+ case VISU::TCUTSEGMENT: // Cut Segment
+ GeneratePresentations<CutSegment_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TPLOT3D: // Plot3d
GeneratePresentations<Plot3D_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TDEFORMEDSHAPE: // Deformed Shape
GeneratePresentations<DeformedShape_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TVECTORS: // Vectors
GeneratePresentations<Vectors_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TSTREAMLINES: // Stream Lines
GeneratePresentations<StreamLines_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TGAUSSPOINTS: // Gauss Points
GeneratePresentations<GaussPoints_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
case VISU::TSCALARMAPONDEFORMEDSHAPE: // Scalar map on deformed shape
case VISU::TDEFORMEDSHAPEANDSCALARMAP:
GeneratePresentations<DeformedShapeAndScalarMap_i>(myStudy,
- aData,
- aResult,
- isRangeDefined(),
- myTimeMinVal,
- myTimeMaxVal,
- aSequence);
+ aData,
+ aResult,
+ isRangeDefined(),
+ myTimeMinVal,
+ myTimeMaxVal,
+ aSequence);
break;
default:
MESSAGE("Not implemented for this presentation type: " << aData.myPrsType);
if (theFieldNum == getNbFields() - 1) {
if ( aData.myPrsType != VISU::TGAUSSPOINTS && aData.myPrsType != TDEFORMEDSHAPEANDSCALARMAP && aData.myPrsType != TSCALARMAPONDEFORMEDSHAPE) {
- // Initialize the MinMax controller
- VISU::PCompositeMinMaxController aMinMaxController(new VISU::TCompositeMinMaxController());
- if ( myAnimationMode == VISU::Animation::PARALLEL ) {
- FieldData& aFieldData = getFieldData(theFieldNum);
- VISU::ColoredPrs3d_i* aPrs3d = aFieldData.myPrs[0];
- aMinMaxController->AddController( aPrs3d, VISU::CreateDefaultMinMaxController( aPrs3d ) );
- } else {
- for (int aFieldId = 0; aFieldId < getNbFields(); aFieldId++) {
- FieldData& aFieldData = getFieldData(aFieldId);
- VISU::ColoredPrs3d_i* aPrs3d = aFieldData.myPrs[0];
- aMinMaxController->AddController( aPrs3d, VISU::CreateDefaultMinMaxController( aPrs3d ) );
- }
- }
-
- double aMin = getMinFieldsValue(myFieldsLst);
- double aMax = getMaxFieldsValue(myFieldsLst);
-
- for (int aFieldId = 0; aFieldId < getNbFields(); aFieldId++) {
- FieldData& aFieldData = getFieldData(aFieldId);
- for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) {
- VISU::ColoredPrs3d_i* aPrs3d = aFieldData.myPrs[aFrameId];
- aPrs3d->SetMinMaxController(aMinMaxController);
- if (VISU::IsoSurfaces_i* anIsoSurfaces = dynamic_cast<VISU::IsoSurfaces_i*>(aPrs3d))
- anIsoSurfaces->SetSubRange(aMin, aMax);
- }
- }
+ // Initialize the MinMax controller
+ VISU::PCompositeMinMaxController aMinMaxController(new VISU::TCompositeMinMaxController());
+ if ( myAnimationMode == VISU::Animation::PARALLEL ) {
+ FieldData& aFieldData = getFieldData(theFieldNum);
+ VISU::ColoredPrs3d_i* aPrs3d = aFieldData.myPrs[0];
+ aMinMaxController->AddController( aPrs3d, VISU::CreateDefaultMinMaxController( aPrs3d ) );
+ } else {
+ for (int aFieldId = 0; aFieldId < getNbFields(); aFieldId++) {
+ FieldData& aFieldData = getFieldData(aFieldId);
+ VISU::ColoredPrs3d_i* aPrs3d = aFieldData.myPrs[0];
+ aMinMaxController->AddController( aPrs3d, VISU::CreateDefaultMinMaxController( aPrs3d ) );
+ }
+ }
+
+ double aMin = getMinFieldsValue(myFieldsLst);
+ double aMax = getMaxFieldsValue(myFieldsLst);
+
+ for (int aFieldId = 0; aFieldId < getNbFields(); aFieldId++) {
+ FieldData& aFieldData = getFieldData(aFieldId);
+ for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) {
+ VISU::ColoredPrs3d_i* aPrs3d = aFieldData.myPrs[aFrameId];
+ aPrs3d->SetMinMaxController(aMinMaxController);
+ if (VISU::IsoSurfaces_i* anIsoSurfaces = dynamic_cast<VISU::IsoSurfaces_i*>(aPrs3d))
+ anIsoSurfaces->SetSubRange(aMin, aMax);
+ }
+ }
}
}
}
for (long j = 0; j < aData.myNbFrames; j++) {
VISU_Actor* aActor = NULL;
try{
- aData.myPrs[j]->SetOffset(aData.myOffset);
- aActor = aData.myPrs[j]->CreateActor();
- myView->AddActor(aActor);
- bool condition = ( myAnimationMode == VISU::Animation::PARALLEL ) ? (j == 0) : (j == 0 && i == 0);
- if(condition)
- aActor->VisibilityOn();
- else
- aActor->VisibilityOff();
+ aData.myPrs[j]->SetOffset(aData.myOffset);
+ aActor = aData.myPrs[j]->CreateActor();
+ myView->AddActor(aActor);
+ bool condition = ( myAnimationMode == VISU::Animation::PARALLEL ) ? (j == 0) : (j == 0 && i == 0);
+ if(condition)
+ aActor->VisibilityOn();
+ else
+ aActor->VisibilityOff();
}catch(...){ //catch(std::runtime_error& exc){
- aNoError = false;
- myLastError += QString("%1 ").arg(aData.myTiming[j]);
+ aNoError = false;
+ myLastError += QString("%1 ").arg(aData.myTiming[j]);
}
aData.myActors[j] = aActor;
}
myFrame = 0;
myLastError += QString(" timestamp(s) cannot be created.");
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[0].myTiming[myFrame]));
+ myFrame, myFieldsLst[0].myTiming[myFrame]));
myView->Repaint();
return aNoError;
}
FieldData& aData = myFieldsLst[i];
if (!aData.myActors.empty()) {
for (int i = 0, iEnd = aData.myActors.size(); i < iEnd; i++) {
- if (aData.myActors[i] != 0) {
- aData.myActors[i]->RemoveFromRender(aRen);
- }
+ if (aData.myActors[i] != 0) {
+ aData.myActors[i]->RemoveFromRender(aRen);
+ }
}
aData.myActors.clear();
}
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
- if (myFieldsLst[i].myActors[myFrame] != 0)
- visibilityOff(i, myFrame);
+ if (myFieldsLst[i].myActors[myFrame] != 0)
+ visibilityOff(i, myFrame);
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
aFieldId = aPair.first;
aFrameId = aPair.second;
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- visibilityOff(aFieldId, aFrameId);
+ visibilityOff(aFieldId, aFrameId);
}
myFrame++;
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
- if (myFieldsLst[i].myActors[myFrame] != 0)
- myFieldsLst[i].myActors[myFrame]->VisibilityOn();
+ if (myFieldsLst[i].myActors[myFrame] != 0)
+ myFieldsLst[i].myActors[myFrame]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[0].myTiming[myFrame]));
+ myFrame, myFieldsLst[0].myTiming[myFrame]));
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
aFieldId = aPair.first;
aFrameId = aPair.second;
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
+ myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
+ myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
}
myView->Repaint();
}
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
- if (myFieldsLst[i].myActors[myFrame] != 0)
- visibilityOff(i, myFrame);
+ if (myFieldsLst[i].myActors[myFrame] != 0)
+ visibilityOff(i, myFrame);
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
aFieldId = aPair.first;
aFrameId = aPair.second;
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- visibilityOff(aFieldId, aFrameId);
+ visibilityOff(aFieldId, aFrameId);
}
myFrame--;
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
- if (myFieldsLst[i].myActors[myFrame] != 0)
- myFieldsLst[i].myActors[myFrame]->VisibilityOn();
+ if (myFieldsLst[i].myActors[myFrame] != 0)
+ myFieldsLst[i].myActors[myFrame]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[0].myTiming[myFrame]));
+ myFrame, myFieldsLst[0].myTiming[myFrame]));
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
aFieldId = aPair.first;
aFrameId = aPair.second;
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
+ myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
+ myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
}
myView->Repaint();
}
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
if(!myFieldsLst[i].myActors.empty())
- if (myFieldsLst[i].myActors[myFrame] != 0)
- visibilityOff(i, myFrame);
+ if (myFieldsLst[i].myActors[myFrame] != 0)
+ visibilityOff(i, myFrame);
}
else { //successive animation mode
std::pair<int,long> aPair = getRelativeFrameNumber(myFrame);
long aFrameId = aPair.second;
if(!myFieldsLst[aFieldId].myActors.empty())
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- visibilityOff(aFieldId, aFrameId);
+ visibilityOff(aFieldId, aFrameId);
}
myFrame = 0;
for (i = 0; i < imax; i++)
if(!myFieldsLst[i].myActors.empty())
if (myFieldsLst[i].myActors[myFrame] != 0)
- myFieldsLst[i].myActors[myFrame]->VisibilityOn();
+ myFieldsLst[i].myActors[myFrame]->VisibilityOn();
if(!myFieldsLst[0].myTiming.empty()){
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[0].myTiming[myFrame]));
+ myFrame, myFieldsLst[0].myTiming[myFrame]));
myView->Repaint();
}
}
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
if (myFieldsLst[i].myActors[myFrame] != 0)
- visibilityOff(i, myFrame);
+ visibilityOff(i, myFrame);
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
if (myFieldsLst[i].myActors[myFrame] != 0)
- myFieldsLst[i].myActors[myFrame]->VisibilityOn();
+ myFieldsLst[i].myActors[myFrame]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[0].myTiming[myFrame]));
+ myFrame, myFieldsLst[0].myTiming[myFrame]));
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
aFieldId = aPair.first;
aFrameId = aPair.second;
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
+ myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
+ myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
}
myView->Repaint();
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
if (myFieldsLst[i].myActors[myFrame] != 0)
- visibilityOff(i, myFrame);
+ visibilityOff(i, myFrame);
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
aFieldId = aPair.first;
aFrameId = aPair.second;
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- visibilityOff(aFieldId, aFrameId);
+ visibilityOff(aFieldId, aFrameId);
}
myFrame = theFrame;
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
for (i = 0; i < getNbFields(); i++)
if (myFieldsLst[i].myActors[myFrame] != 0)
- myFieldsLst[i].myActors[myFrame]->VisibilityOn();
+ myFieldsLst[i].myActors[myFrame]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[0].myTiming[myFrame]));
+ myFrame, myFieldsLst[0].myTiming[myFrame]));
}
else { //successive animation mode
aPair = getRelativeFrameNumber(myFrame);
aFieldId = aPair.first;
aFrameId = aPair.second;
if (myFieldsLst[aFieldId].myActors[aFrameId] != 0)
- myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
+ myFieldsLst[aFieldId].myActors[aFrameId]->VisibilityOn();
ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
- myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
+ myFrame, myFieldsLst[aFieldId].myTiming[aFrameId]));
}
myView->Repaint();
}
else { //successive animation mode
if ( aFieldId == 0 && aFrameNum <= myFieldsAbsFrames[aFieldId] )
- aRes = aFrameNum;
+ aRes = aFrameNum;
else if ( aFieldId && aFrameNum <= myFieldsAbsFrames[aFieldId] - myFieldsAbsFrames[aFieldId-1] )
- aRes = myFieldsAbsFrames[aFieldId-1] + aFrameNum;
+ aRes = myFieldsAbsFrames[aFieldId-1] + aFrameNum;
}
}
return aRes - 1;
}
else { //successive animation mode
for (int i = 0, iEnd = myFieldsAbsFrames.size(); i < iEnd; i++)
- if ( myFieldsAbsFrames[i] >= theFrame ) {
- aRes.first = i;
- if ( i == 0 )
- aRes.second = theFrame - 1;
- else
- aRes.second = theFrame-myFieldsAbsFrames[i-1] - 1;
- break;
- }
+ if ( myFieldsAbsFrames[i] >= theFrame ) {
+ aRes.first = i;
+ if ( i == 0 )
+ aRes.second = theFrame - 1;
+ else
+ aRes.second = theFrame-myFieldsAbsFrames[i-1] - 1;
+ break;
+ }
}
}
return aRes;
if (myExecutionState->IsActive()) {
for (int i = 0; i < getNbFields(); i++) {
FieldData& aData = myFieldsLst[i];
- if (aData.myNbFrames == 0)
- continue;
+ if (aData.myNbFrames == 0)
+ continue;
if (myFrame > 0) {
if (aData.myActors[myFrame-1] != 0)
visibilityOff(i, myFrame-1);
} else {
- if (aData.myActors[aData.myNbFrames-1] != 0)
- visibilityOff(i, aData.myNbFrames-1);
+ if (aData.myActors[aData.myNbFrames-1] != 0)
+ visibilityOff(i, aData.myNbFrames-1);
}
if (aData.myActors[myFrame] != 0 && myView) {
ProcessVoidEvent(new TVoidMemFunEvent<VISU_Actor>(aData.myActors[myFrame],
}
}
if (!myView)
- return;
+ return;
bool repainArg = false;
ProcessVoidEvent(new TVoidMemFun1ArgEvent<SVTK_ViewWindow,bool>(myView,
&SVTK_ViewWindow::Repaint,
// We must unlock mutex for some time before grabbing to allow view updating
msleep(delay);
if (!myExecutionState->IsActive())
- return;
+ return;
if (!(aFirstFieldData.myField)) // break, if field was deleted.
- break;
+ break;
saveImages( 0, aOneVal, aNbFiles, theIndexList );
}
if (myFrame == aFirstFieldData.myNbFrames) {
if (!myCycling) {
aHasNextFrame = false;
- myFrame--;
+ myFrame--;
}
else
- myFrame = 0;
+ myFrame = 0;
}
} // while (aHasNextFrame && myExecutionState->IsActive())
}
if ( !aData.myPrs[0] ) continue;
for (; aFrame < aData.myNbFrames && myExecutionState->IsActive(); aFrame++, myFrame++)
{
- ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>
+ ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>
(this, &VISU_TimeAnimation::_emitFrameChanged,
myFrame, myFieldsLst[aFieldId].myTiming[aFrame]));
- if (myExecutionState->IsActive()) {
+ if (myExecutionState->IsActive()) {
if (aFrame > 0) {
if (aData.myActors[aFrame-1] != 0)
visibilityOff(aFieldId, aFrame-1);
&VISU_Actor::VisibilityOn));
}
- if (!myView)
- return;
+ if (!myView)
+ return;
bool repainArg = false;
ProcessVoidEvent(new TVoidMemFun1ArgEvent<SVTK_ViewWindow,bool>(myView,
&SVTK_ViewWindow::Repaint,
repainArg));
- }
-
- k = 1;
- if (myProportional) {
- switch (aFrame) {
- case 0:
- break;
- case 1:
- if (aFirstFieldData.myNbFrames > 2)
- k = (aFirstFieldData.myTiming[aFrame+1] -
- aFirstFieldData.myTiming[aFrame]) / aOneVal;
- break;
- default:
- if (aFrame < (aFirstFieldData.myNbFrames - 1))
- k = (aFirstFieldData.myTiming[aFrame+1] -
- aFirstFieldData.myTiming[aFrame]) / aOneVal;
- }
- }
- int delay = (int)(1000. * k / mySpeed);
- theIsDumping = !myDumpPath.isEmpty();
- if (delay < 1 && theIsDumping) {
- // We must unlock mutex for some time before grabbing to allow view updating
- delay = 1;
- }
- msleep(delay);
-
- if (!myExecutionState->IsActive()) return;
-
- if (theIsDumping) {
- // We must unlock mutex for some time before grabbing to allow view updating
- msleep(delay);
- if (!myExecutionState->IsActive()) return;
-
- if (!(myFieldsLst[aFieldId].myField)) // break, if field was deleted.
- break;
-
- saveImages( aFieldId, aOneVal, aNbFiles, theIndexList );
- }
+ }
+
+ k = 1;
+ if (myProportional) {
+ switch (aFrame) {
+ case 0:
+ break;
+ case 1:
+ if (aFirstFieldData.myNbFrames > 2)
+ k = (aFirstFieldData.myTiming[aFrame+1] -
+ aFirstFieldData.myTiming[aFrame]) / aOneVal;
+ break;
+ default:
+ if (aFrame < (aFirstFieldData.myNbFrames - 1))
+ k = (aFirstFieldData.myTiming[aFrame+1] -
+ aFirstFieldData.myTiming[aFrame]) / aOneVal;
+ }
+ }
+ int delay = (int)(1000. * k / mySpeed);
+ theIsDumping = !myDumpPath.isEmpty();
+ if (delay < 1 && theIsDumping) {
+ // We must unlock mutex for some time before grabbing to allow view updating
+ delay = 1;
+ }
+ msleep(delay);
+
+ if (!myExecutionState->IsActive()) return;
+
+ if (theIsDumping) {
+ // We must unlock mutex for some time before grabbing to allow view updating
+ msleep(delay);
+ if (!myExecutionState->IsActive()) return;
+
+ if (!(myFieldsLst[aFieldId].myField)) // break, if field was deleted.
+ break;
+
+ saveImages( aFieldId, aOneVal, aNbFiles, theIndexList );
+ }
} // for (; aFrame < aData.myNbFrames && myExecutionState->IsActive(); aFrame++, myFrame++)
} // for (int aFieldId = 0;
//------------------------------------------------------------------------
void VISU_TimeAnimation::saveImages( int theFieldId,
- double& theOneVal, int& theNbFiles,
- QList<int>& theIndexList )
+ double& theOneVal, int& theNbFiles,
+ QList<int>& theIndexList )
{
if (myDumpFormat.compare("AVI") != 0) {
QString aFile(myDumpPath);
aFile += ".";
aFile += myDumpFormat.toLower();
ProcessVoidEvent(new TVoidMemFunEvent<SVTK_ViewWindow>
- (myView,&SVTK_ViewWindow::RefreshDumpImage)); // IPAL13602
+ (myView,&SVTK_ViewWindow::RefreshDumpImage)); // IPAL13602
ProcessEvent(new TMemFun2ArgEvent<SUIT_ViewWindow,bool,const QString&,const QString&>
- (myView,&SUIT_ViewWindow::dumpViewToFormat,aFile,myDumpFormat));
+ (myView,&SUIT_ViewWindow::dumpViewToFormat,aFile,myDumpFormat));
} else {
QFileInfo aFileInfo(myDumpPath);
QString aDirPath = aFileInfo.absolutePath();
QString aBaseName = aFileInfo.fileName();
+ if( myTimeStampFrequency > 1 && myFrame % myTimeStampFrequency != 0 )
+ return;
+
switch (myFrame) {
case 0:
break;
break;
default:
if (myProportional) {
- FieldData& aFirstFieldData = myFieldsLst[0];
- double p = (aFirstFieldData.myTiming[myFrame] -
- aFirstFieldData.myTiming[myFrame-1]) / theOneVal;
- myFileIndex += (long) (5*p);
+ FieldData& aFirstFieldData = myFieldsLst[0];
+ double p = (aFirstFieldData.myTiming[myFrame] -
+ aFirstFieldData.myTiming[myFrame-1]) / theOneVal;
+ myFileIndex += (long) (5*p);
} else {
- myFileIndex += 5;
+ myFileIndex += 5;
}
}
int height = img.height(); height = (height/16)*16;
QImage copy = img.copy(0, 0, width, height);
if (copy.save(aFile, "JPEG")) {
- theIndexList.append(myFileIndex);
- theNbFiles++;
+ theIndexList.append(myFileIndex);
+ theNbFiles++;
}
}
}
// make AVI file if need
if (isDumping && myDumpFormat.compare("AVI") == 0 && myExecutionState->IsActive()) {
- double aFPS = 17.3 * mySpeed;
+ double aFPS = 17.3 * mySpeed / myTimeStampFrequency;
QFileInfo aFileInfo(myDumpPath);
QString aDirPath = aFileInfo.absolutePath();
// add missing files
if (anIndexList.count() > 1) {
- QString aFFile = aDirPath + QDir::separator() + aBaseName;
+ QString aFFile = aDirPath + "/" + aBaseName;
aFFile += QString("_%1.jpeg");
int aStartIndex = anIndexList[0], anEndIndex;
for (int i = 1; i < anIndexList.count(); i++) {
- anEndIndex = anIndexList[i];
- QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustified(8, '0'));
- QStringList aCommands;
- for (int j = aStartIndex+1; j < anEndIndex; j++) {
- QString aFile = aFFile.arg(QString::number(j).rightJustified(8, '0'));
- aCommands.append(QString("ln -s %1 %2").arg(aCurFile).arg(aFile));
- }
- system(aCommands.join(" ; \\\n").toLatin1().data());
- aStartIndex = anEndIndex;
+ anEndIndex = anIndexList[i];
+ QString aCurFile = aFFile.arg(QString::number(aStartIndex).rightJustified(8, '0'));
+ QStringList aCommands;
+ QString aSeparator;
+ for (int j = aStartIndex+1; j < anEndIndex; j++) {
+ QString aFile = aFFile.arg(QString::number(j).rightJustified(8, '0'));
+#ifndef WIN32
+ aCommands.append(QString("ln -s %1 %2").arg(aCurFile).arg(aFile));
+ aSeparator = QString(" ; \\\n");
+#else
+ aCommands.append(QString("COPY /Y %1 %2 > NUL").arg(QString(aCurFile).replace("/","\\\\")).arg(QString(aFile).replace("/","\\\\")));
+ aSeparator = QString(" & ");
+#endif
+ }
+ system(aCommands.join(aSeparator).toLatin1().data());
+ aStartIndex = anEndIndex;
}
}
// make AVI file
- QString aPattern = aDirPath + QDir::separator() + aBaseName;
+ QString aPattern = aDirPath + "/" + aBaseName;
aPattern += "_\%08d.jpeg";
QString aCmd = myAVIMaker;
aCmd += QString(" -f %1").arg(aFPS);
// aCmd += QString(" -n %1").arg(aNbFiles);
aCmd += QString(" -n %1").arg(myFileIndex+1);
- aCmd += QString(" -j %1").arg(aPattern);
+ aCmd += QString(" -j \"%1\"").arg(aPattern);
aCmd += " | yuv2lav";
- aCmd += QString(" -o %1").arg(myDumpPath);
+ aCmd += QString(" -o \"%1\"").arg(myDumpPath);
+ #ifdef WIN32
+ aCmd += " -f aA";
+ #endif
system(aCmd.toLatin1().data());
// remove temporary jpeg files
+#ifndef WIN32
aCmd = "( ";
aCmd += QString("cd %1").arg(aDirPath);
aCmd += "; ls";
aCmd += QString(" | egrep '%1_[0-9]*.jpeg'").arg(aBaseName);
aCmd += " | xargs rm";
aCmd += " )";
+#else
+ QString tmpFile = QString("_") + aBaseName + "_tempfile";
+ QString diskName = aDirPath.split("/")[0];
+ aCmd = diskName + " && (cd " + aDirPath.replace("/","\\\\") +
+ " && ((dir /b | findstr " + aBaseName + "_[0-9]*.jpeg > " + tmpFile +
+ ") & (for /f %i in (" + tmpFile + ") do (del \"%i\")) & (del " + tmpFile + "))) > NUL";
+#endif
system(aCmd.toLatin1().data());
}
ok = false;
int aLeftIndex = aLeftIndexStr.toLong( &ok );
if( !ok )
- continue;
+ continue;
ok = false;
int aRightIndex = aRightIndexStr.toLong( &ok );
if( !ok )
- continue;
+ continue;
if( aLeftIndex >= aRightIndex )
- continue;
+ continue;
for( int i = aLeftIndex; i <= aRightIndex; i++ )
- theIndices.append( i );
+ theIndices.append( i );
isCorrect = true;
}
QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
if (myDumpFormat.isEmpty() ||
(aDumpFormats.indexOf(theFormat) < 0 && myDumpFormat.compare("AVI") != 0)) {
- if (aDumpFormats.indexOf("JPEG"))
+ if (aDumpFormats.indexOf("JPEG") >= 0 ||
+ aDumpFormats.indexOf("jpeg") >= 0)
myDumpFormat = "JPEG";
else
myDumpFormat = aDumpFormats.at(0);
return myDumpFormat.toLatin1().data();
}
+//------------------------------------------------------------------------
+void VISU_TimeAnimation::setTimeStampFrequency(CORBA::Long theFrequency)
+{
+ myTimeStampFrequency = theFrequency;
+}
+
//------------------------------------------------------------------------
bool VISU_TimeAnimation::checkAVIMaker() const
{
QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
- if (aDumpFormats.indexOf("JPEG") < 0) return false;
+ if (aDumpFormats.indexOf("JPEG") < 0 &&
+ aDumpFormats.indexOf("jpeg") < 0)
+ return false;
- QString aCmd("which ");
- aCmd += myAVIMaker;
- aCmd += " >& /dev/null";
+ QString aCmd;
+#ifndef WIN32
+ aCmd = "which " + myAVIMaker + " 2> /dev/null";
+#else
+ aCmd = "setlocal & set P2=.;%PATH% & (for %e in (%PATHEXT%) do @for %i in (" + myAVIMaker + "%e) do @if NOT \"%~$P2:i\"==\"\" exit /b 0) & exit /b 1";
+#endif
int iErr = system(aCmd.toLatin1().data());
return (iErr == 0);
}
case VISU::TCUTLINES:
aPrsCmt = VISU::CutLines_i::myComment;
break;
+ case VISU::TCUTSEGMENT:
+ aPrsCmt = VISU::CutSegment_i::myComment;
+ break;
case VISU::TPLOT3D:
aPrsCmt = VISU::Plot3D_i::myComment;
break;
{
if (myStudy->GetProperties()->IsLocked()) {
SUIT_MessageBox::warning(0,
- QObject::tr("WRN_VISU_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK"));
+ QObject::tr("WRN_VISU_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED"),
+ QObject::tr("BUT_OK"));
return SALOMEDS::SObject::_nil();
}
QString aComment;
aComment.sprintf("myComment=ANIMATION;myTimeMinVal=%g;myTimeMaxVal=%g;mySequence=%s;myMode=%d",
myTimeMinVal,
- myTimeMaxVal,
- mySequence.toLatin1().data(),
- myAnimationMode);
+ myTimeMaxVal,
+ mySequence.toLatin1().data(),
+ myAnimationMode);
string anEntry = VISU::CreateAttributes(myStudy,
- aSComponentEntry.c_str(),
- VISU::NO_ICON,
- VISU::NO_IOR,
+ aSComponentEntry.c_str(),
+ VISU::NO_ICON,
+ VISU::NO_IOR,
GenerateName().toLatin1().data(),
- VISU::NO_PERFSITENT_REF,
- aComment.toLatin1().data(),
- true);
+ VISU::NO_PERFSITENT_REF,
+ aComment.toLatin1().data(),
+ true);
myAnimEntry = anEntry.c_str();
_PTR(SObject) aAnimSObject = myStudy->FindObjectID(anEntry.c_str());
string aPrsComment = strOut.str();
string aPrsMyComment = aData.myPrs[0]->GetComment();
if(aPrsMyComment == "PRSMERGER")
- aPrsMyComment = "SCALARMAP";
+ aPrsMyComment = "SCALARMAP";
VISU::CreateAttributes(myStudy,
- newObj->GetID().c_str(),
- VISU::NO_ICON,
- VISU::NO_IOR,
- aPrsMyComment.c_str(),
- VISU::NO_PERFSITENT_REF,
- aPrsComment.c_str(),
- true);
+ newObj->GetID().c_str(),
+ VISU::NO_ICON,
+ VISU::NO_IOR,
+ aPrsMyComment.c_str(),
+ VISU::NO_PERFSITENT_REF,
+ aPrsComment.c_str(),
+ true);
}
}
aStudyBuilder->CommitCommand();
- return VISU::GetSObject(aAnimSObject);
+ return VISU::GetSObject(aAnimSObject)._retn();
}
//------------------------------------------------------------------------
QString aComment;
aComment.sprintf("myComment=ANIMATION;myTimeMinVal=%g;myTimeMaxVal=%g;mySequence=%s;myMode=%d",
myTimeMinVal,
- myTimeMaxVal,
- mySequence.toLatin1().data(),
- myAnimationMode);
+ myTimeMaxVal,
+ mySequence.toLatin1().data(),
+ myAnimationMode);
_PTR(GenericAttribute) anAttr;
anAttr = aStudyBuilder->FindOrCreateAttribute(aAnimSObject, "AttributeString");
} else {
VISU::CreateAttributes(myStudy,
- aRefObj->GetID().c_str(),
- VISU::NO_ICON,
- VISU::NO_IOR,
+ aRefObj->GetID().c_str(),
+ VISU::NO_ICON,
+ VISU::NO_IOR,
aPrsNameTxt.c_str(),
- VISU::NO_PERFSITENT_REF,
- aPrsComment.c_str(),
- true);
+ VISU::NO_PERFSITENT_REF,
+ aPrsComment.c_str(),
+ true);
}
}
aStudyBuilder->CommitCommand();
aData.myPrsType = VISU::TCUTPLANES;
else if (strName == VISU::CutLines_i::myComment.c_str())
aData.myPrsType = VISU::TCUTLINES;
+ else if (strName == VISU::CutSegment_i::myComment.c_str())
+ aData.myPrsType = VISU::TCUTSEGMENT;
else if (strName == VISU::Plot3D_i::myComment.c_str())
aData.myPrsType = VISU::TPLOT3D;
else if (strName == VISU::DeformedShape_i::myComment.c_str())
}
for (int i = 1; i < aData.myNbFrames; i++) {
if (!aData.myPrs[0])
- continue;
+ continue;
bool anIsFixedRange = false;
if (aData.myPrsType != VISU::TGAUSSPOINTS) {
- if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(aData.myPrs[i]))
- anIsFixedRange = aPrs->IsRangeFixed();
+ if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(aData.myPrs[i]))
+ anIsFixedRange = aPrs->IsRangeFixed();
}
if (aData.myPrsType == VISU::TDEFORMEDSHAPEANDSCALARMAP) {
- if (VISU::DeformedShapeAndScalarMap_i* aDeformedPrs =
- dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>(aData.myPrs[i])) {
- //Set correct time stamp number
- int aTimeStampNum = aDeformedPrs->GetScalarTimeStampNumber();
- aDeformedPrs->SameAs(aData.myPrs[0]);
- aDeformedPrs->SetScalarField(aDeformedPrs->GetScalarEntity(),
- aDeformedPrs->GetScalarFieldName(),
- aTimeStampNum);
- }
+ if (VISU::DeformedShapeAndScalarMap_i* aDeformedPrs =
+ dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>(aData.myPrs[i])) {
+ //Set correct time stamp number
+ int aTimeStampNum = aDeformedPrs->GetScalarTimeStampNumber();
+ aDeformedPrs->SameAs(aData.myPrs[0]);
+ aDeformedPrs->SetScalarField(aDeformedPrs->GetScalarEntity(),
+ aDeformedPrs->GetScalarFieldName(),
+ aTimeStampNum);
+ }
}
else
- aData.myPrs[i]->SameAs(aData.myPrs[0]);
+ aData.myPrs[i]->SameAs(aData.myPrs[0]);
}
}
string aStr = aAnimSObject->GetID();
if ( !aPrs_i )
THROW_SALOME_CORBA_EXCEPTION("Error : invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i",
- SALOME::INTERNAL_ERROR);
+ SALOME::INTERNAL_ERROR);
if ( myAnimationMode == VISU::Animation::PARALLEL ) { // parallel animation mode
FieldData& aData = myFieldsLst[theFieldNum];
if ( aData.myPrs.empty() )
THROW_SALOME_CORBA_EXCEPTION("Error : presentations for the given field is not yet created!",
- SALOME::INTERNAL_ERROR);
+ SALOME::INTERNAL_ERROR);
if ( aPrs_i->GetCResult() != aData.myPrs[0]->GetCResult() )
THROW_SALOME_CORBA_EXCEPTION("Error : the MED file is not the same!",
- SALOME::INTERNAL_ERROR);
+ SALOME::INTERNAL_ERROR);
for (int i = 0; i < aData.myNbFrames; i++) {
bool anIsFixedRange = false;
if (aData.myPrsType != VISU::TGAUSSPOINTS) {
- if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(aData.myPrs[i]))
- anIsFixedRange = aPrs->IsRangeFixed();
+ if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(aData.myPrs[i]))
+ anIsFixedRange = aPrs->IsRangeFixed();
}
aData.myPrs[i]->SameAs(aPrs_i);
}
FieldData& aData = myFieldsLst[f];
if ( aData.myPrs.empty() )
- THROW_SALOME_CORBA_EXCEPTION("Error : presentations for the given field is not yet created!",
- SALOME::INTERNAL_ERROR);
+ THROW_SALOME_CORBA_EXCEPTION("Error : presentations for the given field is not yet created!",
+ SALOME::INTERNAL_ERROR);
for (int i = 0; i < aData.myNbFrames; i++) {
- aData.myPrs[i]->SameAs(aPrs_i);
+ aData.myPrs[i]->SameAs(aPrs_i);
}
}
}
return CORBA::string_dup(aDumpFormat.c_str());
}
+void VISU_TimeAnimation_i::setTimeStampFrequency(CORBA::Long theFrequency)
+{
+ myAnim->setTimeStampFrequency(theFrequency);
+}
+
+CORBA::Long VISU_TimeAnimation_i::getTimeStampFrequency()
+{
+ return myAnim->getTimeStampFrequency();
+}
+
CORBA::Boolean VISU_TimeAnimation_i::isCycling()
{
return myAnim->isCycling();