- Timestamp:
- May 27, 2015 12:24:37 PM (9 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/cloud.tcl
r5605 r5609 18 18 19 19 itcl::class Rappture::Cloud { 20 constructor {xmlobj path} { 21 # defined below 22 } 23 destructor { 24 # defined below 25 } 26 public method points {} 27 public method mesh {} 28 public method units { axis } 29 public method label { axis } 30 public method vtkdata {} 31 public method dimensions {} 32 public method limits {which} 33 public method hints {{key ""}} 34 public method numpoints {} { 35 return $_numPoints 36 } 37 public method isvalid {} { 38 return $_isValid 39 } 40 41 public proc fetch {xmlobj path} 42 public proc release {obj} 43 20 44 private variable _xmlobj ""; # ref to XML obj with device data 21 45 private variable _cloud ""; # lib obj representing this cloud … … 24 48 private variable _axis2units; # 25 49 private variable _limits; # limits x, y, z 26 private common _xp2obj ; # Used for fetch/release ref counting27 private common _obj2ref ; # Used for fetch/release ref counting28 50 private variable _numPoints 0 29 51 private variable _vtkdata "" … … 32 54 private variable _isValid 0; # Indicates if the data is valid. 33 55 34 constructor {xmlobj path} { 35 # defined below 36 } 37 destructor { 38 # defined below 39 } 40 public method points {} 41 public method mesh {} 42 public method units { axis } 43 public method label { axis } 44 public method vtkdata {} 45 public method size {} 46 public method dimensions {} 47 public method limits {which} 48 public method hints {{key ""}} 49 public method numpoints {} { 50 return $_numPoints 51 } 52 public method isvalid {} { 53 return $_isValid 54 } 55 public proc fetch {xmlobj path} 56 public proc release {obj} 56 private common _xp2obj ; # Used for fetch/release ref counting 57 private common _obj2ref ; # Used for fetch/release ref counting 57 58 } 58 59 … … 224 225 225 226 # ---------------------------------------------------------------------- 226 # USAGE: size227 #228 # Returns the number of points in this cloud.229 # ----------------------------------------------------------------------230 itcl::body Rappture::Cloud::size {} {231 return $_numPoints232 }233 234 # ----------------------------------------------------------------------235 227 # USAGE: dimensions 236 228 # -
trunk/gui/scripts/mesh.tcl
r5320 r5609 45 45 public method elements {} 46 46 public method mesh {{-type "vtk"}} 47 public method size {{what -points}}48 47 public method dimensions {} 49 48 public method limits {which} … … 333 332 default { 334 333 error "Requested mesh type \"$type\" is unknown." 335 }336 }337 }338 339 # ----------------------------------------------------------------------340 # USAGE: size ?-points|-elements?341 #342 # Returns the number of points in this mesh.343 # ----------------------------------------------------------------------344 itcl::body Rappture::Mesh::size {{what -points}} {345 switch -- $what {346 -points {347 return $_numPoints348 }349 -elements {350 return $_numCells351 }352 default {353 error "bad option \"$what\": should be -points or -elements"354 334 } 355 335 }
Note: See TracChangeset
for help on using the changeset viewer.