Changeset 1462


Ignore:
Timestamp:
May 19, 2009 6:46:51 PM (12 years ago)
Author:
gah
Message:
 
Location:
trunk/packages/vizservers/nanovis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r1458 r1462  
    118118FlowParticles::Render(void)
    119119{
     120    Trace("rendering particles %s\n", _name);
     121    Trace("rendering particles %s axis=%d\n", _name, _sv.position.axis);
     122    Trace("rendering particles %s position=%g\n", _name, _sv.position.value);
     123    Trace("rendering particles %s position=%g\n", _name,
     124          FlowCmd::GetRelativePosition(&_sv.position));
     125
    120126    _rendererPtr->setPos(FlowCmd::GetRelativePosition(&_sv.position));
    121127    _rendererPtr->setAxis(_sv.position.axis);
     
    691697        }
    692698        flowPtr->SetData(dataPtr);
    693     } else if ((length > 11) && (strncmp(bytes, "<unirect3d>", 11) == 0)) {
     699    } else if ((length > 10) && (strncmp(bytes, "unirect3d ", 10) == 0)) {
    694700        Rappture::Unirect3d *dataPtr;
    695701        Tcl_CmdInfo cmdInfo;
     
    703709        cmdInfo.objClientData = (ClientData)dataPtr;   
    704710        Tcl_SetCommandInfo(interp, "unirect3d", &cmdInfo);
    705         if (Tcl_Eval(interp, (const char *)bytes+11) != TCL_OK) {
     711        if (Tcl_Eval(interp, (const char *)bytes) != TCL_OK) {
    706712            delete dataPtr;
    707713            return TCL_ERROR;
     
    712718        }
    713719        flowPtr->SetData(dataPtr);
    714     } else if ((length > 11) && (strncmp(bytes, "<unirect2d>", 11) == 0)) {
     720    } else if ((length > 10) && (strncmp(bytes, "unirect2d ", 10) == 0)) {
    715721        Rappture::Unirect2d *dataPtr;
    716722        Tcl_CmdInfo cmdInfo;
     
    724730        cmdInfo.objClientData = (ClientData)dataPtr;   
    725731        Tcl_SetCommandInfo(interp, "unirect2d", &cmdInfo);
    726         if (Tcl_Eval(interp, (const char *)bytes+11) != TCL_OK) {
     732        if (Tcl_Eval(interp, (const char *)bytes) != TCL_OK) {
    727733            delete dataPtr;
    728734            return TCL_ERROR;
     
    739745        Rappture::Unirect3d *dataPtr;
    740746
    741         fprintf(stderr, "header is %.14s\n", bytes);
     747        fprintf(stderr, "header is %.14s\n", buf.bytes());
    742748        dataPtr = new Rappture::Unirect3d(nComponents);
    743         if (!dataPtr->ImportDx(result, nComponents, length,  bytes)) {
     749        if (!dataPtr->ImportDx(result, nComponents, length, bytes)) {
    744750            Tcl_AppendResult(interp, result.remark(), (char *)NULL);
    745751            delete dataPtr;
     
    803809        }
    804810        flowPtr->SetData(dataPtr);
    805     } else if ((length > 11) && (strncmp(bytes, "<unirect3d>", 11) == 0)) {
     811    } else if ((length > 10) && (strncmp(bytes, "unirect3d ", 10) == 0)) {
    806812        Rappture::Unirect3d *dataPtr;
    807813        Tcl_CmdInfo cmdInfo;
     
    815821        cmdInfo.objClientData = (ClientData)dataPtr;   
    816822        Tcl_SetCommandInfo(interp, "unirect3d", &cmdInfo);
    817         if (Tcl_Eval(interp, bytes+11) != TCL_OK) {
     823        if (Tcl_Eval(interp, bytes) != TCL_OK) {
    818824            delete dataPtr;
    819825            return TCL_ERROR;
     
    824830        }
    825831        flowPtr->SetData(dataPtr);
    826     } else if ((length > 11) && (strncmp(bytes, "<unirect2d>", 11) == 0)) {
     832    } else if ((length > 10) && (strncmp(bytes, "unirect2d ", 10) == 0)) {
    827833        Rappture::Unirect2d *dataPtr;
    828834        Tcl_CmdInfo cmdInfo;
     
    836842        cmdInfo.objClientData = (ClientData)dataPtr;   
    837843        Tcl_SetCommandInfo(interp, "unirect2d", &cmdInfo);
    838         if (Tcl_Eval(interp, bytes+11) != TCL_OK) {
     844        if (Tcl_Eval(interp, bytes) != TCL_OK) {
    839845            delete dataPtr;
    840846            return TCL_ERROR;
     
    851857        Rappture::Unirect3d *dataPtr;
    852858
     859        fprintf(stderr, "header is %.14s\n", buf.bytes());
    853860        dataPtr = new Rappture::Unirect3d(nComponents);
    854861        if (!dataPtr->ImportDx(result, nComponents, length, bytes)) {
  • trunk/packages/vizservers/nanovis/Unirect.cpp

    r1458 r1462  
    55#include "RpField1D.h"
    66#include "RpFieldRect3D.h"
     7#include "Trace.h"
    78
    89extern int GetFloatFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
     
    4849    if ((objc & 0x01) == 0) {
    4950        Tcl_AppendResult(interp, Tcl_GetString(objv[0]), ": ",
    50                 "wrong number of arguments: should be key-value pairs",
     51                "wrong # of arguments: should be key-value pairs",
    5152                (char *)NULL);
    5253        return TCL_ERROR;
     
    183184    }
    184185    if ((size_t)nValues != (num[0] * num[1] * num[2] * _nComponents)) {
     186        Trace("num[0]=%d num[1]=%d num[2]=%d ncomponents=%d nValues=%d\n",
     187              num[0], num[1], num[2], _nComponents, nValues);
    185188        Tcl_AppendResult(interp,
    186                 "wrong number of values: must be xnum*ynum*znum*extents",
     189                "wrong # of values: must be xnum*ynum*znum*extents",
    187190                         (char *)NULL);
    188191       return TCL_ERROR;
Note: See TracChangeset for help on using the changeset viewer.