Mercurial > hg > octave-lyh
annotate src/pt-cmd.cc @ 7829:8ca8e97e8c0a
Add rendering interface for surface object (no implementation yet).
* * *
Add surface properties.
* * *
Add cdata -> RGB color conversion function. Use it in surface objects.
* * *
Add normals automatic computation to surface objects.
* * *
Make sure the correct "get" method is called.
* * *
Extend scaler interface to accept NDArray.
* * *
Surface rendering (1st part).
* * *
Fix wrong indexing.
* * *
Fix bug in xget_ancestor argument declaration.
* * *
Initialize OpenGL context correctly. Fix bug in surface rendering.
* * *
Set material color when rendering surface facets.
* * *
Add rendering of surface mesh and markers.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Thu, 14 Feb 2008 12:17:44 +0100 |
parents | 71f068b22fcc |
children | 4976f66d469b |
rev | line source |
---|---|
494 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1994, 1995, 1996, 1997, 2002, 2004, 2005, 2006, 2007 |
4 John W. Eaton | |
494 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
494 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
494 | 21 |
22 */ | |
23 | |
24 #ifdef HAVE_CONFIG_H | |
1192 | 25 #include <config.h> |
494 | 26 #endif |
27 | |
2956 | 28 #include "pt-cmd.h" |
2124 | 29 #include "pt-walk.h" |
916 | 30 |
2620 | 31 // No-op. |
32 | |
5861 | 33 tree_command * |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7755
diff
changeset
|
34 tree_no_op_command::dup (symbol_table::scope_id, |
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7755
diff
changeset
|
35 symbol_table::context_id context) |
5861 | 36 { |
37 return new tree_no_op_command (orig_cmd, line (), column ()); | |
38 } | |
39 | |
2620 | 40 void |
41 tree_no_op_command::accept (tree_walker& tw) | |
42 { | |
43 tw.visit_no_op_command (*this); | |
44 } | |
45 | |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
46 // Function definition. |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
47 |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
48 void |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
49 tree_function_def::eval (void) |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
50 { |
7755
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
51 octave_function *f = function (); |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
52 |
7755
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
53 if (f) |
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
54 { |
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
55 std::string nm = f->name (); |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
56 |
7755
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
57 symbol_table::install_cmdline_function (nm, fcn); |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
58 |
7755
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
59 // Make sure that any variable with the same name as the new |
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
60 // function is cleared. |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
61 |
7755
ea9cb4d68dbf
avoid installing subfunctions twice
John W. Eaton <jwe@octave.org>
parents:
7754
diff
changeset
|
62 symbol_table::varref (nm) = octave_value (); |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
63 } |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
64 } |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
65 |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
66 tree_command * |
7767
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7755
diff
changeset
|
67 tree_function_def::dup (symbol_table::scope_id, |
71f068b22fcc
scope and context fixes for function handles
John W. Eaton <jwe@octave.org>
parents:
7755
diff
changeset
|
68 symbol_table::context_id context) |
7715
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
69 { |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
70 return new tree_function_def (fcn, line (), column ()); |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
71 } |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
72 |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
73 void |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
74 tree_function_def::accept (tree_walker& tw) |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
75 { |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
76 tw.visit_function_def (*this); |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
77 } |
5b4d278ec828
parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents:
7336
diff
changeset
|
78 |
494 | 79 /* |
80 ;;; Local Variables: *** | |
81 ;;; mode: C++ *** | |
82 ;;; End: *** | |
83 */ |