SALOME documentation central

VISU.Animation Interface Reference

Animation class More...

import "VISU_Gen.idl";

Inheritance diagram for VISU.Animation:
Inheritance graph

Public Types

enum  AnimationMode { PARALLEL, SUCCESSIVE }

Public Member Functions

boolean addField (in SALOMEDS::SObject theObject)
void clearFields ()
void generatePresentations (in long theFieldNum)
boolean generateFrames ()
void clearView ()
long getNbFields ()
long getNbFrames ()
boolean isRunning ()
long getCurrentFrame ()
ColoredPrs3d getPresentation (in long theField, in long theFrame)
void setPresentationType (in long theFieldNum, in VISUType theType)
VISUType getPresentationType (in long theFieldNum)
void setSpeed (in long theSpeed)
long getSpeed ()
boolean isProportional ()
void setAnimationRange (in double theMin, in double theMax)
double getMinRange ()
double getMaxRange ()
boolean isRangeDefined ()
void setAnimationSequence (in string theSequence)
string getAnimationSequence ()
boolean isSequenceDefined ()
void dumpTo (in string thePath)
string setDumpFormat (in string theFormat)
boolean isCycling ()
double getMinTime ()
double getMaxTime ()
void setProportional (in boolean theProp)
void setCycling (in boolean theCycle)
boolean isCleaningMemoryAtEachFrame ()
void setCleaningMemoryAtEachFrame (in boolean theCycle)
SALOMEDS::SObject publishInStudy ()
void saveAnimation ()
void restoreFromStudy (in SALOMEDS::SObject theSObj)
boolean isSavedInStudy ()
void setAnimationMode (in AnimationMode theMode)
AnimationMode getAnimationMode ()
void ApplyProperties (in long theFieldNum, in ColoredPrs3d thePrs) raises (SALOME::SALOME_Exception)
IdType GetID ()
VISUType GetType ()
Playback of an animation:

void startAnimation ()
void stopAnimation ()
void nextFrame ()
void prevFrame ()
void firstFrame ()
void lastFrame ()
void gotoFrame (in long theFrame)

Detailed Description

This class provides a set of methods used for:

Note:

Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept.
Time stamp represents a subfield: the results of calculations are taken in one definite moment.

Member Enumeration Documentation

This enumeration contains a set of available animation modes.

Enumerator:
PARALLEL 

parallel mode of animation.

SUCCESSIVE 

succcessive mode of animation.


Member Function Documentation

boolean VISU.Animation.addField ( in SALOMEDS::SObject  theObject  ) 

Defines the field which will be used as a base for generation of the animation.

Parameters:
theObject The SObject corresponding to the field.
void VISU.Animation.clearFields (  ) 

Remove all fields from Animation object.

void VISU.Animation.generatePresentations ( in long  theFieldNum  ) 

Generates presentations on the basis of the field.

Parameters:
theFieldNum The number of the field, which will be used as the basis for construction of the presentation.
boolean VISU.Animation.generateFrames (  ) 

Generates a set of frames from the created by the method generatePresentations3D presentations. A sequence of these frames will be transformed into an animation.

Returns:
True, if the frames have been successfully generated.
void VISU.Animation.clearView (  ) 

Clears the view before starting an animation.

void VISU.Animation.startAnimation (  ) 

Starts an animation.

void VISU.Animation.stopAnimation (  ) 

Stops an animation.

void VISU.Animation.nextFrame (  ) 

Forwards to the next frame.

void VISU.Animation.prevFrame (  ) 

Returns to the previous frame.

void VISU.Animation.firstFrame (  ) 

Returns to the first frame of the animation.

void VISU.Animation.lastFrame (  ) 

Forwards to the last frame of the animation.

void VISU.Animation.gotoFrame ( in long  theFrame  ) 

Passes to a definite frame of the animation.

Parameters:
theFrame A long value defining the number of the frame.
long VISU.Animation.getNbFields (  ) 

Gets the number of time stamps (subfields) contained in the given field.

long VISU.Animation.getNbFrames (  ) 

Gets the number of generated frames

boolean VISU.Animation.isRunning (  ) 

Returns True, if the animation is currently running.

long VISU.Animation.getCurrentFrame (  ) 

Returns the number of the current frame.

ColoredPrs3d VISU.Animation.getPresentation ( in long  theField,
in long  theFrame 
)
void VISU.Animation.setPresentationType ( in long  theFieldNum,
in VISUType  theType 
)

Sets the type of presentation (vectors, deformed shape etc.) which will be generated by the method generatePresentations.

Note:
addField() method should be called before in order to add field with number theFieldNum.
VISUType VISU.Animation.getPresentationType ( in long  theFieldNum  ) 

Gets the type of presentation (vectors, deformed shape etc.) which will be generated by the method generatePresentations.

Note:
addField() method should be called before in order to add field with number theFieldNum.
void VISU.Animation.setSpeed ( in long  theSpeed  ) 

Sets the speed of the animation.

Parameters:
theSpeed The speed of the animation. The value varies from 1 to 99.
long VISU.Animation.getSpeed (  ) 

Gets the speed of the animation.

boolean VISU.Animation.isProportional (  ) 

Ruturns True, if playback of the animation is proportional. This option allows to render your animation with proportional periods of time between every frame (not depending on the time stamps).

void VISU.Animation.setAnimationRange ( in double  theMin,
in double  theMax 
)

Sets the range of the animation. The range is defined on the basis of the time stamps of the field which have been used for generation of the animation. This method allows to bound the range of generated frames. If this method is not used, the animation will be generated on the basis of all time stamps contained in the field.

Parameters:
theMin The value of the first time stamp which will be used for generation of the animation.
theMax The value of the last time stamp which will be used for generation of the animation.
double VISU.Animation.getMinRange (  ) 

Gets the number of the first time stamp which will be used for generation of the animation.

double VISU.Animation.getMaxRange (  ) 

Gets the number of the last time stamp which will be used for generation of the animation.

boolean VISU.Animation.isRangeDefined (  ) 

Returns True if the range of the animation has been defined by the method setAnimationRange. Otherwise the animation will be generated on the basis of all time stamps contained in the field.

void VISU.Animation.setAnimationSequence ( in string  theSequence  ) 

Sets the sequence of the animation. The sequence is defined on the basis of the time stamps of the field which have been used for generation of the animation. This method allows to set the sequence of generated frames. If this method is not used, the animation will be generated on the basis of all time stamps contained in the field. Format of the sequence: '1,9,2-5,7-8'

Parameters:
theSequence The sequence of time stamps indices which will be used for generation of the animation.
string VISU.Animation.getAnimationSequence (  ) 

Gets the animation sequence.

boolean VISU.Animation.isSequenceDefined (  ) 

Returns True if the sequence of the animation has been defined by the method setAnimationSequence. Otherwise the animation will be generated on the basis of all time stamps contained in the field.

void VISU.Animation.dumpTo ( in string  thePath  ) 

Saves all the frames composing the animation into a definite directory. Pictures format is set with method setDumpFormat().

Parameters:
thePath The directory where all the frames will be saved.
string VISU.Animation.setDumpFormat ( in string  theFormat  ) 

Set format for saving all the frames composing the animation.

Parameters:
theFormat The format for saving pictures. For available formats see QImageIO documentation (Qt). If specified format is not available, default format will be used. Default format is JPEG or first of supported, if JPEG is not available.
Returns:
Really set format. Differ from theFormat if theFormat is not available.
boolean VISU.Animation.isCycling (  ) 

Returns True, if the playback of the animation is cycling.

double VISU.Animation.getMinTime (  ) 

Gets the first time stamp of the field defined at the input of the animation.

Note:
This method is used if animation range is NOT defined.
double VISU.Animation.getMaxTime (  ) 

Gets the last time stamp of the field defined at the input of the animation.

Note:
This method is used if animation range is NOT defined.
void VISU.Animation.setProportional ( in boolean  theProp  ) 

Sets proprtional playback of the animation. This option allows to render your animation with proportional periods of time between every frame (not depending on the time stamps).

Parameters:
theProp If this boolean parameter is True, playback of your animation will be set as proportional.
void VISU.Animation.setCycling ( in boolean  theCycle  ) 

Sets cycling playback of the animation. The number of cycles can be infinite, untill you use startAnimation method.

Parameters:
theCycle If this boolean parameter is True, playback of your animation will be set as cycling.
boolean VISU.Animation.isCleaningMemoryAtEachFrame (  ) 
void VISU.Animation.setCleaningMemoryAtEachFrame ( in boolean  theCycle  ) 
SALOMEDS::SObject VISU.Animation.publishInStudy (  ) 
void VISU.Animation.saveAnimation (  ) 
void VISU.Animation.restoreFromStudy ( in SALOMEDS::SObject  theSObj  ) 
boolean VISU.Animation.isSavedInStudy (  ) 
void VISU.Animation.setAnimationMode ( in AnimationMode  theMode  ) 

Sets the animation mode.

Parameters:
theMode The value of this parameter is taken from the AnimationMode enumeration.
AnimationMode VISU.Animation.getAnimationMode (  ) 

Gets the animation mode.

void VISU.Animation.ApplyProperties ( in long  theFieldNum,
in ColoredPrs3d  thePrs 
) raises (SALOME::SALOME_Exception)

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.

IdType VISU.Base.GetID (  )  [inherited]

Returns ID of the object.

VISUType VISU.Base.GetType (  )  [inherited]

Returns the type of the presentable object

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator

Copyright © 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS