23 |
|
|
24 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
25 |
# This saves the user from specifying the viewport when there is only one. |
# This saves the user from specifying the viewport when there is only one. |
26 |
# If no vector field is specified, the first encountered in the file will |
# If no lut is specified, the color scheme will be used. |
27 |
# be loaded automatically. If no lut is specified, the color scheme will |
def __init__(self, scene, data_collector, arrow = Arrow.TWO_D, |
28 |
# be used. |
color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST, |
29 |
def __init__(self, scene, data_collector, vector = None, scalar = None, |
lut = Lut.COLOR, outline = True): |
|
arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR, |
|
|
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True): |
|
|
|
|
30 |
""" |
""" |
31 |
@type scene: L{Scene <scene.Scene>} object |
@type scene: L{Scene <scene.Scene>} object |
32 |
@param scene: Scene in which objects are to be rendered on |
@param scene: Scene in which objects are to be rendered on |
33 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
34 |
object |
object |
35 |
@param data_collector: Deal with source of data for visualisation |
@param data_collector: Deal with source of data for visualisation |
|
@type vector: String |
|
|
@param vector: Vector field to load from the source file |
|
|
@type scalar: String |
|
|
@param scalar: Scalar field to load from the source file |
|
36 |
@type arrow: L{Arrow <constant.Arrow>} constant |
@type arrow: L{Arrow <constant.Arrow>} constant |
37 |
@param arrow: Type of arrow (two dimensional or three dimensional) |
@param arrow: Type of arrow (two dimensional or three dimensional) |
38 |
@type color_mode: L{ColorMode <constant.ColorMode>} constant |
@type color_mode: L{ColorMode <constant.ColorMode>} constant |
70 |
|
|
71 |
# ----- Velocity ----- |
# ----- Velocity ----- |
72 |
|
|
|
# NOTE: Two 'ifs' were used instead of an if-elif because an active |
|
|
# scalar and an active vector attribute may be specified at the same |
|
|
# time. One may be for the color mode and the other for the |
|
|
# scaling mode. |
|
|
if(vector != None): |
|
|
data_collector._setActiveVector(vector) |
|
|
if(scalar != None): |
|
|
data_collector._setActiveScalar(scalar) |
|
|
|
|
73 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
74 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
75 |
# will take place. |
# will take place. |
129 |
|
|
130 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
131 |
# This saves the user from specifying the viewport when there is only one. |
# This saves the user from specifying the viewport when there is only one. |
132 |
# If no vector field is specified, the first encountered in the file will |
# If no lut is specified, the color scheme willbe used. |
133 |
# be loaded automatically. If no lut is specified, the color scheme will |
def __init__(self, scene, data_collector, arrow = Arrow.TWO_D, |
134 |
# be used. |
color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST, |
135 |
def __init__(self, scene, data_collector, vector = None, scalar = None, |
lut = Lut.COLOR, outline = True): |
|
arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR, |
|
|
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True): |
|
136 |
""" |
""" |
137 |
@type scene: L{Scene <scene.Scene>} object |
@type scene: L{Scene <scene.Scene>} object |
138 |
@param scene: Scene in which objects are to be rendered on |
@param scene: Scene in which objects are to be rendered on |
139 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
140 |
object |
object |
141 |
@param data_collector: Deal with source of data for visualisation |
@param data_collector: Deal with source of data for visualisation |
|
@type vector: String |
|
|
@param vector: Vector field to load from the source file |
|
|
@type scalar: String |
|
|
@param scalar: Scalar field to load from the source file |
|
142 |
@type arrow: L{Arrow <constant.Arrow>} constant |
@type arrow: L{Arrow <constant.Arrow>} constant |
143 |
@param arrow: Type of arrow (two dimensional or three dimensional) |
@param arrow: Type of arrow (two dimensional or three dimensional) |
144 |
@type color_mode: L{ColorMode <constant.ColorMode>} constant |
@type color_mode: L{ColorMode <constant.ColorMode>} constant |
176 |
|
|
177 |
# ----- Velocity on a cut plane ----- |
# ----- Velocity on a cut plane ----- |
178 |
|
|
|
# NOTE: Two 'ifs' were used instead of an if-elif because an active |
|
|
# scalar and an active vector attribute may be specified at the same |
|
|
# time. One may be for the color mode and the other for the |
|
|
# scaling mode. |
|
|
if(vector != None): |
|
|
data_collector._setActiveVector(vector) |
|
|
if(scalar != None): |
|
|
data_collector._setActiveScalar(scalar) |
|
|
|
|
179 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
180 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
181 |
# will take place. |
# will take place. |
239 |
|
|
240 |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
# The SOUTH_WEST default viewport is used when there is only one viewport. |
241 |
# This saves the user from specifying the viewport when there is only one. |
# This saves the user from specifying the viewport when there is only one. |
242 |
# If no vector field is specified, the first encountered in the file will |
# If no lut is specified, the color scheme will be used. |
243 |
# be loaded automatically. If no lut is specified, the color scheme will |
def __init__(self, scene, data_collector, arrow = Arrow.TWO_D, |
244 |
# be used. |
color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST, |
245 |
def __init__(self, scene, data_collector, vector = None, scalar = None, |
lut = Lut.COLOR, outline = True): |
|
arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR, |
|
|
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True): |
|
246 |
""" |
""" |
247 |
@type scene: L{Scene <scene.Scene>} object |
@type scene: L{Scene <scene.Scene>} object |
248 |
@param scene: Scene in which objects are to be rendered on |
@param scene: Scene in which objects are to be rendered on |
249 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
250 |
object |
object |
251 |
@param data_collector: Deal with source of data for visualisation |
@param data_collector: Deal with source of data for visualisation |
|
@type vector: String |
|
|
@param vector: Vector field to load from the source file |
|
|
@type scalar: String |
|
|
@param scalar: Scalar field to load from the source file |
|
252 |
@type arrow: L{Arrow <constant.Arrow>} constant |
@type arrow: L{Arrow <constant.Arrow>} constant |
253 |
@param arrow: Type of arrow (two dimensional or three dimensional) |
@param arrow: Type of arrow (two dimensional or three dimensional) |
254 |
@type color_mode: L{ColorMode <constant.ColorMode>} constant |
@type color_mode: L{ColorMode <constant.ColorMode>} constant |
286 |
|
|
287 |
# ----- Velocity on a clipped plane ----- |
# ----- Velocity on a clipped plane ----- |
288 |
|
|
|
# NOTE: Two 'ifs' were used instead of an if-elif because an active |
|
|
# scalar and an active vector attribute may be specified at the same |
|
|
# time. One may be for the color mode and the other for the |
|
|
# scaling mode. |
|
|
if(vector != None): |
|
|
data_collector._setActiveVector(vector) |
|
|
if(scalar != None): |
|
|
data_collector._setActiveScalar(scalar) |
|
|
|
|
289 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
290 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
291 |
# will take place. |
# will take place. |