/[escript]/trunk/doc/user/pyvisi.tex
ViewVC logotype

Annotation of /trunk/doc/user/pyvisi.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 882 - (hide annotations)
Fri Oct 27 08:15:33 2006 UTC (13 years, 3 months ago) by jongui
File MIME type: application/x-tex
File size: 19736 byte(s)
Fixed some bugs in the camera module but yet to fix bugs in the plane module.

1 gross 606 \chapter{The module \pyvisi}
2 jongui 879 \label{PYVISI CHAP}
3    
4 gross 606 \declaremodule{extension}{pyvisi}
5 jongui 879 \modulesynopsis{Python visualization interface}
6 gross 606
7 jongui 879 \pyvisi provides an easy to use interface to the \VTK visualization
8     tool. The module provides the following features:
9 gross 606
10 jongui 879 \begin{itemize}
11     \item \Scene: Shows a scene in which components are to be displayed.
12     \item \DataCollector: Deals with data for visualization.
13     \item \Camera: Controls the camera manipulation.
14     \item \Map: Shows a scalar field by color on the domain surface.
15     \item \MapOnPlane: Shows a scalar field by color on a given plane.
16     \item \MapOnClip: Shows a scalar field by color on a given clip.
17     \item \Arrows: Shows a vector field by arrows.
18     \item \ArrowsOnPlane: Shows a vector field by arrows on a given plane.
19     \item \ArrowsOnClip: Shows a vector field by arrows on a given clip.
20     \item \IsoSurface: Shows a scalar field for a given value by
21     an isosurface.
22     \item \IsoSurfaceOnPlane: Shows a scalar field for a given value by
23     an isosurfaceon a given plane.
24     \item \IsoSurfaceOnClip: Shows a scalar field for a given vlaue by
25     an isosurface on a given clip.
26     \item \Contour: Shows a scalar field by contour surfaces.
27     \item \ContourOnPlane: Shows a scalar field by contour surfaces on
28     a given plane.
29     \item \ContourOnClip: Shows a scalar field by contour surfaces on
30     a given clip.
31     \item \TensorC: Shows a tensor field by ellipsoids.
32     \item \TensorOnPlane: Shows a tensor field by ellipsoids on
33     a given plane.
34     \item \TensorOnClip: Shows a tensor field by ellipsoids on a given clip.
35     \item \StreamLines: Shows the path of particles in a vector field.
36     \item \Carpet: Shows a scalar field as plane deformated along
37     the plane normal.
38     \item \Image: Shows an image.
39     \item \Text: Shows some 2D text.
40     \item \Position: Defines the x,y and z coordinates rendered object.
41     \item \Transform: Defines the orientation of rendered object.
42     \item \Style: Defines the style of text.
43     \item \BlueToRed: Defines a map spectrum from blue to red.
44     \item \RedToBlue: Defines a map spectrum from red to blue.
45     \end{itemize}
46 gross 606
47 jongui 879 \section{\Scene class}
48     \begin{classdesc}{Scene}{renderer, x_size = 500, y_size = 500}
49     A \Scene object creates a window onto which objects are to be displayed.
50     \end{classdesc}
51 gross 606
52 jongui 879 The following are the methods available:
53     \begin{methoddesc}[Scene]{saveImage}{image_name}
54     Save the rendered object as an image off-screen.
55     \end{methoddesc}
56 gross 606
57 jongui 879 \begin{methoddesc}[Scene]{render}{}
58     Render the object on-screen.
59     \end{methoddesc}
60 gross 606
61 jongui 879 The following is a sample code using the \Scene class:
62     \verbatiminput{../examples/driverscene.py}
63 gross 606
64 jongui 879 \section{\DataCollector class}
65     \begin{classdesc}{DataCollector}{scene, outline = True, cube_axes = False}
66     A \DataCollector object deals with the data for visualization.
67     \end{classdesc}
68 gross 606
69 jongui 879 The following are the methods available:
70     \begin{methoddesc}[DataCollector]{setFileName}{file_name}
71     Set the file name from which data is to be read.
72     \end{methoddesc}
73 gross 606
74 jongui 879 The following is a sample code using the \DataCollector class.
75     \fig{fig:datacollector.1} shows the corresponding output.
76     \verbatiminput{../examples/driverdatacollector.py}
77 gross 606
78 jongui 879 \begin{figure}[ht]
79     \begin{center}
80     \includegraphics[width=40mm]{figures/DataCollector}
81     \end{center}
82     \caption{Datacollector generating an outline with cube axes.}
83     \label{fig:datacollector.1}
84     \end{figure}
85 gross 606
86 jongui 879 \section{\Camera class}
87     \begin{classdesc}{Camera}{scene, data_collector}
88     A \Camera object controls the camera's settings.
89     \end{classdesc}
90 gross 606
91 jongui 879 The following are some of the methods available:
92     \begin{methoddesc}[Camera]{setFocalPoint}{position}
93     Set the focal point of the camera.
94     \end{methoddesc}
95 gross 606
96 jongui 879 \begin{methoddesc}[Camera]{setPosition}{position}
97     Set the position of the camera.
98     \end{methoddesc}
99 gross 606
100 jongui 879 \begin{methoddesc}[Camera]{azimuth}{angle}
101     Rotate the camera to the left and right.
102     \end{methoddesc}
103 gross 606
104 jongui 879 \begin{methoddesc}[Camera]{elevation}{angle}
105     Rotate the camera to the top and bottom.
106     \end{methoddesc}
107 gross 606
108 jongui 879 \begin{methoddesc}[Camera]{roll}{angle}
109     Roll the camera to the left and right.
110     \end{methoddesc}
111 gross 606
112 jongui 879 \begin{methoddesc}[Camera]{backView}{}
113     View the back of the rendered object.
114     \end{methoddesc}
115 gross 606
116 jongui 879 \begin{methoddesc}[Camera]{topView}{}
117     View the top of the rendered object.
118     \end{methoddesc}
119 gross 606
120 jongui 879 \begin{methoddesc}[Camera]{bottomView}{}
121     View the bottom of the rendered object.
122     \end{methoddesc}
123 gross 606
124 jongui 879 \begin{methoddesc}[Camera]{leftView}{}
125     View the left side of the rendered object.
126     \end{methoddesc}
127 gross 606
128 jongui 879 \begin{methoddesc}[Camera]{rightView}{}
129     View the right side of the rendered object.
130     \end{methoddesc}
131 gross 606
132 jongui 882 \begin{methoddesc}[Camera]{isometricView}{}
133     View the isometric side of the rendered object.
134     \end{methoddesc}
135    
136 jongui 879 The following is a sample code using the \Camera class.
137     \fig{fig:camera.1} shows the corresponding output.
138     \verbatiminput{../examples/drivercamera.py}
139 gross 606
140 jongui 879 \begin{figure}[ht]
141     \begin{center}
142     \includegraphics[width=30mm]{figures/Camera}
143     \end{center}
144     \caption{Camera manipulation}
145     \label{fig:camera.1}
146     \end{figure}
147 gross 606
148 jongui 879 \section{\Map class}
149     \begin{classdesc}{Map}{scene, data_collector, lut = None}
150     A \Map object shows a scalar field by color on the domain surface.
151     \end{classdesc}
152 gross 606
153 jongui 879 The following is a sample code using the \Map class.
154     \fig{fig:map.1} shows the corresponding output.
155     \verbatiminput{../examples/drivermap.py}
156 gross 606
157 jongui 879 \begin{figure}[ht]
158     \begin{center}
159     \includegraphics[width=40mm]{figures/Map}
160     \end{center}
161     \caption{Surface map}
162     \label{fig:map.1}
163     \end{figure}
164 gross 606
165 jongui 879 \section{\MapOnPlane class}
166     \begin{classdesc}{MapOnPlane}{scene, data_collector, transform, lut = None}
167     A \MapOnPlane object show a scalar field by color on a given plane.
168     \end{classdesc}
169 gross 606
170 jongui 879 The following is a sample code using the \MapOnPlane class.
171     \fig{fig:maponplane.1} shows the corresponding output.
172     \verbatiminput{../examples/drivermaponplane.py}
173 gross 606
174 jongui 879 \begin{figure}[ht]
175     \begin{center}
176     \includegraphics[width=40mm]{figures/MapOnPlane}
177     \end{center}
178     \caption{Surface map on a plane}
179     \label{fig:maponplane.1}
180     \end{figure}
181 gross 606
182 jongui 879 \section{\MapOnClip class}
183     \begin{classdesc}{MapOnClip}{scene, data_collector, transform, lut = None}
184     A \MapOnClip object show a scalar field by color on a given clip.
185     \end{classdesc}
186 gross 606
187 jongui 879 The following is a sample code using the \MapOnClip class.
188     \fig{fig:maponclip.1} shows the corresponding output.
189     \verbatiminput{../examples/drivermaponclip.py}
190 gross 606
191 jongui 879 \begin{figure}[ht]
192     \begin{center}
193     \includegraphics[width=40mm]{figures/MapOnClip}
194     \end{center}
195     \caption{Surface map on a clip}
196     \label{fig:maponclip.1}
197     \end{figure}
198 gross 606
199 jongui 879 \section{\Arrows class}
200     \begin{classdesc}{Arrows}{scene, data_collector, lut = None}
201     A \Arrows object shows a vector field by arrows.
202     \end{classdesc}
203 gross 606
204 jongui 879 The following are the methods available:
205     \begin{methoddesc}[Arrows]{setVectorMode}{vector_mode}
206     Set the arrows vector mode.
207     \end{methoddesc}
208 gross 606
209 jongui 879 \begin{methoddesc}[Arrows]{setScaleMode}{scale_mode}
210     Set the arrows scale mode.
211     \end{methoddesc}
212 gross 606
213 jongui 879 \begin{methoddesc}[Arrows]{setScaleFactor}{scale_factor}
214     Set the arrows scale factor.
215     \end{methoddesc}
216 gross 606
217 jongui 879 \begin{methoddesc}[Arrows]{setColorMode}{color_mode}
218     Set the arrows color mode.
219     \end{methoddesc}
220 gross 606
221 jongui 879 The following is a sample code using the \Arrows class.
222     \fig{fig:arrows.1} shows the corresponding output.
223     \verbatiminput{../examples/driverarrows.py}
224 gross 606
225 jongui 879 \begin{figure}[ht]
226     \begin{center}
227     \includegraphics[width=40mm]{figures/Arrows}
228     \end{center}
229     \caption{Arrows}
230     \label{fig:arrows.1}
231     \end{figure}
232 gross 606
233 jongui 879 \section{\ArrowsOnPlane class}
234     \begin{classdesc}{ArrowsOnPlane}{scene, data_collector, transform, lut = None}
235     A \ArrowsOnPlane object shows a vector field by arrows on a given plane.
236     \end{classdesc}
237 gross 606
238 jongui 879 The following is a sample code using the \ArrowsOnPlane class.
239     \fig{fig:arrowsonplane.1} shows the corresponding output.
240     \verbatiminput{../examples/driverarrowsonplane.py}
241 gross 606
242 jongui 879 \begin{figure}[ht]
243     \begin{center}
244     \includegraphics[width=40mm]{figures/ArrowsOnPlane}
245     \end{center}
246     \caption{Arrows on a plane}
247     \label{fig:arrowsonplane.1}
248     \end{figure}
249 gross 606
250 jongui 879 \section{\ArrowsOnClip class}
251     \begin{classdesc}{ArrowsOnClip}{scene, data_collector, transform, lut = None}
252     A \ArrowsOnClip object shows a vector field by arrows on a given clip.
253     \end{classdesc}
254 gross 606
255 jongui 879 The following is a sample code using the \ArrowsOnClip class.
256     \fig{fig:arrowsonclip.1} shows the corresponding output.
257     \verbatiminput{../examples/driverarrowsonclip.py}
258 gross 606
259 jongui 879 \begin{figure}[ht]
260     \begin{center}
261     \includegraphics[width=40mm]{figures/ArrowsOnClip}
262     \end{center}
263     \caption{Arrows on a clip}
264     \label{fig:arrowsonclip.1}
265     \end{figure}
266 gross 606
267    
268 jongui 879 \section{\IsoSurface class}
269     \begin{classdesc}{IsoSurface}{scene, data_collector, lut = None}
270     An \IsoSurface object shows a scalar field for a given value by an isosurface.
271     \end{classdesc}
272 gross 606
273 jongui 879 The following is the method available:
274 gross 606
275 jongui 879 \begin{methoddesc}[IsoSurface]{setValue}{contour_number, value}
276     Set the contour number and value.
277     \end{methoddesc}
278 gross 606
279 jongui 879 The following is a sample code using the \IsoSurface class.
280     \fig{fig:isosurface.1} shows the corresponding output.
281     \verbatiminput{../examples/driverisosurface.py}
282 gross 606
283 jongui 879 \begin{figure}[ht]
284     \begin{center}
285     \includegraphics[width=40mm]{figures/IsoSurface}
286     \end{center}
287     \caption{IsoSurface}
288     \label{fig:isosurface.1}
289     \end{figure}
290 gross 606
291 jongui 879 \section{\IsoSurfaceOnPlane class}
292     \begin{classdesc}{IsoSurfaceOnPlane}{scene, data_collector, transform,
293     lut = None}
294     An \IsoSurfaceOnPlane object shows a scalar field for a given value
295     by an isosurface on a given plane.
296     \end{classdesc}
297 gross 606
298 jongui 879 The following is a sample code using the \IsoSurfaceOnPlane class.
299     \fig{fig:isosurfaceonplane.1} shows the corresponding output.
300     \verbatiminput{../examples/driverisosurfaceonplane.py}
301 gross 606
302 jongui 879 \begin{figure}[ht]
303     \begin{center}
304     \includegraphics[width=40mm]{figures/IsoSurfaceOnPlane}
305     \end{center}
306     \caption{IsoSurface on a plane}
307     \label{fig:isosurfaceonplane.1}
308     \end{figure}
309 gross 606
310 jongui 879 \section{\IsoSurfaceOnClip class}
311     \begin{classdesc}{IsoSurfaceOnClip}{scene, data_collector, transform,
312     lut = None}
313     An \IsoSurfaceOnClip object shows a scalar field for a given value
314     by an isosurface on a given clip.
315     \end{classdesc}
316 gross 606
317 jongui 879 The following is a sample code using the \IsoSurfaceOnClip class.
318     \fig{fig:isosurfaceonclip.1} shows the corresponding output.
319     \verbatiminput{../examples/driverisosurfaceonclip.py}
320 gross 606
321 jongui 879 \begin{figure}[ht]
322     \begin{center}
323     \includegraphics[width=40mm]{figures/IsoSurfaceOnClip}
324     \end{center}
325     \caption{IsoSurface on a clip}
326     \label{fig:isosurfaceonclip.1}
327     \end{figure}
328 gross 606
329 jongui 879 \section{\Contour class}
330     \begin{classdesc}{Contour}{scene, data_collector, lut = None}
331     A \Contour object shows a scalar field contour surfaces.
332     \end{classdesc}
333 gross 606
334 jongui 879 The following is the method available:
335     \begin{methoddesc}[Contour]{generateValues}{number_contours, min_range,
336     max_range}
337     Generate the specified number of contours within the specified range.
338     \end{methoddesc}
339 gross 606
340 jongui 879 The following is a sample code using the \Contour class.
341     \fig{fig:contour.1} shows the corresponding output.
342     \verbatiminput{../examples/drivercontour.py}
343 gross 606
344 jongui 879 \begin{figure}[ht]
345     \begin{center}
346     \includegraphics[width=40mm]{figures/Contour}
347     \end{center}
348     \caption{Contour}
349     \label{fig:contour.1}
350     \end{figure}
351 gross 606
352 jongui 879 \section{\ContourOnPlane class}
353     \begin{classdesc}{ContourOnPlane}{scene, data_collector, transform, lut = None}
354     A \ContourOnPlane object shows a scalar field contour surfaces on a given plane.
355     \end{classdesc}
356 gross 606
357 jongui 879 The following is a sample code using the \ContourOnPlane class.
358     \fig{fig:contouronplane.1} shows the corresponding output.
359     \verbatiminput{../examples/drivercontouronplane.py}
360 gross 606
361 jongui 879 \begin{figure}[ht]
362     \begin{center}
363     \includegraphics[width=40mm]{figures/ContourOnPlane}
364     \end{center}
365     \caption{Contour on a plane}
366     \label{fig:contouronplane.1}
367     \end{figure}
368 gross 606
369 jongui 879 \section{\ContourOnClip class}
370     \begin{classdesc}{ContourOnClip}{scene, data_collector, transform, lut = None}
371     A \ContourOnClip object shows a scalar field contour surfaces on a given clip.
372     \end{classdesc}
373 gross 606
374 jongui 879 The following is a sample code using the \ContourOnClip class.
375     \fig{fig:contouronclip.1} shows the corresponding output.
376     \verbatiminput{../examples/drivercontouronclip.py}
377 gross 606
378 jongui 879 \begin{figure}[ht]
379     \begin{center}
380     \includegraphics[width=40mm]{figures/ContourOnClip}
381     \end{center}
382     \caption{Contour on a clip}
383     \label{fig:contouronclip.1}
384     \end{figure}
385 gross 606
386 jongui 879 \section{\TensorC class}
387     \begin{classdesc}{Tensor}{scene, data_collector, lut = None}
388     A \TensorC object shows a tensor field by ellipsoids.
389     \end{classdesc}
390 gross 606
391 jongui 879 The following are the methods available:
392     \begin{methoddesc}[Tensor]{setThetaResolution}{resolution}
393     Set the number of points in the longitude direction.
394     \end{methoddesc}
395 gross 606
396 jongui 879 \begin{methoddesc}[Tensor]{setPhiResolution}{resolution}
397     Set the number of points in the latitude direction.
398     \end{methoddesc}
399 gross 606
400 jongui 879 \begin{methoddesc}[Tensor]{setScaleFactor}{scale_factor}
401     Set the tensor scale factor.
402     \end{methoddesc}
403 gross 606
404 jongui 879 \begin{methoddesc}[Tensor]{setMaxScaleFactor}{max_scale_factor}
405     Set the maximum allowable scale factor.
406     \end{methoddesc}
407 gross 606
408 jongui 879 The following is a sample code using the \TensorC class.
409     \fig{fig:tensor.1} shows the corresponding output.
410     \verbatiminput{../examples/drivertensor.py}
411 gross 606
412 jongui 879 \begin{figure}[ht]
413     \begin{center}
414     \includegraphics[width=40mm]{figures/Tensor}
415     \end{center}
416     \caption{Tensor}
417     \label{fig:tensor.1}
418     \end{figure}
419 gross 606
420 jongui 879 \section{\TensorOnPlane class}
421     \begin{classdesc}{TensorOnPlane}{scene, data_collector, transform, lut = None}
422     A \TensorOnPlane object shows a tensor field by ellipsoids on a given plane.
423     \end{classdesc}
424 gross 606
425 jongui 879 The following is a sample code using the \TensorOnPlane class.
426     \fig{fig:tensoronplane.1} shows the corresponding output.
427     \verbatiminput{../examples/drivertensoronplane.py}
428 gross 606
429 jongui 879 \begin{figure}[ht]
430     \begin{center}
431     \includegraphics[width=40mm]{figures/TensorOnPlane}
432     \end{center}
433     \caption{Tensor on a plane}
434     \label{fig:tensoronplane.1}
435     \end{figure}
436 gross 606
437 jongui 879 \section{\TensorOnClip class}
438     \begin{classdesc}{TensorOnClip}{scene, data_collector, transform, lut = None}
439     A \TensorOnClip object shows a tensor field by ellipsoids on a given clip.
440     \end{classdesc}
441 gross 606
442 jongui 879 The following is a sample code using the \TensorOnClip class.
443     \fig{fig:tensoronclip.1} shows the corresponding output.
444     \verbatiminput{../examples/drivertensoronclip.py}
445 gross 606
446 jongui 879 \begin{figure}[ht]
447     \begin{center}
448     \includegraphics[width=40mm]{figures/TensorOnClip}
449     \end{center}
450     \caption{Tensor on a clip}
451     \label{fig:tensoronclip.1}
452     \end{figure}
453 gross 606
454 jongui 879 \section{\StreamLines class}
455     \begin{classdesc}{StreamLines}{scene, data_collector, lut = None}
456     A \StreamLines object show the path of particles (within a specified cloud
457     of points) in a vector field.
458     \end{classdesc}
459 gross 606
460 jongui 879 The following are the methods available:
461     \begin{methoddesc}[StreamLines]{setCloudRadius}{radius}
462     Set the radius for the cloud of points.
463     \end{methoddesc}
464 gross 606
465 jongui 879 \begin{methoddesc}[StreamLines]{setCenter}{position}
466     Set the center for the cloud of points.
467     \end{methoddesc}
468 gross 606
469 jongui 879 \begin{methoddesc}[StreamLines]{setNumberOfPoints}{points}
470     Set the number of points to generate for the cloud of points.
471     \end{methoddesc}
472 gross 606
473 jongui 879 \begin{methoddesc}[StreamLines]{setMaximumPropagationTime}{time}
474     Set the maximum length for the streamlines in unit of time.
475     \end{methoddesc}
476 gross 606
477 jongui 879 \begin{methoddesc}[StreamLines]{setStreamLinesSize}{stream_lines_size}
478     Set the size of the steamlines.
479     \end{methoddesc}
480 gross 606
481 jongui 879 \begin{methoddesc}[StreamLines]{setAccuracy}{accuracy}
482     Set the accuracy for the streamlines.
483     \end{methoddesc}
484 gross 606
485 jongui 879 \begin{methoddesc}[StreamLines]{setIntegrationToBothDirections}{}
486     Set the integration to occur in both directions.
487     \end{methoddesc}
488 gross 606
489 jongui 879 \begin{methoddesc}[StreamLines]{setTubeRadius}{radius}
490     Set the minimum radius of the tube.
491     \end{methoddesc}
492 gross 606
493 jongui 879 \begin{methoddesc}[StreamLines]{setNumberOfSides}{sides}
494     Set the number of sides for the tube.
495     \end{methoddesc}
496 gross 606
497 jongui 879 \begin{methoddesc}[StreamLines]{setVaryRadiusByVector}{}
498     Set the variation of the tube radius with vector data.
499     \end{methoddesc}
500 gross 606
501 jongui 879 The following is a sample code using the \StreamLines class.
502     \fig{fig:streamlines.1} shows the corresponding output.
503     \verbatiminput{../examples/driverstreamlines.py}
504 gross 606
505 jongui 879 \begin{figure}[ht]
506     \begin{center}
507     \includegraphics[width=40mm]{figures/StreamLines}
508     \end{center}
509     \caption{StreamLines}
510     \label{fig:streamlines.1}
511     \end{figure}
512 gross 606
513 jongui 879 \section{\Carpet class}
514     \begin{classdesc}{Carpet}{scene, data_collector, transform, lut = None,
515     deform = None}
516     A \Carpet object shows a scalar field as a plane deformated along the plane
517     normal.
518     \end{classdesc}
519 gross 606
520 jongui 879 The following is the method available:
521     \begin{methoddesc}[Carpet]{setScaleFactor}{scale_factor}
522     Set the displancement scale factor.
523     \end{methoddesc}
524 gross 606
525 jongui 879 The following is a sample code using the \Carpet class.
526     \fig{fig:carpet.1} shows the corresponding output.
527     \verbatiminput{../examples/drivercarpet.py}
528 gross 606
529 jongui 879 \begin{figure}[ht]
530     \begin{center}
531     \includegraphics[width=40mm]{figures/Carpet}
532     \end{center}
533     \caption{Carpet}
534     \label{fig:carpet.1}
535     \end{figure}
536 gross 606
537 jongui 879 \section{\Image class}
538     \begin{classdesc}{Image}{scene, format}
539     An \Image object shows an image.
540     \end{classdesc}
541 gross 606
542 jongui 879 The following is the method available:
543     \begin{methoddesc}[Image]{setFileName}{file_name}
544     Set the file name.
545     \end{methoddesc}
546 gross 606
547 jongui 879 The following is a sample code using the \Image class.
548     \fig{fig:image.1} shows the corresponding output.
549     \verbatiminput{../examples/driverimage.py}
550 gross 606
551 jongui 879 \begin{figure}[ht]
552     \begin{center}
553     \includegraphics[width=40mm]{figures/Image}
554     \end{center}
555     \caption{Image}
556     \label{fig:image.1}
557     \end{figure}
558 gross 606
559 jongui 879 \section{\Text class}
560     \begin{classdesc}{Text}{scene}
561     A \Text object shows 2D text.
562     \end{classdesc}
563 gross 606
564 jongui 879 The following are the methods available:
565     \begin{methoddesc}[Text]{setText}{text}
566     Set the text.
567     \end{methoddesc}
568 gross 606
569 jongui 879 \begin{methoddesc}[Text]{setPosition}{x_coor, y_coor}
570     Set the display position of the text.
571     \end{methoddesc}
572 gross 606
573 jongui 879 \begin{methoddesc}[Text]{setStyle}{style}
574     Set the style of the text.
575     \end{methoddesc}
576 gross 606
577 jongui 879 The following is a sample code using the \Text class.
578     \fig{fig:text.1} shows the corresponding output.
579     \verbatiminput{../examples/drivertext.py}
580 gross 606
581 jongui 879 \begin{figure}[ht]
582     \begin{center}
583     \includegraphics[width=40mm]{figures/Text}
584     \end{center}
585     \caption{2D text}
586     \label{fig:text.1}
587     \end{figure}
588 gross 606
589 jongui 879 \section{\Position class}
590     \begin{classdesc}{Position}{x_coor, y_coor, z_coor}
591     A \Position object defines the x, y and z coordinates of rendered object.
592     \end{classdesc}
593 gross 606
594 jongui 879 \section{\Transform class}
595     \begin{classdesc}{Transform}{}
596     A \Transform object defines the orientation of rendered object.
597     \end{classdesc}
598 gross 606
599 jongui 879 The following are some of the methods available:
600     \begin{methoddesc}[Transform]{translate}{x_offset, y_offset, z_offset}
601     Translate the rendered object along the x, y and z-axes.
602     \end{methoddesc}
603 gross 606
604 jongui 879 \begin{methoddesc}[Transform]{rotateX}{angle}
605     Rotate the rendered object along the x-axis.
606     \end{methoddesc}
607 gross 606
608 jongui 879 \begin{methoddesc}[Transform]{rotateY}{angle}
609     Rotate the rendered object along the y-axis.
610     \end{methoddesc}
611 gross 606
612 jongui 879 \begin{methoddesc}[Transform]{rotateZ}{angle}
613     Rotate the rendered object along the z-axis.
614     \end{methoddesc}
615 gross 606
616 jongui 879 \begin{methoddesc}[Transform]{xyPlane}{offset = 0}
617     Set the plane orthogonal to the z-axis.
618     \end{methoddesc}
619 gross 606
620 jongui 879 \begin{methoddesc}[Transform]{yzPlane}{offset = 0}
621     Set the plane orthogonal to the x-axis.
622     \end{methoddesc}
623 gross 606
624 jongui 879 \begin{methoddesc}[Transform]{xzPlane}{offset = 0}
625     Set the plane orthogonal to the y-axis.
626     \end{methoddesc}
627 gross 606
628 jongui 879 \section{\Style class}
629     \begin{classdesc}{Style}{}
630     A \Style object defines the style of text.
631     \end{classdesc}
632 gross 606
633 jongui 879 The following are the methods available:
634     \begin{methoddesc}[Style]{setFontFamily}{family}
635     Set the font family (i.e. Times)
636     \end{methoddesc}
637 gross 606
638 jongui 879 \begin{methoddesc}[Style]{boldOn}{}
639     Bold the text.
640     \end{methoddesc}
641 gross 606
642 jongui 879 \begin{methoddesc}[Style]{italicOn}{}
643     Italize the text.
644     \end{methoddesc}
645 gross 606
646 jongui 879 \begin{methoddesc}[Style]{shadowOn}{}
647     Apply shadows on the text.
648     \end{methoddesc}
649 gross 606
650 jongui 879 \begin{methoddesc}[Style]{setColor}{}
651     Set the text color.
652     \end{methoddesc}
653 gross 606
654 jongui 879 \section{\BlueToRed class}
655     \begin{classdesc}{BlueToRed}{}
656     A \BlueToRed object defines a map spectrum from blue to red.
657     \end{classdesc}
658 gross 606
659 jongui 879 \section{\RedToBlue class}
660     \begin{classdesc}{RedToBlue}{}
661     A \RedToBlue object defines a map spectrum from red to blue.
662     \end{classdesc}
663 gross 606
664    

  ViewVC Help
Powered by ViewVC 1.1.26