Ignore:
Timestamp:
Feb 16, 2008, 10:56:42 PM (16 years ago)
Author:
dkearney
Message:

added 2D fields to the list of objects that can be visualized in a sequence, even though it is usually painfully slow right now.
also added some error checking for field objects with multiple components, all components need to be of the same dimensions to be visualized in a sequence.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/sequenceresult.tcl

    r767 r893  
    428428            }
    429429            ::Rappture::Field {
    430                 Rappture::Field3DResult $viewer
     430                set dimensions ""
     431                set dim ""
     432                foreach dim [$dataobj components -dimensions] {
     433                    # check to see if the dimensions are the same
     434                    # for all elements of the field. i dont think
     435                    # we can display fields of differing dimensions
     436                    # within the same field object.
     437                    if {"" != $dimensions} {
     438                        if {$dimensions != $dim} {
     439                            error "don't know how to view sequences of $type\
     440                                with dimensions as follows:\
     441                                [$dataobj components -dimensions]"
     442                        }
     443                    } else {
     444                        set dimensions $dim
     445                    }
     446                }
     447                switch -- $dimensions {
     448                    2D {
     449                        Rappture::Field2DResult $viewer
     450                    }
     451                    3D {
     452                        Rappture::Field3DResult $viewer
     453                    }
     454                    default {
     455                        error "don't know how to view sequences of $type\
     456                            with $dimensions dimensions"
     457                    }
     458                }
    431459                pack $viewer -expand yes -fill both
    432460            }
Note: See TracChangeset for help on using the changeset viewer.