msgid "VISU_LINEAR_SWEEP"
msgstr "Linear"
-msgid "VISU_U_SWEEP"
-msgstr "Cosinusoidal"
+msgid "VISU_COS_SWEEP"
+msgstr "Cosinusoidal ( (1 - cos(t))/2 )"
+
+msgid "VISU_SIN_SWEEP"
+msgstr "Sinusoidal ( sin( t - PI/2 ) )"
msgid "VISU_SWEEPING_MODES"
msgstr "Mode of the sweeping "
for (int i = 0; i <= aSteps; i++) {
try {
float aPercents;
- if( aMode == 1 ){ //if selected Periodic mode of sweeping
- float aT = ( is2Pi == 1 ? -PI + 2. * PI * float(i)/aSteps : PI * float(i)/aSteps );
- //This is necessary in order for animation to retrun to the initial picture
+ float aT;
+ if( aMode >= 1 )
+ aT = ( is2Pi == 1 ? -PI + 2. * PI * float(i)/aSteps : PI * float(i)/aSteps );
+ if( aMode == 1 ){ //if selected Periodic cosinusoidal mode of sweeping
+ //This is necessary in order for animation to return to the initial picture
aPercents = (1.-cos( aT ))/2.;
}
+ else if( aMode == 2 ){ //if selected Periodic sinusoidal mode of sweeping
+ //This is necessary in order for animation to return to the initial picture
+ aPercents = sin( aT - PI/2 );
+ }
else //if selected Linear mode of sweeping
aPercents = float(i)/aSteps;
aPrsObject->SetMapScale(aPercents);
int modeSw = addPreference( tr( "VISU_SWEEPING_MODES" ), sweepGr, LightApp_Preferences::Selector, "VISU", "sweeping_modes" );
QStringList sweep_modes;
sweep_modes.append( tr( "VISU_LINEAR_SWEEP" ) );
- sweep_modes.append( tr( "VISU_U_SWEEP" ) );
+ sweep_modes.append( tr( "VISU_COS_SWEEP" ) );
+ sweep_modes.append( tr( "VISU_SIN_SWEEP" ) );
indices.clear();
indices.append( 0 );
indices.append( 1 );
+ indices.append( 2 );
setPreferenceProperty( modeSw, "strings", sweep_modes );
setPreferenceProperty( modeSw, "indexes", indices );