19 |
|
|
20 |
# 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. |
21 |
# 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. |
22 |
# If no scalar field is specified, the first encountered in the file will |
# If no lut is specified, the color scheme will be used. |
23 |
# be loaded automatically. If no lut is specified, the color scheme will |
def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST, |
24 |
# be used. |
lut = Lut.COLOR, outline = True): |
|
def __init__(self, scene, data_collector, scalar = None, |
|
|
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True): |
|
25 |
""" |
""" |
26 |
@type scene: L{Scene <scene.Scene>} object |
@type scene: L{Scene <scene.Scene>} object |
27 |
@param scene: Scene in which objects are to be rendered on |
@param scene: Scene in which objects are to be rendered on |
28 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
29 |
object |
object |
30 |
@param data_collector: Deal with source of data for visualisation |
@param data_collector: Deal with source of data for visualisation |
|
@type scalar: String |
|
|
@param scalar: Scalar field to load from the source file |
|
31 |
@type viewport: L{Viewport <constant.Viewport>} constant |
@type viewport: L{Viewport <constant.Viewport>} constant |
32 |
@param viewport: Viewport in which objects are to be rendered on |
@param viewport: Viewport in which objects are to be rendered on |
33 |
@type lut : L{Lut <constant.Lut>} constant |
@type lut : L{Lut <constant.Lut>} constant |
61 |
|
|
62 |
# ----- Contour ----- |
# ----- Contour ----- |
63 |
|
|
|
#if(scalar != None): # True only if a scalar field was specified. |
|
|
# pass |
|
|
#data_collector._setActiveScalar(scalar) |
|
|
|
|
|
lookup_table = LookupTable() |
|
|
|
|
64 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
65 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
66 |
# will take place. |
# will take place. |
104 |
|
|
105 |
# 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. |
106 |
# 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. |
107 |
# If no scalar field is specified, the first encountered in the file will |
# If no lut is specified, the color scheme will be used. |
108 |
# be loaded automatically. If no lut is specified, the color scheme will |
def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST, |
109 |
# be used. |
lut = Lut.COLOR, outline = True): |
|
def __init__(self, scene, data_collector, scalar = None, |
|
|
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True): |
|
110 |
|
|
111 |
""" |
""" |
112 |
@type scene: L{Scene <scene.Scene>} object |
@type scene: L{Scene <scene.Scene>} object |
114 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
115 |
object |
object |
116 |
@param data_collector: Deal with source of data for visualisation |
@param data_collector: Deal with source of data for visualisation |
|
@type scalar: String |
|
|
@param scalar: Scalar field to load from the source file |
|
117 |
@type viewport: L{Viewport <constant.Viewport>} constant |
@type viewport: L{Viewport <constant.Viewport>} constant |
118 |
@param viewport: Viewport in which objects are to be rendered on |
@param viewport: Viewport in which objects are to be rendered on |
119 |
@type lut : L{Lut <constant.Lut>} constant |
@type lut : L{Lut <constant.Lut>} constant |
147 |
|
|
148 |
# ----- Contour on a cut plane ----- |
# ----- Contour on a cut plane ----- |
149 |
|
|
|
#if(scalar != None): |
|
|
# data_collector._setActiveScalar(scalar) |
|
|
|
|
150 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
151 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
152 |
# will take place. |
# will take place. |
193 |
|
|
194 |
# 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. |
195 |
# 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. |
196 |
# If no scalar field is specified, the first encountered in the file will |
# If no lut is specified, the color scheme will be used. |
197 |
# be loaded automatically. If no lut is specified, the color scheme will |
def __init__(self, scene, data_collector, viewport = Viewport.SOUTH_WEST, |
198 |
# be used. |
lut = Lut.COLOR, outline = True): |
|
def __init__(self, scene, data_collector, scalar = None, |
|
|
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True): |
|
199 |
|
|
200 |
""" |
""" |
201 |
@type scene: L{Scene <scene.Scene>} object |
@type scene: L{Scene <scene.Scene>} object |
203 |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
@type data_collector: L{DataCollector <datacollector.DataCollector>} |
204 |
object |
object |
205 |
@param data_collector: Deal with source of data for visualisation |
@param data_collector: Deal with source of data for visualisation |
|
@type scalar: String |
|
|
@param scalar: Scalar field to load from the source file |
|
206 |
@type viewport: L{Viewport <constant.Viewport>} constant |
@type viewport: L{Viewport <constant.Viewport>} constant |
207 |
@param viewport: Viewport in which objects are to be rendered on |
@param viewport: Viewport in which objects are to be rendered on |
208 |
@type lut : L{Lut <constant.Lut>} constant |
@type lut : L{Lut <constant.Lut>} constant |
236 |
|
|
237 |
# ----- Contour on a clipped plane ----- |
# ----- Contour on a clipped plane ----- |
238 |
|
|
|
#if(scalar != None): |
|
|
# data_collector._setActiveScalar(scalar) |
|
|
|
|
239 |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
# NOTE: Lookup table color mapping (color or grey scale) MUST be set |
240 |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
# before DataSetMapper. If it is done after DataSetMapper, no effect |
241 |
# will take place. |
# will take place. |