Package esys :: Package pyvisi :: Module carpet :: Class Carpet
[hide private]
[frames] | no frames]

Class Carpet

mapper.DataSetMapper --+
                       |
       actor.Actor3D --+
                       |
           warp.Warp --+
                       |
 transform.Transform --+
                       |
         plane.Plane --+
                       |
       cutter.Cutter --+
                       |
                      Carpet

Class that shows a scalar field on a plane deformated along the normal.

Instance Methods [hide private]
 
__init__(self, scene, data_collector, viewport=0, warp_mode='scalar', lut='color', cell_to_point=False, outline=True)
Initialise the Carpet.
Boolean
_isModified(self)
Return whether the Carpet or DataCollector has been modified.
 
_render(self, scene)
Render the carpet.

Inherited from mapper.DataSetMapper: setScalarRange

Inherited from actor.Actor3D: setColor, setOpacity, setRepresentationToWireframe

Inherited from warp.Warp: setScaleFactor

Inherited from warp.Warp (private): _getWarpOutput, _setupWarp

Inherited from transform.Transform: rotateX, rotateY, rotateZ, setPlaneToXY, setPlaneToXZ, setPlaneToYZ, translate

Inherited from transform.Transform (private): _getTransform

Inherited from plane.Plane (private): _getPlane, _setupPlane

Inherited from cutter.Cutter (private): _getCutterOutput, _setupCutter

Method Details [hide private]

__init__(self, scene, data_collector, viewport=0, warp_mode='scalar', lut='color', cell_to_point=False, outline=True)
(Constructor)

 

Initialise the Carpet.

Parameters:
  • scene (Scene object) - Scene in which objects are to be rendered on
  • data_collector (DataCollector object) - Deal with source of data for visualisation
  • viewport (Viewport constant) - Viewport in which objects are to be rendered on
  • warp_mode (Mode in which to deform the scalar field) - WarpMode constant
  • 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: cutter.Cutter.__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.
  • When 3D data is used, a cut will be performed on the scalar field using a plane before deformation occurs on the plane. However, if 2D data is used a cut will NOT be performed and deformation will instead occur immediately on the scalar field. Pyvisi distinguishes 2D from 3D data by retrieving the length of the z-axis. A 2D data is assumed to have a z-axis length of zero while a 3D data is assumed to have a z-axis length of non-zero. There are exceptions to these rules where some 2D data may have a non-zero z-axis length. However, such exceptions are not taken into account at this stage.

_isModified(self)

 

Return whether the Carpet or DataCollector has been modified.

Returns: Boolean
True or False

_render(self, scene)

 

Render the carpet.

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