Package esys :: Package pyvisi :: Module velocity :: Class Velocity
[hide private]
[frames] | no frames]

Class Velocity

mapper.DataSetMapper --+
                       |
       actor.Actor3D --+
                       |
       arrow.Arrow2D --+
                       |
       arrow.Arrow3D --+
                       |
       glyph.Glyph3D --+
                       |
    point.MaskPoints --+
                       |
                      Velocity

Class that shows a vector field using arrows. The arrows can either be colored or grey-scaled, depending on the lookup table used. If the arrows are colored, there are two possible coloring modes, either using vector data or scalar data. Similarly, there are two possible types of arrows, either using two-dimensional or three-dimensional.

Instance Methods [hide private]
 
__init__(self, scene, data_collector, arrow='2d', color_mode='vector', viewport=0, lut='color', cell_to_point=False, outline=True)
Initialise the Velocity.
Boolean
_isModified(self)
Return whether the Velocity or DataCollector has been modified.
 
_render(self, scene)
Render the velocity.

Inherited from mapper.DataSetMapper: setScalarRange

Inherited from actor.Actor3D: setColor, setOpacity, setRepresentationToWireframe

Inherited from arrow.Arrow2D (private): _getArrow2DOutput

Inherited from arrow.Arrow3D (private): _getArrow3DOutput

Inherited from glyph.Glyph3D: setScaleFactor, setScaleModeByScalar, setScaleModeByVector

Inherited from point.MaskPoints: randomOff, randomOn, setRatio

Method Details [hide private]

__init__(self, scene, data_collector, arrow='2d', color_mode='vector', viewport=0, lut='color', cell_to_point=False, outline=True)
(Constructor)

 

Initialise the Velocity.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on
  • data_collector (DataCollector object) - Deal with source of data for visualisation
  • arrow (Arrow constant) - Type of arrow (two dimensional or three dimensional)
  • color_mode (ColorMode constant) - Type of color mode
  • viewport (Viewport constant) - Viewport in which objects are to be rendered on
  • lut (Lut constant) - Lookup table color scheme
  • cell_to_point (Boolean) - Converts cell data to point data (by averaging)
  • outline (Boolean) - Places an outline around the domain surface
Overrides: point.MaskPoints.__init__

Attention: The source can either be point or cell data. If the source is cell data, a conversion to point data may or may not be required, in order for the object to be rendered correctly. If a conversion is needed, the 'cell_to_point' flag must be set to 'True', otherwise 'False' (which is the default). On occasions, an inaccurate object may be rendered from cell data even after conversion.

_isModified(self)

 

Return whether the Velocity or DataCollector has been modified.

Returns: Boolean
True or False

_render(self, scene)

 

Render the velocity.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on