Changeset 4825
- Timestamp:
- Dec 9, 2014 1:32:56 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nanovis/branches/1.1/Command.cpp
r4820 r4825 2131 2131 } 2132 2132 2133 /*2134 * This command should be Tcl procedure instead of a C command. The reason2135 * for this that 1) we are using a safe interpreter so we would need a master2136 * interpreter to load the Tcl environment properly (including our "unirect2d"2137 * procedure). And 2) the way nanovis is currently deployed doesn't make it2138 * easy to add new directories for procedures, since it's loaded into /tmp.2139 *2140 * Ideally, the "unirect2d" proc would do a rundimentary parsing of the data2141 * to verify the structure and then pass it to the appropiate Tcl command2142 * (heightmap, volume, etc). Our C command always creates a heightmap.2143 */2144 static int2145 Unirect2dCmd(ClientData clientData, Tcl_Interp *interp, int objc,2146 Tcl_Obj *const *objv)2147 {2148 Rappture::Unirect2d *dataPtr = (Rappture::Unirect2d *)clientData;2149 2150 return dataPtr->loadData(interp, objc, objv);2151 }2152 2153 /*2154 * This command should be Tcl procedure instead of a C command. The reason2155 * for this that 1) we are using a safe interpreter so we would need a master2156 * interpreter to load the Tcl environment properly (including our "unirect2d"2157 * procedure). And 2) the way nanovis is currently deployed doesn't make it2158 * easy to add new directories for procedures, since it's loaded into /tmp.2159 *2160 * Ideally, the "unirect2d" proc would do a rundimentary parsing of the data2161 * to verify the structure and then pass it to the appropiate Tcl command2162 * (heightmap, volume, etc). Our C command always creates a heightmap.2163 */2164 2165 static int2166 Unirect3dCmd(ClientData clientData, Tcl_Interp *interp, int objc,2167 Tcl_Obj *const *objv)2168 {2169 Rappture::Unirect3d *dataPtr = (Rappture::Unirect3d *)clientData;2170 2171 return dataPtr->loadData(interp, objc, objv);2172 }2173 2174 2133 Tcl_Interp * 2175 2134 initTcl() … … 2200 2159 Tcl_CreateObjCommand(interp, "snapshot", SnapshotCmd, NULL, NULL); 2201 2160 Tcl_CreateObjCommand(interp, "transfunc", TransfuncCmd, NULL, NULL); 2202 Tcl_CreateObjCommand(interp, "unirect2d", Unirect2dCmd, NULL, NULL);2203 Tcl_CreateObjCommand(interp, "unirect3d", Unirect3dCmd, NULL, NULL);2204 2161 Tcl_CreateObjCommand(interp, "up", UpCmd, NULL, NULL); 2205 2162 Tcl_CreateObjCommand(interp, "volume", VolumeCmd, NULL, NULL);
Note: See TracChangeset
for help on using the changeset viewer.