Changeset 917


Ignore:
Timestamp:
Mar 4, 2008 4:48:10 PM (15 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/vizservers/nanovis/Command.cpp

    r915 r917  
    44 * Command.cpp
    55 *
    6  *      This modules creates the Tcl interface to the nanovis server.
    7  *      The communication protocol of the server is the Tcl language.
    8  *      Commands given to the server by clients are executed in a
    9  *      safe interpreter and the resulting image rendered offscreen
    10  *      is returned as BMP-formatted image data.
     6 *      This modules creates the Tcl interface to the nanovis server.  The
     7 *      communication protocol of the server is the Tcl language.  Commands
     8 *      given to the server by clients are executed in a safe interpreter and
     9 *      the resulting image rendered offscreen is returned as BMP-formatted
     10 *      image data.
    1111 *
    1212 * ======================================================================
     
    108108
    109109// default transfer function
    110 static const char def_transfunc[] = "transfunc define default {\n\
     110static const char def_transfunc[] =
     111    "transfunc define default {\n\
    111112  0.0  1 1 1\n\
    112113  0.2  1 1 0\n\
     
    137138static Tcl_ObjCmdProc CameraCmd;
    138139static Tcl_ObjCmdProc CutplaneCmd;
     140static Tcl_ObjCmdProc FlowCmd;
    139141static Tcl_ObjCmdProc GridCmd;
    140142static Tcl_ObjCmdProc LegendCmd;
     
    148150static Tcl_ObjCmdProc UpCmd;
    149151static Tcl_ObjCmdProc VolumeCmd;
    150 static Tcl_ObjCmdProc FlowCmd;
    151 
    152 static int GetVolumeIndices(Tcl_Interp *interp, int objc, Tcl_Obj *CONST *objv,
    153         vector<unsigned int>* vectorPtr);
    154 static int GetVolumes(Tcl_Interp *interp, int objc, Tcl_Obj *CONST *objv,
    155         vector<Volume *>* vectorPtr);
    156 static int GetVolumeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
    157         Volume **volPtrPtr);
    158 static int GetVolumeIndex(Tcl_Interp *interp, Tcl_Obj *objPtr,
    159         unsigned int *indexPtr);
    160 static int GetHeightMap(Tcl_Interp *interp, Tcl_Obj *objPtr, HeightMap **hmPtrPtr);
    161 static int GetIndices(Tcl_Interp *interp, int objc, Tcl_Obj *CONST *objv,
    162         vector<unsigned int>* vectorPtr);
    163 static int GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *indexPtr);
    164 static int GetAxisDirFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *indexPtr,
    165         int *dirPtr);
    166 static int GetColor(Tcl_Interp *interp, int objc, Tcl_Obj *CONST *objv,
    167         float *rgbPtr);
    168 static int GetDataStream(Tcl_Interp *interp, Rappture::Buffer &buf,
    169         int nBytes);
    170 static HeightMap *CreateHeightMap(ClientData clientData, Tcl_Interp *interp,
    171         int objc, Tcl_Obj *CONST *objv);
    172152
    173153static int
     
    25732553initTcl()
    25742554{
     2555    /*
     2556     * Ideally the connection is authenticated by nanoscale.  I still like the
     2557     * idea of creating a non-safe master interpreter with a safe slave
     2558     * interpreter.  Alias all the nanovis commands in the slave. That way we
     2559     * can still run Tcl code within nanovis.  The eventual goal is to create
     2560     * a test harness through the interpreter for nanovis.
     2561     */
    25752562    interp = Tcl_CreateInterp();
    25762563    Tcl_MakeSafe(interp);
Note: See TracChangeset for help on using the changeset viewer.