Changeset 3615


Ignore:
Timestamp:
Apr 3, 2013 12:34:50 AM (9 years ago)
Author:
ldelgass
Message:

Remove enclosing Rappture namespace from vtkvis. Remove outline and outline
color subcommands from dataset in vtkvis protocol -- they are replaced by the
outline object. Translate heightmap to dataset z plane (client is doing this
right now).

Location:
trunk/packages/vizservers/vtkvis
Files:
77 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/CmdProc.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __CMDPROC_H__
    9 #define __CMDPROC_H__
     8#ifndef RAPPTURE_CMDPROC_H
     9#define RAPPTURE_CMDPROC_H
    1010
    1111#include <tcl.h>
  • trunk/packages/vizservers/vtkvis/ColorMap.cpp

    r3457 r3615  
    1818#include "Trace.h"
    1919
    20 using namespace Rappture::VtkVis;
     20using namespace VtkVis;
    2121
    2222ColorMap *ColorMap::_default = NULL;
  • trunk/packages/vizservers/vtkvis/ColorMap.h

    r3455 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_COLORMAP_H__
    9 #define __RAPPTURE_VTKVIS_COLORMAP_H__
     8#ifndef VTKVIS_COLORMAP_H
     9#define VTKVIS_COLORMAP_H
    1010
    1111#include <string>
     
    1717#include <vtkLookupTable.h>
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    132131
    133132}
    134 }
    135133
    136134#endif
  • trunk/packages/vizservers/vtkvis/PPMWriter.cpp

    r3177 r3615  
    1818#endif
    1919
    20 using namespace Rappture::VtkVis;
     20using namespace VtkVis;
    2121
    2222#ifdef USE_THREADS
     
    4444 */
    4545void
    46 Rappture::VtkVis::queuePPM(ResponseQueue *queue, const char *cmdName,
    47                            const unsigned char *data, int width, int height)
     46VtkVis::queuePPM(ResponseQueue *queue, const char *cmdName,
     47                 const unsigned char *data, int width, int height)
    4848{
    4949#define PPM_MAXVAL 255
     
    121121 */
    122122void
    123 Rappture::VtkVis::writePPM(int fd, const char *cmdName,
    124                            const unsigned char *data, int width, int height)
     123VtkVis::writePPM(int fd, const char *cmdName,
     124                 const unsigned char *data, int width, int height)
    125125{
    126126#define PPM_MAXVAL 255
  • trunk/packages/vizservers/vtkvis/PPMWriter.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_PPMWRITER_H__
    9 #define __RAPPTURE_VTKVIS_PPMWRITER_H__
     8#ifndef VTKVIS_PPMWRITER_H
     9#define VTKVIS_PPMWRITER_H
    1010
    1111#ifdef USE_THREADS
     
    1313#endif
    1414
    15 namespace Rappture {
    1615namespace VtkVis {
    1716#ifdef USE_THREADS
     
    2524#endif
    2625}
    27 }
    2826#endif
  • trunk/packages/vizservers/vtkvis/ReadBuffer.cpp

    r3177 r3615  
    1515#include "Trace.h"
    1616
    17 using namespace Rappture::VtkVis;
     17using namespace VtkVis;
    1818
    1919/**
  • trunk/packages/vizservers/vtkvis/ReadBuffer.h

    r3177 r3615  
    88#include <cstdlib>
    99
    10 #ifndef _READBUFFER_H
    11 #define _READBUFFER_H
     10#ifndef VTKVIS_READBUFFER_H
     11#define VTKVIS_READBUFFER_H
    1212
    13 namespace Rappture {
    1413namespace VtkVis {
    1514
     
    8281
    8382}
    84 }
    8583
    86 #endif /* _READBUFFER_H */
     84#endif
  • trunk/packages/vizservers/vtkvis/ResponseQueue.cpp

    r3330 r3615  
    1616#include "ResponseQueue.h"
    1717
    18 using namespace Rappture::VtkVis;
     18using namespace VtkVis;
    1919
    20 ResponseQueue::ResponseQueue(void *clientData)  :
    21     _clientData(clientData)
     20ResponseQueue::ResponseQueue()
    2221{
    2322    pthread_mutex_init(&_idle, NULL);
  • trunk/packages/vizservers/vtkvis/ResponseQueue.h

    r3451 r3615  
    55 * Author: George A. Howlett <gah@purdue.edu>
    66 */
     7#ifndef VTKVIS_RESPONSE_QUEUE_H
     8#define VTKVIS_RESPONSE_QUEUE_H
    79
    810#include <pthread.h>
    911#include <semaphore.h>
    1012#include <cstdlib>
     13#include <cstring>
    1114#include <list>
    1215
    13 #ifndef _RESPONSE_QUEUE_H
    14 #define _RESPONSE_QUEUE_H
    15 
    16 namespace Rappture {
    1716namespace VtkVis {
    1817
     
    111110{
    112111public:
    113     ResponseQueue(void *clientData);
     112    ResponseQueue();
    114113
    115114    virtual ~ResponseQueue();
    116 
    117     /// A place to store a data pointer.  Not used internally.
    118     /* XXX: This probably doesn't belong here */
    119     void *clientData()
    120     {
    121         return _clientData;
    122     }
    123115
    124116    /// Add a response to the end of the queue
     
    132124    sem_t _ready; /**< Semaphore indicating that a response has been queued. */
    133125    std::list<Response *> _list;
    134     void *_clientData;
    135126};
    136127
    137128}
    138 }
    139129
    140130#endif
  • trunk/packages/vizservers/vtkvis/RpArc.cpp

    r3177 r3615  
    1313#include "Trace.h"
    1414
    15 using namespace Rappture::VtkVis;
     15using namespace VtkVis;
    1616
    1717Arc::Arc() :
  • trunk/packages/vizservers/vtkvis/RpArc.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_ARC_H__
    9 #define __RAPPTURE_VTKVIS_ARC_H__
     8#ifndef VTKVIS_ARC_H
     9#define VTKVIS_ARC_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    6564
    6665}
    67 }
    6866
    6967#endif
  • trunk/packages/vizservers/vtkvis/RpArrow.cpp

    r3177 r3615  
    1313#include "Trace.h"
    1414
    15 using namespace Rappture::VtkVis;
     15using namespace VtkVis;
    1616
    1717Arrow::Arrow() :
  • trunk/packages/vizservers/vtkvis/RpArrow.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_ARROW_H__
    9 #define __RAPPTURE_VTKVIS_ARROW_H__
     8#ifndef VTKVIS_ARROW_H
     9#define VTKVIS_ARROW_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    7372
    7473}
    75 }
    7674
    7775#endif
  • trunk/packages/vizservers/vtkvis/RpBox.cpp

    r3177 r3615  
    1919#include "Trace.h"
    2020
    21 using namespace Rappture::VtkVis;
     21using namespace VtkVis;
    2222
    2323Box::Box() :
  • trunk/packages/vizservers/vtkvis/RpBox.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_BOX_H__
    9 #define __RAPPTURE_VTKVIS_BOX_H__
     8#ifndef VTKVIS_BOX_H
     9#define VTKVIS_BOX_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    5251
    5352}
    54 }
    5553
    5654#endif
  • trunk/packages/vizservers/vtkvis/RpCone.cpp

    r3177 r3615  
    1313#include "Trace.h"
    1414
    15 using namespace Rappture::VtkVis;
     15using namespace VtkVis;
    1616
    1717Cone::Cone() :
  • trunk/packages/vizservers/vtkvis/RpCone.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_CONE_H__
    9 #define __RAPPTURE_VTKVIS_CONE_H__
     8#ifndef VTKVIS_CONE_H
     9#define VTKVIS_CONE_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    8584
    8685}
    87 }
    8886
    8987#endif
  • trunk/packages/vizservers/vtkvis/RpContour2D.cpp

    r3525 r3615  
    2727#include "Trace.h"
    2828
    29 using namespace Rappture::VtkVis;
     29using namespace VtkVis;
    3030
    3131Contour2D::Contour2D(int numContours) :
     
    302302}
    303303
     304void Contour2D::setContourField(const char *name)
     305{
     306    if (_contourFilter != NULL) {
     307        _contourFilter->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, name);
     308        update();
     309    }
     310}
     311
    304312void Contour2D::setColorMode(ColorMode mode)
    305313{
  • trunk/packages/vizservers/vtkvis/RpContour2D.h

    r3490 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_CONTOUR2D_H__
    9 #define __RAPPTURE_VTKVIS_CONTOUR2D_H__
     8#ifndef VTKVIS_CONTOUR2D_H
     9#define VTKVIS_CONTOUR2D_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2121#include "RpVtkGraphicsObject.h"
    2222
    23 namespace Rappture {
    2423namespace VtkVis {
    2524
     
    5352
    5453    virtual void setClippingPlanes(vtkPlaneCollection *planes);
     54
     55    void setContourField(const char *name);
    5556
    5657    void setNumContours(int numContours);
     
    120121
    121122}
    122 }
    123123
    124124#endif
  • trunk/packages/vizservers/vtkvis/RpContour3D.cpp

    r3525 r3615  
    2525#include "Trace.h"
    2626
    27 using namespace Rappture::VtkVis;
     27using namespace VtkVis;
    2828
    2929Contour3D::Contour3D(int numContours) :
     
    269269}
    270270
     271void Contour3D::setContourField(const char *name)
     272{
     273    if (_contourFilter != NULL) {
     274        _contourFilter->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, name);
     275        update();
     276    }
     277}
     278
    271279void Contour3D::setColorMode(ColorMode mode)
    272280{
  • trunk/packages/vizservers/vtkvis/RpContour3D.h

    r3490 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_CONTOUR3D_H__
    9 #define __RAPPTURE_VTKVIS_CONTOUR3D_H__
     8#ifndef VTKVIS_CONTOUR3D_H
     9#define VTKVIS_CONTOUR3D_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2222#include "RpVtkGraphicsObject.h"
    2323
    24 namespace Rappture {
    2524namespace VtkVis {
    2625
     
    6261
    6362    const std::vector<double>& getContourList() const;
     63
     64    void setContourField(const char *name);
    6465
    6566    void setColorMode(ColorMode mode, DataSet::DataAttributeType type,
     
    111112
    112113}
    113 }
    114114
    115115#endif
  • trunk/packages/vizservers/vtkvis/RpCutplane.cpp

    r3542 r3615  
    3232#define MESH_POINT_CLOUDS
    3333
    34 using namespace Rappture::VtkVis;
     34using namespace VtkVis;
    3535
    3636Cutplane::Cutplane() :
  • trunk/packages/vizservers/vtkvis/RpCutplane.h

    r3499 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_CUTPLANE_H__
    9 #define __RAPPTURE_VTKVIS_CUTPLANE_H__
     8#ifndef VTKVIS_CUTPLANE_H
     9#define VTKVIS_CUTPLANE_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2424#include "RpVtkGraphicsObject.h"
    2525
    26 namespace Rappture {
    2726namespace VtkVis {
    2827
     
    124123
    125124}
    126 }
    127125
    128126#endif
  • trunk/packages/vizservers/vtkvis/RpCylinder.cpp

    r3177 r3615  
    1313#include "Trace.h"
    1414
    15 using namespace Rappture::VtkVis;
     15using namespace VtkVis;
    1616
    1717Cylinder::Cylinder() :
  • trunk/packages/vizservers/vtkvis/RpCylinder.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_CYLINDER_H__
    9 #define __RAPPTURE_VTKVIS_CYLINDER_H__
     8#ifndef VTKVIS_CYLINDER_H
     9#define VTKVIS_CYLINDER_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    7877
    7978}
    80 }
    8179
    8280#endif
  • trunk/packages/vizservers/vtkvis/RpDisk.cpp

    r3177 r3615  
    1313#include "Trace.h"
    1414
    15 using namespace Rappture::VtkVis;
     15using namespace VtkVis;
    1616
    1717Disk::Disk() :
  • trunk/packages/vizservers/vtkvis/RpDisk.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_DISK_H__
    9 #define __RAPPTURE_VTKVIS_DISK_H__
     8#ifndef VTKVIS_DISK_H
     9#define VTKVIS_DISK_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    5958
    6059}
    61 }
    6260
    6361#endif
  • trunk/packages/vizservers/vtkvis/RpGlyphs.cpp

    r3330 r3615  
    3131#include "Trace.h"
    3232
    33 using namespace Rappture::VtkVis;
     33using namespace VtkVis;
    3434
    3535Glyphs::Glyphs(GlyphShape shape) :
  • trunk/packages/vizservers/vtkvis/RpGlyphs.h

    r3195 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_GLYPHS_H__
    9 #define __RAPPTURE_VTKVIS_GLYPHS_H__
     8#ifndef VTKVIS_GLYPHS_H
     9#define VTKVIS_GLYPHS_H
    1010
    1111#include <vector>
     
    2222#include "ColorMap.h"
    2323
    24 namespace Rappture {
    2524namespace VtkVis {
    2625
     
    139138
    140139}
    141 }
    142140
    143141#endif
  • trunk/packages/vizservers/vtkvis/RpGroup.cpp

    r3177 r3615  
    99#include "Trace.h"
    1010
    11 using namespace Rappture::VtkVis;
     11using namespace VtkVis;
    1212
    1313Group::Group()
  • trunk/packages/vizservers/vtkvis/RpGroup.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_GROUP_H__
    9 #define __RAPPTURE_VTKVIS_GROUP_H__
     8#ifndef VTKVIS_GROUP_H
     9#define VTKVIS_GROUP_H
    1010
    1111#include <tr1/unordered_map>
     
    1515#include "RpVtkGraphicsObject.h"
    1616
    17 namespace Rappture {
    1817namespace VtkVis {
    1918
     
    6665
    6766}
    68 }
    6967
    7068#endif
  • trunk/packages/vizservers/vtkvis/RpHeightMap.cpp

    r3542 r3615  
    3535#include "Trace.h"
    3636
    37 using namespace Rappture::VtkVis;
     37using namespace VtkVis;
    3838
    3939#define MESH_POINT_CLOUDS
     40#define TRANSLATE_TO_ZORIGIN
    4041
    4142HeightMap::HeightMap(int numContours, double heightScale) :
     
    516517        _warp->SetScaleFactor(_warpScale * _dataScale);
    517518    }
    518 
     519#ifdef TRANSLATE_TO_ZORIGIN
     520    double pos[3];
     521    pos[0] = 0;
     522    pos[1] = 0;
     523    pos[2] = - _warpScale * _dataScale * _dataRange[0];
     524    setPosition(pos);
     525    TRACE("Z_POS: %g", pos[2]);
     526#endif
    519527    _dsActor->SetMapper(_dsMapper);
    520528
     
    670678        _normalsGenerator->ComputePointNormalsOn();
    671679        return _normalsGenerator->GetOutputPort();
    672         //return _warp->GetOutputPort();
    673680    }
    674681}
     
    711718        _normalsGenerator->ComputePointNormalsOn();
    712719        return _normalsGenerator->GetOutputPort();
    713         //return _warp->GetOutputPort();
    714720    }
    715721}
     
    736742        _warp->SetScaleFactor(_warpScale * _dataScale);
    737743    }
    738 
     744#ifdef TRANSLATE_TO_ZORIGIN
     745    double pos[3];
     746    pos[0] = 0;
     747    pos[1] = 0;
     748    pos[2] = - _warpScale * _dataScale * _dataRange[0];
     749    setPosition(pos);
     750    TRACE("Z_POS: %g", pos[2]);
     751#endif
    739752    if (_dsMapper != NULL)
    740753        _dsMapper->Update();
  • trunk/packages/vizservers/vtkvis/RpHeightMap.h

    r3330 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_HEIGHTMAP_H__
    9 #define __RAPPTURE_VTKVIS_HEIGHTMAP_H__
     8#ifndef VTKVIS_HEIGHTMAP_H
     9#define VTKVIS_HEIGHTMAP_H
    1010
    1111#include <vtkSmartPointer.h>
     
    3030#include "RpVtkGraphicsObject.h"
    3131
    32 namespace Rappture {
    3332namespace VtkVis {
    3433
     
    171170
    172171}
    173 }
    174172
    175173#endif
  • trunk/packages/vizservers/vtkvis/RpLIC.cpp

    r3542 r3615  
    2525#include "Trace.h"
    2626
    27 using namespace Rappture::VtkVis;
     27using namespace VtkVis;
    2828
    2929LIC::LIC() :
  • trunk/packages/vizservers/vtkvis/RpLIC.h

    r3542 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_LIC_H__
    9 #define __RAPPTURE_VTKVIS_LIC_H__
     8#ifndef VTKVIS_LIC_H
     9#define VTKVIS_LIC_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2424#include "RpVtkGraphicsObject.h"
    2525
    26 namespace Rappture {
    2726namespace VtkVis {
    2827
     
    7978
    8079}
    81 }
    8280
    8381#endif
  • trunk/packages/vizservers/vtkvis/RpLine.cpp

    r3177 r3615  
    1313#include "Trace.h"
    1414
    15 using namespace Rappture::VtkVis;
     15using namespace VtkVis;
    1616
    1717Line::Line() :
  • trunk/packages/vizservers/vtkvis/RpLine.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_LINE_H__
    9 #define __RAPPTURE_VTKVIS_LINE_H__
     8#ifndef VTKVIS_LINE_H
     9#define VTKVIS_LINE_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    5150
    5251}
    53 }
    5452
    5553#endif
  • trunk/packages/vizservers/vtkvis/RpMath.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_MATH_H__
    9 #define __RAPPTURE_VTKVIS_MATH_H__
     8#ifndef VTKVIS_MATH_H
     9#define VTKVIS_MATH_H
    1010
    1111#include <cmath>
     
    1515#include <vtkMatrix4x4.h>
    1616
    17 namespace Rappture {
    1817namespace VtkVis {
    1918
     
    185184        quat[2]*quat[2] +
    186185        quat[3]*quat[3];
    187     Rappture::VtkVis::quatConjugate(quat, result);
     186    VtkVis::quatConjugate(quat, result);
    188187    for (int i = 0; i < 4; i++) {
    189188        result[i] /= denom;
     
    197196inline double *quatReciprocal(double quat[4])
    198197{
    199     return Rappture::VtkVis::quatReciprocal(quat, quat);
     198    return VtkVis::quatReciprocal(quat, quat);
    200199}
    201200
     
    219218
    220219}
    221 }
    222220
    223221#endif
  • trunk/packages/vizservers/vtkvis/RpMolecule.cpp

    r3330 r3615  
    3535#include "Trace.h"
    3636
    37 using namespace Rappture::VtkVis;
     37using namespace VtkVis;
    3838
    3939Molecule::Molecule() :
  • trunk/packages/vizservers/vtkvis/RpMolecule.h

    r3195 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_MOLECULE_H__
    9 #define __RAPPTURE_VTKVIS_MOLECULE_H__
     8#ifndef VTKVIS_MOLECULE_H
     9#define VTKVIS_MOLECULE_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2424#include "RpVtkGraphicsObject.h"
    2525
    26 namespace Rappture {
    2726namespace VtkVis {
    2827
     
    165164
    166165}
    167 }
    168166
    169167#endif
  • trunk/packages/vizservers/vtkvis/RpOutline.cpp

    r3535 r3615  
    1717#include "Trace.h"
    1818
    19 using namespace Rappture::VtkVis;
     19using namespace VtkVis;
    2020
    2121Outline::Outline() :
  • trunk/packages/vizservers/vtkvis/RpOutline.h

    r3535 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_OUTLINE_H__
    9 #define __RAPPTURE_VTKVIS_OUTLINE_H__
     8#ifndef VTKVIS_OUTLINE_H
     9#define VTKVIS_OUTLINE_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1616#include "RpVtkDataSet.h"
    1717
    18 namespace Rappture {
    1918namespace VtkVis {
    2019
     
    4443
    4544}
    46 }
    4745
    4846#endif
  • trunk/packages/vizservers/vtkvis/RpPolyData.cpp

    r3427 r3615  
    2222#include "Trace.h"
    2323
    24 using namespace Rappture::VtkVis;
     24using namespace VtkVis;
    2525
    2626PolyData::PolyData() :
  • trunk/packages/vizservers/vtkvis/RpPolyData.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_POLYDATA_H__
    9 #define __RAPPTURE_VTKVIS_POLYDATA_H__
     8#ifndef VTKVIS_POLYDATA_H
     9#define VTKVIS_POLYDATA_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1616#include "RpVtkDataSet.h"
    1717
    18 namespace Rappture {
    1918namespace VtkVis {
    2019
     
    4443
    4544}
    46 }
    4745
    4846#endif
  • trunk/packages/vizservers/vtkvis/RpPolygon.cpp

    r3177 r3615  
    1313#include "Trace.h"
    1414
    15 using namespace Rappture::VtkVis;
     15using namespace VtkVis;
    1616
    1717Polygon::Polygon() :
  • trunk/packages/vizservers/vtkvis/RpPolygon.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_POLYGON_H__
    9 #define __RAPPTURE_VTKVIS_POLYGON_H__
     8#ifndef VTKVIS_POLYGON_H
     9#define VTKVIS_POLYGON_H_
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    7170
    7271}
    73 }
    7472
    7573#endif
  • trunk/packages/vizservers/vtkvis/RpPseudoColor.cpp

    r3542 r3615  
    3131#define MESH_POINT_CLOUDS
    3232
    33 using namespace Rappture::VtkVis;
     33using namespace VtkVis;
    3434
    3535PseudoColor::PseudoColor() :
  • trunk/packages/vizservers/vtkvis/RpPseudoColor.h

    r3330 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_PSEUDOCOLOR_H__
    9 #define __RAPPTURE_VTKVIS_PSEUDOCOLOR_H__
     8#ifndef VTKVIS_PSEUDOCOLOR_H
     9#define VTKVIS_PSEUDOCOLOR_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1818#include "RpVtkGraphicsObject.h"
    1919
    20 namespace Rappture {
    2120namespace VtkVis {
    2221
     
    8988
    9089}
    91 }
    9290
    9391#endif
  • trunk/packages/vizservers/vtkvis/RpShape.cpp

    r3177 r3615  
    1818#include "Trace.h"
    1919
    20 using namespace Rappture::VtkVis;
     20using namespace VtkVis;
    2121
    2222Shape::Shape() :
  • trunk/packages/vizservers/vtkvis/RpShape.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_SHAPE_H__
    9 #define __RAPPTURE_VTKVIS_SHAPE_H__
     8#ifndef VTKVIS_SHAPE_H
     9#define VTKVIS_SHAPE_H
    1010
    1111#include <cassert>
     
    1818#include "RpVtkDataSet.h"
    1919
    20 namespace Rappture {
    2120namespace VtkVis {
    2221
     
    5049
    5150}
    52 }
    5351
    5452#endif
  • trunk/packages/vizservers/vtkvis/RpSphere.cpp

    r3177 r3615  
    1919#include "Trace.h"
    2020
    21 using namespace Rappture::VtkVis;
     21using namespace VtkVis;
    2222
    2323Sphere::Sphere() :
  • trunk/packages/vizservers/vtkvis/RpSphere.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_SPHERE_H__
    9 #define __RAPPTURE_VTKVIS_SPHERE_H__
     8#ifndef VTKVIS_SPHERE_H
     9#define VTKVIS_SPHERE_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1717#include "RpVtkDataSet.h"
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    9190
    9291}
    93 }
    9492
    9593#endif
  • trunk/packages/vizservers/vtkvis/RpStreamlines.cpp

    r3525 r3615  
    3434#include "Trace.h"
    3535
    36 using namespace Rappture::VtkVis;
     36using namespace VtkVis;
    3737
    3838Streamlines::Streamlines() :
  • trunk/packages/vizservers/vtkvis/RpStreamlines.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_STREAMLINES_H__
    9 #define __RAPPTURE_VTKVIS_STREAMLINES_H__
     8#ifndef VTKVIS_STREAMLINES_H
     9#define VTKVIS_STREAMLINES_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2222#include "RpVtkDataSet.h"
    2323
    24 namespace Rappture {
    2524namespace VtkVis {
    2625
     
    219218
    220219}
    221 }
    222220
    223221#endif
  • trunk/packages/vizservers/vtkvis/RpTypes.h

    r3330 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_TYPES_H__
    9 #define __RAPPTURE_VTKVIS_TYPES_H__
     8#ifndef VTKVIS_TYPES_H
     9#define VTKVIS_TYPES_H
    1010
    11 namespace Rappture {
    1211namespace VtkVis {
    1312
     
    2524
    2625}
    27 }
    2826
    2927#endif
  • trunk/packages/vizservers/vtkvis/RpVolume.cpp

    r3516 r3615  
    1515#include <vtkVolumeTextureMapper3D.h>
    1616#include <vtkUnstructuredGrid.h>
     17#include <vtkPolyData.h>
    1718#include <vtkCellType.h>
    1819#include <vtkUnstructuredGridVolumeMapper.h>
     
    2526#include "Trace.h"
    2627
    27 using namespace Rappture::VtkVis;
     28using namespace VtkVis;
    2829
    2930Volume::Volume() :
  • trunk/packages/vizservers/vtkvis/RpVolume.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_VOLUME_H__
    9 #define __RAPPTURE_VTKVIS_VOLUME_H__
     8#ifndef VTKVIS_VOLUME_H
     9#define VTKVIS_VOLUME_H
    1010
    1111#include <vtkSmartPointer.h>
     
    1818#include "ColorMap.h"
    1919
    20 namespace Rappture {
    2120namespace VtkVis {
    2221
     
    7069
    7170}
    72 }
    7371
    7472#endif
  • trunk/packages/vizservers/vtkvis/RpVtkDataSet.cpp

    r3360 r3615  
    2828#include "Trace.h"
    2929
    30 using namespace Rappture::VtkVis;
     30using namespace VtkVis;
    3131
    3232DataSet::DataSet(const std::string& name) :
     
    3838    _cellSizeRange[0] = -1;
    3939    _cellSizeRange[1] = -1;
    40     initProp();
    4140}
    4241
    4342DataSet::~DataSet()
    4443{
    45 }
    46 
    47 /**
    48  * \brief Create and initialize a VTK Prop to render the outline
    49  */
    50 void DataSet::initProp()
    51 {
    52     if (_prop == NULL) {
    53         _prop = vtkSmartPointer<vtkActor>::New();
    54         vtkProperty *property = _prop->GetProperty();
    55         property->EdgeVisibilityOff();
    56         property->SetOpacity(_opacity);
    57         property->SetAmbient(.2);
    58         property->LightingOff();
    59         _prop->SetVisibility((_visible ? 1 : 0));
    60     }
    61 }
    62 
    63 /**
    64  * \brief Create and initialize a wireframe outline
    65  */
    66 void DataSet::showOutline(bool state)
    67 {
    68     if (state) {
    69         if (_outlineFilter == NULL) {
    70             _outlineFilter = vtkSmartPointer<vtkOutlineFilter>::New();
    71 #ifdef USE_VTK6
    72             _outlineFilter->SetInputData(_dataSet);
    73 #else
    74             _outlineFilter->SetInput(_dataSet);
    75 #endif
    76         }
    77         if (_outlineMapper == NULL) {
    78             _outlineMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
    79             _outlineMapper->SetInputConnection(_outlineFilter->GetOutputPort());
    80         }
    81         initProp();
    82         _prop->SetMapper(_outlineMapper);
    83     } else {
    84         if (_prop != NULL) {
    85             _prop->SetMapper(NULL);
    86         }
    87         if (_outlineMapper != NULL) {
    88             _outlineMapper = NULL;
    89         }
    90         if (_outlineFilter != NULL) {
    91             _outlineFilter = NULL;
    92         }
    93     }
    94 }
    95 
    96 /**
    97  * \brief Set color of outline bounding box
    98  */
    99 void DataSet::setOutlineColor(float color[3])
    100 {
    101     if (_prop == NULL) {
    102         initProp();
    103     }
    104     _prop->GetProperty()->SetColor(color[0], color[1], color[2]);
    10544}
    10645
     
    11554{
    11655    _opacity = opacity;
    117     if (_prop != NULL) {
    118         _prop->GetProperty()->SetOpacity(opacity);
    119     }
    12056}
    12157
     
    13066{
    13167    _visible = state;
    132     if (_prop != NULL) {
    133         _prop->SetVisibility((state ? 1 : 0));
    134     }
    13568}
    13669
  • trunk/packages/vizservers/vtkvis/RpVtkDataSet.h

    r3330 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_DATASET_H__
    9 #define __RAPPTURE_VTKVIS_DATASET_H__
     8#ifndef VTKVIS_DATASET_H
     9#define VTKVIS_DATASET_H
    1010
    1111#include <vtkSmartPointer.h>
    1212#include <vtkDataSet.h>
    1313#include <vtkDataSetReader.h>
    14 #include <vtkProp.h>
    15 #include <vtkActor.h>
    16 #include <vtkOutlineFilter.h>
    17 #include <vtkPolyDataMapper.h>
    1814
    1915#include <string>
     
    2319#include "Trace.h"
    2420
    25 namespace Rappture {
    2621namespace VtkVis {
    2722
     
    126121    bool getVisibility() const;
    127122
    128     void showOutline(bool state);
    129 
    130     void setOutlineColor(float color[3]);
    131 
    132     void setClippingPlanes(vtkPlaneCollection *planes)
    133     {
    134         if (_outlineMapper != NULL) {
    135             _outlineMapper->SetClippingPlanes(planes);
    136         }
    137     }
    138 
    139     /**
    140      * \brief Return the VTK prop object for the outline
    141      */
    142     inline vtkProp *getProp()
    143     {
    144         return _prop;
    145     }
    146 
    147     /**
    148      * \brief Set 2D aspect ratio scaling
    149      *
    150      * \param aspect 0=no scaling, otherwise aspect
    151      * is horiz/vertical ratio
    152      */
    153     void setAspect(double aspect)
    154     {
    155         double scale[3];
    156         scale[0] = scale[1] = scale[2] = 1.;
    157 
    158         if (aspect == 0.0) {
    159             setScale(scale);
    160             return;
    161         }
    162         if (_dataSet == NULL) {
    163             TRACE("Not setting aspect for empty data set");
    164             return;
    165         }
    166 
    167         PrincipalPlane plane;
    168         if (!is2D(&plane)) {
    169             TRACE("Not setting aspect for 3D data set");
    170             return;
    171         }
    172 
    173         double bounds[6];
    174         getBounds(bounds);
    175 
    176         double size[3];
    177         size[0] = bounds[1] - bounds[0];
    178         size[1] = bounds[3] - bounds[2];
    179         size[2] = bounds[5] - bounds[4];
    180 
    181         if (aspect == 1.0) {
    182             // Square
    183             switch (plane) {
    184             case PLANE_XY: {
    185                 if (size[0] > size[1] && size[1] > 1.0e-6) {
    186                     scale[1] = size[0] / size[1];
    187                 } else if (size[1] > size[0] && size[0] > 1.0e-6) {
    188                     scale[0] = size[1] / size[0];
    189                 }
    190             }
    191                 break;
    192             case PLANE_ZY: {
    193                 if (size[1] > size[2] && size[2] > 1.0e-6) {
    194                     scale[2] = size[1] / size[2];
    195                 } else if (size[2] > size[1] && size[1] > 1.0e-6) {
    196                     scale[1] = size[2] / size[1];
    197                 }
    198             }
    199                 break;
    200             case PLANE_XZ: {
    201                 if (size[0] > size[2] && size[2] > 1.0e-6) {
    202                     scale[2] = size[0] / size[2];
    203                 } else if (size[2] > size[0] && size[0] > 1.0e-6) {
    204                     scale[0] = size[2] / size[0];
    205                 }
    206             }
    207                 break;
    208             default:
    209                 break;
    210             }
    211         } else {
    212             switch (plane) {
    213             case PLANE_XY: {
    214                 if (aspect > 1.0) {
    215                     if (size[0] > size[1]) {
    216                         scale[1] = (size[0] / aspect) / size[1];
    217                     } else {
    218                         scale[0] = (size[1] * aspect) / size[0];
    219                     }
    220                 } else {
    221                     if (size[1] > size[0]) {
    222                         scale[0] = (size[1] * aspect) / size[0];
    223                     } else {
    224                         scale[1] = (size[0] / aspect) / size[1];
    225                     }
    226                 }
    227             }
    228                 break;
    229             case PLANE_ZY: {
    230                 if (aspect > 1.0) {
    231                     if (size[2] > size[1]) {
    232                         scale[1] = (size[2] / aspect) / size[1];
    233                     } else {
    234                         scale[2] = (size[1] * aspect) / size[2];
    235                     }
    236                 } else {
    237                     if (size[1] > size[2]) {
    238                         scale[2] = (size[1] * aspect) / size[2];
    239                     } else {
    240                         scale[1] = (size[2] / aspect) / size[1];
    241                     }
    242                 }
    243             }
    244                 break;
    245             case PLANE_XZ: {
    246                 if (aspect > 1.0) {
    247                     if (size[0] > size[2]) {
    248                         scale[2] = (size[0] / aspect) / size[2];
    249                     } else {
    250                         scale[0] = (size[2] * aspect) / size[0];
    251                     }
    252                 } else {
    253                     if (size[2] > size[0]) {
    254                         scale[0] = (size[2] * aspect) / size[0];
    255                     } else {
    256                         scale[2] = (size[0] / aspect) / size[2];
    257                     }
    258                 }
    259             }
    260             default:
    261                 break;
    262             }
    263         }
    264 
    265         TRACE("obj %g,%g,%g", size[0], size[1], size[2]);
    266         TRACE("Setting scale to %g,%g,%g", scale[0], scale[1], scale[2]);
    267         setScale(scale);
    268     }
    269 
    270     /**
    271      * \brief Get the prop scaling
    272      *
    273      * \param[out] scale Scaling in x,y,z
    274      */
    275     void getScale(double scale[3])
    276     {
    277         if (_prop != NULL) {
    278             _prop->GetScale(scale);
    279         } else {
    280             scale[0] = scale[1] = scale[2] = 1.0;
    281         }
    282     }
    283 
    284     /**
    285      * \brief Set the prop scaling
    286      *
    287      * \param[in] scale Scaling in x,y,z
    288      */
    289     void setScale(double scale[3])
    290     {
    291         if (_prop != NULL) {
    292             _prop->SetScale(scale);
    293         }
    294     }
    295 
    296123    static void print(vtkDataSet *ds);
    297124
     
    302129    void print() const;
    303130
    304     void initProp();
    305 
    306131    std::string _name;
    307132    vtkSmartPointer<vtkDataSet> _dataSet;
     
    310135    double _cellSizeRange[2];
    311136    double _cellSizeAverage;
    312     vtkSmartPointer<vtkOutlineFilter> _outlineFilter;
    313     vtkSmartPointer<vtkActor> _prop;
    314     vtkSmartPointer<vtkPolyDataMapper> _outlineMapper;
    315137};
    316138
    317139}
    318 }
    319140
    320141#endif
  • trunk/packages/vizservers/vtkvis/RpVtkGraphicsObject.cpp

    r3177 r3615  
    1010#include "Trace.h"
    1111
    12 using namespace Rappture::VtkVis;
     12using namespace VtkVis;
    1313
    1414void VtkGraphicsObject::setDataSet(DataSet *dataSet,
  • trunk/packages/vizservers/vtkvis/RpVtkGraphicsObject.h

    r3330 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_VTKGRAPHICSOBJECT_H__
    9 #define __RAPPTURE_VTKVIS_VTKGRAPHICSOBJECT_H__
     8#ifndef VTKVIS_VTKGRAPHICSOBJECT_H
     9#define VTKVIS_VTKGRAPHICSOBJECT_H
    1010
    1111#include <cmath>
     
    2828#include "Trace.h"
    2929
    30 namespace Rappture {
    3130namespace VtkVis {
    3231
     
    931930
    932931}
    933 }
    934932
    935933#endif
  • trunk/packages/vizservers/vtkvis/RpVtkRenderServer.cpp

    r3600 r3615  
    3636#include <md5.h>
    3737
    38 using namespace Rappture::VtkVis;
    39 
    40 Stats Rappture::VtkVis::g_stats;
    41 
    42 int Rappture::VtkVis::g_statsFile = -1; ///< Stats output file descriptor.
    43 int Rappture::VtkVis::g_fdIn = STDIN_FILENO; ///< Input file descriptor
    44 int Rappture::VtkVis::g_fdOut = STDOUT_FILENO; ///< Output file descriptor
    45 FILE *Rappture::VtkVis::g_fOut = stdout; ///< Output file handle
    46 FILE *Rappture::VtkVis::g_fLog = NULL; ///< Trace logging file handle
    47 Renderer *Rappture::VtkVis::g_renderer = NULL; ///< Main render worker
    48 ReadBuffer *Rappture::VtkVis::g_inBufPtr = NULL; ///< Socket read buffer
     38using namespace VtkVis;
     39
     40Stats VtkVis::g_stats;
     41
     42int VtkVis::g_statsFile = -1; ///< Stats output file descriptor.
     43int VtkVis::g_fdIn = STDIN_FILENO; ///< Input file descriptor
     44int VtkVis::g_fdOut = STDOUT_FILENO; ///< Output file descriptor
     45FILE *VtkVis::g_fOut = stdout; ///< Output file handle
     46FILE *VtkVis::g_fLog = NULL; ///< Trace logging file handle
     47Renderer *VtkVis::g_renderer = NULL; ///< Main render worker
     48ReadBuffer *VtkVis::g_inBufPtr = NULL; ///< Socket read buffer
    4949
    5050#ifdef USE_THREADS
     
    216216
    217217int
    218 Rappture::VtkVis::getStatsFile(Tcl_Interp *interp, Tcl_Obj *objPtr)
     218VtkVis::getStatsFile(Tcl_Interp *interp, Tcl_Obj *objPtr)
    219219{
    220220    Tcl_DString ds;
     
    261261
    262262int
    263 Rappture::VtkVis::writeToStatsFile(int f, const char *s, size_t length)
     263VtkVis::writeToStatsFile(int f, const char *s, size_t length)
    264264{
    265265    if (f >= 0) {
     
    498498     * also be used to supply information about the server (version, memory
    499499     * size, etc). */
    500     fprintf(g_fOut, "VtkVis 1.2 (build %s)\n", SVN_VERSION);
     500    fprintf(g_fOut, "VtkVis %s (build %s)\n", VTKVIS_VERSION_STRING, SVN_VERSION);
    501501    fflush(g_fOut);
    502502
     
    505505
    506506    Tcl_Interp *interp = Tcl_CreateInterp();
    507 
    508507    ClientData clientData = NULL;
    509508#ifdef USE_THREADS
    510     ResponseQueue *queue = new ResponseQueue((void *)interp);
     509    ResponseQueue *queue = new ResponseQueue();
    511510    clientData = (ClientData)queue;
    512511    initTcl(interp, clientData);
  • trunk/packages/vizservers/vtkvis/RpVtkRenderServer.h

    r3451 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_RENDERSERVER_H__
    9 #define __RAPPTURE_VTKVIS_RENDERSERVER_H__
     8#ifndef VTKVIS_RENDERSERVER_H
     9#define VTKVIS_RENDERSERVER_H
    1010
    1111#include <sys/types.h>
    1212#include <sys/time.h>
    1313
    14 namespace Rappture {
    1514namespace VtkVis {
    1615
    1716class Renderer;
     17
     18#define VTKVIS_VERSION_STRING "1.3"
    1819
    1920#define MSECS_ELAPSED(t1, t2) \
     
    5152
    5253}
    53 }
    5454
    5555#endif
  • trunk/packages/vizservers/vtkvis/RpVtkRenderer.cpp

    r3535 r3615  
    5050     (((t2).tv_sec - (t1).tv_sec))*1.0e+3 + (double)((t2).tv_usec - (t1).tv_usec)/1.0e+3)
    5151
    52 using namespace Rappture::VtkVis;
     52#define printCameraInfo(camera)                                         \
     53do {                                                                    \
     54    TRACE("pscale: %g, angle: %g, d: %g pos: %g %g %g, fpt: %g %g %g, vup: %g %g %g, clip: %g %g", \
     55          (camera)->GetParallelScale(),                                 \
     56          (camera)->GetViewAngle(),                                     \
     57          (camera)->GetDistance(),                                      \
     58          (camera)->GetPosition()[0],                                   \
     59          (camera)->GetPosition()[1],                                   \
     60          (camera)->GetPosition()[2],                                   \
     61          (camera)->GetFocalPoint()[0],                                 \
     62          (camera)->GetFocalPoint()[1],                                 \
     63          (camera)->GetFocalPoint()[2],                                 \
     64          (camera)->GetViewUp()[0],                                     \
     65          (camera)->GetViewUp()[1],                                     \
     66          (camera)->GetViewUp()[2],                                     \
     67          (camera)->GetClippingRange()[0],                              \
     68          (camera)->GetClippingRange()[1]);                             \
     69} while(0)
     70
     71using namespace VtkVis;
    5372
    5473Renderer::Renderer() :
     
    250269        deleteGraphicsObject<Volume>(itr->second->getName());
    251270        deleteGraphicsObject<Warp>(itr->second->getName());
    252  
    253         if (itr->second->getProp() != NULL) {
    254             _renderer->RemoveViewProp(itr->second->getProp());
    255         }
    256271
    257272        TRACE("After deleting graphics objects");
     
    667682        _cubeAxesActor->GetXAxisRange(&ranges[0]);
    668683    }
     684
    669685    if (_axesRangeMode[Y_AXIS] != RANGE_EXPLICIT) {
    670686        ranges[2] = bounds[2] * _axesScale[Y_AXIS];
     
    21912207void Renderer::setObjectAspects(double aspectRatio)
    21922208{
    2193     for (DataSetHashmap::iterator itr = _dataSets.begin();
    2194          itr != _dataSets.end(); ++itr) {
    2195         itr->second->setAspect(aspectRatio);
    2196     }
    2197 
    21982209    setGraphicsObjectAspect<Arc>(aspectRatio);
    21992210    setGraphicsObjectAspect<Arrow>(aspectRatio);
     
    23962407    setCameraFromMatrix(camera, *trans->GetMatrix());
    23972408
    2398     _renderer->ResetCameraClippingRange();
     2409    resetCameraClippingRange();
    23992410    printCameraInfo(camera);
    24002411    _needsRedraw = true;
     
    24162427    camera->SetFocalPoint(focalPoint);
    24172428    camera->SetViewUp(viewUp);
    2418     _renderer->ResetCameraClippingRange();
     2429    resetCameraClippingRange();
    24192430    _needsRedraw = true;
    24202431}
     
    24562467void Renderer::resetCamera(bool resetOrientation)
    24572468{
     2469    TRACE("Enter: %d", resetOrientation ? 1 : 0);
    24582470    vtkSmartPointer<vtkCamera> camera = _renderer->GetActiveCamera();
    24592471    if (_cameraMode == IMAGE) {
     
    24772489            _needsAxesReset = false;
    24782490        }
    2479         _renderer->ResetCamera();
    2480         _renderer->ResetCameraClippingRange();
     2491        resetVtkCamera();
    24812492        //computeScreenWorldCoords();
    24822493    }
     
    24932504void Renderer::resetVtkCamera(double *bounds)
    24942505{
     2506    TRACE("Enter: bounds: %p", bounds);
    24952507    if (bounds != NULL)
    24962508        _renderer->ResetCamera(bounds);
    24972509    else
    24982510        _renderer->ResetCamera();
     2511    printCameraInfo(_renderer->GetActiveCamera());
    24992512}
    25002513
     
    25052518{
    25062519    _renderer->ResetCameraClippingRange();
     2520    vtkSmartPointer<vtkCamera> camera = _renderer->GetActiveCamera();
     2521    //double dist = camera->GetClippingRange()[0] + (camera->GetClippingRange()[1] - camera->GetClippingRange()[0])/2.0;
     2522    //camera->SetDistance(dist);
     2523    printCameraInfo(camera);
    25072524}
    25082525
     
    25222539    //camera->SetPitch(pitch); // Rotate about camera
    25232540    camera->Roll(roll); // Roll about camera view axis
    2524     _renderer->ResetCameraClippingRange();
     2541    resetCameraClippingRange();
    25252542    //computeScreenWorldCoords();
    25262543    _needsRedraw = true;
     
    26232640                                motionVector[2] + viewPoint[2]);
    26242641
    2625             _renderer->ResetCameraClippingRange();
     2642            resetCameraClippingRange();
    26262643            //computeScreenWorldCoords();
    26272644        }
     
    26772694        // Change ortho parallel scale
    26782695        camera->SetParallelScale(camera->GetParallelScale()/z);
    2679         _renderer->ResetCameraClippingRange();
     2696        resetCameraClippingRange();
    26802697        //computeScreenWorldCoords();
    26812698    }
     
    31083125    bounds[5] = -DBL_MAX;
    31093126
    3110     for (DataSetHashmap::iterator itr = _dataSets.begin();
    3111              itr != _dataSets.end(); ++itr) {
    3112         if ((!onlyVisible || itr->second->getVisibility()) &&
    3113             itr->second->getProp() != NULL)
    3114             mergeBounds(bounds, bounds, itr->second->getProp()->GetBounds());
    3115     }
    3116 
    31173127    mergeGraphicsObjectBounds<Arc>(bounds, onlyVisible);
    31183128    mergeGraphicsObjectBounds<Arrow>(bounds, onlyVisible);
     
    31833193    bounds[4] = DBL_MAX;
    31843194    bounds[5] = -DBL_MAX;
    3185 
    3186     for (DataSetHashmap::iterator itr = _dataSets.begin();
    3187              itr != _dataSets.end(); ++itr) {
    3188         if ((!onlyVisible || itr->second->getVisibility()) &&
    3189             itr->second->getProp() != NULL) {
    3190             double dsBounds[6];
    3191             itr->second->getBounds(dsBounds);
    3192             mergeBounds(bounds, bounds, dsBounds);
    3193         }
    3194     }
    31953195
    31963196    mergeGraphicsObjectUnscaledBounds<Arc>(bounds, onlyVisible);
     
    38483848        resetAxes(bounds);
    38493849        //_renderer->ResetCamera(bounds);
    3850         _renderer->ResetCamera();
    3851         _renderer->ResetCameraClippingRange();
     3850        resetVtkCamera();
    38523851        //computeScreenWorldCoords();
    38533852        break;
     
    38563855        resetAxes(bounds);
    38573856        //_renderer->ResetCamera(bounds);
    3858         _renderer->ResetCamera();
    3859         _renderer->ResetCameraClippingRange();
     3857        resetVtkCamera();
    38603858        //computeScreenWorldCoords();
    38613859        break;
     
    38693867}
    38703868
     3869#if 0
    38713870/**
    38723871 * \brief Print debugging info about a vtkCamera
     
    38903889          camera->GetClippingRange()[1]);
    38913890}
     3891#endif
    38923892
    38933893/**
     
    40164016
    40174017/**
    4018  * \brief Toggle rendering of actors' bounding box
    4019  */
    4020 void Renderer::setDataSetShowBounds(const DataSetId& id, bool state)
    4021 {
    4022     DataSetHashmap::iterator itr;
    4023 
    4024     bool doAll = false;
    4025 
    4026     if (id.compare("all") == 0) {
    4027         itr = _dataSets.begin();
    4028         if (itr == _dataSets.end())
    4029             return;
    4030         doAll = true;
    4031     } else {
    4032         itr = _dataSets.find(id);
    4033     }
    4034     if (itr == _dataSets.end()) {
    4035         ERROR("Unknown dataset %s", id.c_str());
    4036         return;
    4037     }
    4038 
    4039     do {
    4040         if (!state && itr->second->getProp()) {
    4041             _renderer->RemoveViewProp(itr->second->getProp());
    4042         }
    4043 
    4044         itr->second->showOutline(state);
    4045 
    4046         if (state && !_renderer->HasViewProp(itr->second->getProp())) {
    4047             _renderer->AddViewProp(itr->second->getProp());
    4048         }
    4049     } while (doAll && ++itr != _dataSets.end());
    4050 
    4051     sceneBoundsChanged();
    4052     _needsRedraw = true;
    4053 }
    4054 
    4055 /**
    4056  * \brief Set color of outline bounding box
    4057  */
    4058 void Renderer::setDataSetOutlineColor(const DataSetId& id, float color[3])
    4059 {
    4060     DataSetHashmap::iterator itr;
    4061 
    4062     bool doAll = false;
    4063 
    4064     if (id.compare("all") == 0) {
    4065         itr = _dataSets.begin();
    4066         if (itr == _dataSets.end())
    4067             return;
    4068         doAll = true;
    4069     } else {
    4070         itr = _dataSets.find(id);
    4071     }
    4072     if (itr == _dataSets.end()) {
    4073         ERROR("Unknown dataset %s", id.c_str());
    4074         return;
    4075     }
    4076 
    4077     do {
    4078         itr->second->setOutlineColor(color);
    4079     } while (doAll && ++itr != _dataSets.end());
    4080 
    4081     _needsRedraw = true;
    4082 }
    4083 
    4084 /**
    40854018 * \brief Set a user clipping plane
    40864019 *
     
    41994132     * Mappers already using the PlaneCollection
    42004133     */
    4201     // First set clip planes for DataSet bounding boxes
    4202     for (DataSetHashmap::iterator itr = _dataSets.begin();
    4203          itr != _dataSets.end(); ++itr) {
    4204         itr->second->setClippingPlanes(_activeClipPlanes);
    4205     }
    4206 
    42074134    setGraphicsObjectClippingPlanes<Arc>(_activeClipPlanes);
    42084135    setGraphicsObjectClippingPlanes<Arrow>(_activeClipPlanes);
     
    42644191bool Renderer::render()
    42654192{
     4193    TRACE("Enter: redraw: %d axesReset: %d cameraReset: %d clippingRangeReset: %d",
     4194          _needsRedraw ? 1 : 0, _needsAxesReset ? 1 : 0, _needsCameraReset ? 1 : 0, _needsCameraClippingRangeReset ? 1 : 0);
    42664195    if (_needsRedraw) {
    42674196         if (_needsAxesReset) {
  • trunk/packages/vizservers/vtkvis/RpVtkRenderer.h

    r3542 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_RENDERER_H__
    9 #define __RAPPTURE_VTKVIS_RENDERER_H__
     8#ifndef VTKVIS_RENDERER_H
     9#define VTKVIS_RENDERER_H
    1010
    1111#include <string>
     
    5757#define TARGA_BYTES_PER_PIXEL 3
    5858
    59 namespace Rappture {
    6059namespace VtkVis {
    6160
     
    138137
    139138    bool getVectorValue(const DataSetId& id, double x, double y, double z, double vector[3]);
    140 
    141     void setDataSetShowBounds(const DataSetId& id, bool state);
    142 
    143     void setDataSetOutlineColor(const DataSetId& id, float color[3]);
    144139
    145140    void setDataSetOpacity(const DataSetId& id, double opacity);
     
    577572    bool addContour2D(const DataSetId& id, const std::vector<double>& contours);
    578573
     574    void setContour2DContourField(const DataSetId& id, const char *fieldName);
     575
    579576    void setContour2DNumContours(const DataSetId& id, int numContours);
    580577
     
    595592
    596593    bool addContour3D(const DataSetId& id, const std::vector<double>& contours);
     594
     595    void setContour3DContourField(const DataSetId& id, const char *fieldName);
    597596
    598597    void setContour3DNumContours(const DataSetId& id, int numContours);
     
    851850    void _setCameraZoomRegion(double x, double y, double width, double height);
    852851
    853     static void printCameraInfo(vtkCamera *camera);
     852    //static void printCameraInfo(vtkCamera *camera);
    854853
    855854    static void setCameraFromMatrix(vtkCamera *camera, vtkMatrix4x4 &mat);
     
    994993
    995994}
    996 }
    997995
    998996#endif
  • trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.cpp

    r3542 r3615  
    3232#endif
    3333
    34 using namespace Rappture::VtkVis;
     34using namespace VtkVis;
    3535
    3636static int lastCmdStatus;
     
    3838#ifdef USE_THREADS
    3939void
    40 Rappture::VtkVis::queueResponse(ClientData clientData,
    41                                 const void *bytes, size_t len,
    42                                 Response::AllocationType allocType,
    43                                 Response::ResponseType type)
     40VtkVis::queueResponse(ClientData clientData,
     41                      const void *bytes, size_t len,
     42                      Response::AllocationType allocType,
     43                      Response::ResponseType type)
    4444{
    4545    ResponseQueue *queue = (ResponseQueue *)clientData;
     
    21272127    char buf[BUFSIZ];
    21282128    const char *string;
    2129     int f;
    2130     int i;
    21312129    int length;
    21322130    int result;
     
    21352133    /* Use the initial client key value pairs as the parts for a generating
    21362134     * a unique file name. */
    2137     f = Rappture::VtkVis::getStatsFile(interp, objv[1]);
    2138     if (f < 0) {
     2135    int fd = VtkVis::getStatsFile(interp, objv[1]);
     2136    if (fd < 0) {
    21392137        Tcl_AppendResult(interp, "can't open stats file: ",
    21402138                         Tcl_PosixError(interp), (char *)NULL);
     
    21692167    /* date */
    21702168    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj("date", 4));
    2171     strcpy(buf, ctime(&Rappture::VtkVis::g_stats.start.tv_sec));
     2169    strcpy(buf, ctime(&VtkVis::g_stats.start.tv_sec));
    21722170    buf[strlen(buf) - 1] = '\0';
    21732171    Tcl_ListObjAppendElement(interp, listObjPtr, Tcl_NewStringObj(buf, -1));
    21742172    /* date_secs */
    21752173    Tcl_ListObjAppendElement(interp, listObjPtr,
    2176                 Tcl_NewStringObj("date_secs", 9));
     2174                             Tcl_NewStringObj("date_secs", 9));
    21772175    Tcl_ListObjAppendElement(interp, listObjPtr,
    2178                 Tcl_NewLongObj(Rappture::VtkVis::g_stats.start.tv_sec));
     2176                             Tcl_NewLongObj(VtkVis::g_stats.start.tv_sec));
    21792177    /* Client arguments. */
    21802178    if (Tcl_ListObjGetElements(interp, objv[1], &numItems, &items) != TCL_OK) {
    21812179        return TCL_ERROR;
    21822180    }
    2183     for (i = 0; i < numItems; i++) {
     2181    for (int i = 0; i < numItems; i++) {
    21842182        Tcl_ListObjAppendElement(interp, listObjPtr, items[i]);
    21852183    }
     
    21882186    Tcl_DStringAppend(&ds, string, length);
    21892187    Tcl_DStringAppend(&ds, "\n", 1);
    2190     result = Rappture::VtkVis::writeToStatsFile(f, Tcl_DStringValue(&ds),
    2191                                                 Tcl_DStringLength(&ds));
     2188    result = VtkVis::writeToStatsFile(fd, Tcl_DStringValue(&ds),
     2189                                      Tcl_DStringLength(&ds));
    21922190    Tcl_DStringFree(&ds);
    21932191    Tcl_DecrRefCount(listObjPtr);
     
    31613159
    31623160static int
     3161Contour3DContourFieldOp(ClientData clientData, Tcl_Interp *interp, int objc,
     3162                        Tcl_Obj *const *objv)
     3163{
     3164    const char *fieldName = Tcl_GetString(objv[2]);
     3165    if (objc == 4) {
     3166        const char *dataSetName = Tcl_GetString(objv[3]);
     3167        g_renderer->setContour3DContourField(dataSetName, fieldName);
     3168    } else {
     3169        g_renderer->setContour3DContourField("all", fieldName);
     3170    }
     3171    return TCL_OK;
     3172}
     3173
     3174static int
    31633175Contour3DContourListOp(ClientData clientData, Tcl_Interp *interp, int objc,
    31643176                       Tcl_Obj *const *objv)
     
    34053417    {"colormap",     7, Contour3DColorMapOp, 3, 4, "colorMapName ?dataSetName?"},
    34063418    {"colormode",    7, Contour3DColorModeOp, 4, 5, "mode fieldName ?dataSetName?"},
    3407     {"contourlist",  3, Contour3DContourListOp, 3, 4, "contourList ?dataSetName?"},
     3419    {"contourfield", 8, Contour3DContourFieldOp, 3, 4, "fieldName ?dataSetName?"},
     3420    {"contourlist",  8, Contour3DContourListOp, 3, 4, "contourList ?dataSetName?"},
    34083421    {"delete",       1, Contour3DDeleteOp, 2, 3, "?dataSetName?"},
    34093422    {"edges",        1, Contour3DEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"},
     
    45354548
    45364549static int
    4537 DataSetOutlineOp(ClientData clientData, Tcl_Interp *interp, int objc,
     4550DataSetVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc,
    45384551                 Tcl_Obj *const *objv)
    45394552{
     
    45444557    if (objc == 4) {
    45454558        const char *name = Tcl_GetString(objv[3]);
    4546         g_renderer->setDataSetShowBounds(name, state);
    4547     } else {
    4548         g_renderer->setDataSetShowBounds("all", state);
    4549     }
    4550     return TCL_OK;
    4551 }
    4552 
    4553 static int
    4554 DataSetOutlineColorOp(ClientData clientData, Tcl_Interp *interp, int objc,
    4555                       Tcl_Obj *const *objv)
    4556 {
    4557     float color[3];
    4558     if (GetFloatFromObj(interp, objv[2], &color[0]) != TCL_OK ||
    4559         GetFloatFromObj(interp, objv[3], &color[1]) != TCL_OK ||
    4560         GetFloatFromObj(interp, objv[4], &color[2]) != TCL_OK) {
    4561         return TCL_ERROR;
    4562     }
    4563     if (objc == 6) {
    4564         const char *name = Tcl_GetString(objv[5]);
    4565         g_renderer->setDataSetOutlineColor(name, color);
    4566     } else {
    4567         g_renderer->setDataSetOutlineColor("all", color);
    4568     }
    4569     return TCL_OK;
    4570 }
    4571 
    4572 static int
    4573 DataSetVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc,
    4574                  Tcl_Obj *const *objv)
    4575 {
    4576     bool state;
    4577     if (GetBooleanFromObj(interp, objv[2], &state) != TCL_OK) {
    4578         return TCL_ERROR;
    4579     }
    4580     if (objc == 4) {
    4581         const char *name = Tcl_GetString(objv[3]);
    45824559        g_renderer->setDataSetVisibility(name, state);
    45834560    } else {
     
    45894566static Rappture::CmdSpec dataSetOps[] = {
    45904567    {"add",       1, DataSetAddOp, 6, 6, "name data follows nBytes"},
    4591     {"color",     1, DataSetOutlineColorOp, 5, 6, "r g b ?name?"},
    45924568    {"delete",    1, DataSetDeleteOp, 2, 3, "?name?"},
    45934569    {"getscalar", 4, DataSetGetScalarOp, 6, 7, "oper x y ?z? name"},
     
    45964572    {"names",     1, DataSetNamesOp, 2, 2, ""},
    45974573    {"opacity",   2, DataSetOpacityOp, 3, 4, "value ?name?"},
    4598     {"outline",   2, DataSetOutlineOp, 3, 4, "bool ?name?"},
    45994574    {"scalar",    1, DataSetActiveScalarsOp, 3, 4, "scalarName ?name?"},
    46004575    {"vector",    2, DataSetActiveVectorsOp, 3, 4, "vectorName ?name?"},
     
    60035978static int
    60045979ImageFlushCmd(ClientData clientData, Tcl_Interp *interp, int objc,
    6005              Tcl_Obj *const *objv)
     5980              Tcl_Obj *const *objv)
    60065981{
    60075982    lastCmdStatus = TCL_BREAK;
     
    1002710002 */
    1002810003int
    10029 Rappture::VtkVis::processCommands(Tcl_Interp *interp,
    10030                                   ClientData clientData,
    10031                                   ReadBuffer *inBufPtr,
    10032                                   int fdOut)
     10004VtkVis::processCommands(Tcl_Interp *interp,
     10005                        ClientData clientData,
     10006                        ReadBuffer *inBufPtr,
     10007                        int fdOut)
    1003310008{
    1003410009    int ret = 1;
     
    1009810073 */
    1009910074int
    10100 Rappture::VtkVis::handleError(Tcl_Interp *interp,
    10101                               ClientData clientData,
    10102                               int status, int fdOut)
     10075VtkVis::handleError(Tcl_Interp *interp,
     10076                    ClientData clientData,
     10077                    int status, int fdOut)
    1010310078{
    1010410079    const char *string;
     
    1015510130 */
    1015610131void
    10157 Rappture::VtkVis::initTcl(Tcl_Interp *interp, ClientData clientData)
     10132VtkVis::initTcl(Tcl_Interp *interp, ClientData clientData)
    1015810133{
    1015910134    Tcl_MakeSafe(interp);
     
    1019410169 * \brief Delete Tcl commands and interpreter
    1019510170 */
    10196 void Rappture::VtkVis::exitTcl(Tcl_Interp *interp)
     10171void VtkVis::exitTcl(Tcl_Interp *interp)
    1019710172{
    1019810173    Tcl_DeleteCommand(interp, "arc");
  • trunk/packages/vizservers/vtkvis/RpVtkRendererCmd.h

    r3451 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_RENDERERCMD_H__
    9 #define __RAPPTURE_VTKVIS_RENDERERCMD_H__
     8#ifndef VTKVIS_RENDERERCMD_H
     9#define VTKVIS_RENDERERCMD_H
    1010
    1111#include <cstdio>
     
    1717#endif
    1818
    19 namespace Rappture {
    2019namespace VtkVis {
    2120
     
    4241
    4342}
    44 }
    4543
    4644#endif
  • trunk/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.cpp

    r3542 r3615  
    3636
    3737// Template specializations
    38 namespace Rappture {
    3938namespace VtkVis {
    4039
     
    260259
    261260}
    262 }
    263 
    264 using namespace Rappture::VtkVis;
     261
     262using namespace VtkVis;
    265263
    266264/**
     
    585583
    586584/**
     585 * \brief Set the number of equally spaced isosurfaces for the given DataSet
     586 */
     587void Renderer::setContour2DContourField(const DataSetId& id, const char *fieldName)
     588{
     589    Contour2DHashmap::iterator itr;
     590
     591    bool doAll = false;
     592
     593    if (id.compare("all") == 0) {
     594        itr = _contour2Ds.begin();
     595        doAll = true;
     596    } else {
     597        itr = _contour2Ds.find(id);
     598    }
     599    if (itr == _contour2Ds.end()) {
     600        ERROR("Contour2D not found: %s", id.c_str());
     601        return;
     602    }
     603
     604    do {
     605        itr->second->setContourField(fieldName);
     606     } while (doAll && ++itr != _contour2Ds.end());
     607
     608    sceneBoundsChanged();
     609    _needsRedraw = true;
     610}
     611
     612/**
    587613 * \brief Set a list of isovalues for the given DataSet
    588614 */
     
    767793    _needsRedraw = true;
    768794    return true;
     795}
     796
     797/**
     798 * \brief Set the number of equally spaced isosurfaces for the given DataSet
     799 */
     800void Renderer::setContour3DContourField(const DataSetId& id, const char *fieldName)
     801{
     802    Contour3DHashmap::iterator itr;
     803
     804    bool doAll = false;
     805
     806    if (id.compare("all") == 0) {
     807        itr = _contour3Ds.begin();
     808        doAll = true;
     809    } else {
     810        itr = _contour3Ds.find(id);
     811    }
     812    if (itr == _contour3Ds.end()) {
     813        ERROR("Contour3D not found: %s", id.c_str());
     814        return;
     815    }
     816
     817    do {
     818        itr->second->setContourField(fieldName);
     819     } while (doAll && ++itr != _contour3Ds.end());
     820
     821    sceneBoundsChanged();
     822    _needsRedraw = true;
    769823}
    770824
  • trunk/packages/vizservers/vtkvis/RpVtkRendererGraphicsObjs.h

    r3542 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_RENDERER_GRAPHICS_OBJS_H__
    9 #define __RAPPTURE_VTKVIS_RENDERER_GRAPHICS_OBJS_H__
     8#ifndef VTKVIS_RENDERER_GRAPHICS_OBJS_H
     9#define VTKVIS_RENDERER_GRAPHICS_OBJS_H
    1010
    1111#include <tr1/unordered_map>
     
    4040#include "RpVtkRenderer.h"
    4141
    42 namespace Rappture {
    4342namespace VtkVis {
    4443
     
    10251024
    10261025}
    1027 }
    10281026
    10291027#endif
  • trunk/packages/vizservers/vtkvis/RpWarp.cpp

    r3542 r3615  
    3232#define MESH_POINT_CLOUDS
    3333
    34 using namespace Rappture::VtkVis;
     34using namespace VtkVis;
    3535
    3636Warp::Warp() :
  • trunk/packages/vizservers/vtkvis/RpWarp.h

    r3542 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_WARP_H__
    9 #define __RAPPTURE_VTKVIS_WARP_H__
     8#ifndef VTKVIS_WARP_H
     9#define VTKVIS_WARP_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2121#include "RpVtkGraphicsObject.h"
    2222
    23 namespace Rappture {
    2423namespace VtkVis {
    2524
     
    108107
    109108}
    110 }
    111109
    112110#endif
  • trunk/packages/vizservers/vtkvis/TGAWriter.cpp

    r3177 r3615  
    3737 */
    3838void
    39 Rappture::VtkVis::queueTGA(ResponseQueue *queue, const char *cmdName,
    40                            const unsigned char *data,
    41                            int width, int height,
    42                            int bytesPerPixel)
     39VtkVis::queueTGA(ResponseQueue *queue, const char *cmdName,
     40                 const unsigned char *data,
     41                 int width, int height,
     42                 int bytesPerPixel)
    4343{
    4444    TRACE("(%dx%d)\n", width, height);
     
    102102 */
    103103void
    104 Rappture::VtkVis::writeTGA(int fd, const char *cmdName,
    105                            const unsigned char *data,
    106                            int width, int height,
    107                            int bytesPerPixel)
     104VtkVis::writeTGA(int fd, const char *cmdName,
     105                 const unsigned char *data,
     106                 int width, int height,
     107                 int bytesPerPixel)
    108108{
    109109    TRACE("(%dx%d)\n", width, height);
     
    169169 */
    170170void
    171 Rappture::VtkVis::writeTGAFile(const char *filename,
    172                                const unsigned char *imgData,
    173                                int width, int height,
    174                                int bytesPerPixel,
    175                                bool srcIsRGB)
     171VtkVis::writeTGAFile(const char *filename,
     172                     const unsigned char *imgData,
     173                     int width, int height,
     174                     int bytesPerPixel,
     175                     bool srcIsRGB)
    176176{
    177177    TRACE("%s (%dx%d)\n", filename, width, height);
  • trunk/packages/vizservers/vtkvis/TGAWriter.h

    r3177 r3615  
    66 */
    77
    8 #ifndef __RAPPTURE_VTKVIS_TGAWRITER_H__
    9 #define __RAPPTURE_VTKVIS_TGAWRITER_H__
     8#ifndef VTKVIS_TGAWRITER_H
     9#define VTKVIS_TGAWRITER_H
    1010
    1111#ifdef USE_THREADS
     
    1313#endif
    1414
    15 namespace Rappture {
    1615namespace VtkVis {
    1716#ifdef USE_THREADS
     
    3130                  int bytesPerPixel, bool srcIsRGB = false);
    3231}
    33 }
    3432
    3533#endif
  • trunk/packages/vizservers/vtkvis/Trace.cpp

    r3360 r3615  
    1616#include "Trace.h"
    1717
    18 using namespace Rappture::VtkVis;
     18using namespace VtkVis;
    1919
    2020static std::ostringstream g_UserErrorString;
     
    2626 */
    2727void
    28 Rappture::VtkVis::initLog()
     28VtkVis::initLog()
    2929{
    3030    openlog("vtkvis", LOG_CONS | LOG_PERROR | LOG_PID,  LOG_USER);
     
    3535 */
    3636void
    37 Rappture::VtkVis::closeLog()
     37VtkVis::closeLog()
    3838{
    3939    closelog();
     
    4444 */
    4545void
    46 Rappture::VtkVis::logMessage(int priority, const char *funcname,
    47                              const char *path, int lineNum, const char* fmt, ...)
     46VtkVis::logMessage(int priority, const char *funcname,
     47                   const char *path, int lineNum, const char* fmt, ...)
    4848{
    4949    char message[MSG_LEN + 1];
     
    7474 */
    7575void
    76 Rappture::VtkVis::logUserMessage(const char* fmt, ...)
     76VtkVis::logUserMessage(const char* fmt, ...)
    7777{
    7878    char message[MSG_LEN + 1];
     
    8989
    9090const char *
    91 Rappture::VtkVis::getUserMessages()
     91VtkVis::getUserMessages()
    9292{
    9393    return g_UserErrorString.str().c_str();
     
    9595
    9696void
    97 Rappture::VtkVis::clearUserMessages()
     97VtkVis::clearUserMessages()
    9898{
    9999    g_UserErrorString.str(std::string());
  • trunk/packages/vizservers/vtkvis/Trace.h

    r3360 r3615  
    66 */
    77
    8 #ifndef __TRACE_H__
    9 #define __TRACE_H__
     8#ifndef VTKVIS_TRACE_H
     9#define VTKVIS_TRACE_H
    1010
    1111#include <syslog.h>
    1212
    13 namespace Rappture {
    1413namespace VtkVis {
    1514
     
    2726                       int lineNum, const char* format, ...);
    2827
    29 #define ERROR(...)      Rappture::VtkVis::logMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     28#define ERROR(...)      VtkVis::logMessage(LOG_ERR, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
    3029#ifdef WANT_TRACE
    31 #define TRACE(...)      Rappture::VtkVis::logMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     30#define TRACE(...)      VtkVis::logMessage(LOG_DEBUG, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
    3231#else
    3332#define TRACE(...)
    3433#endif  /*WANT_TRACE*/
    35 #define WARN(...)       Rappture::VtkVis::logMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
    36 #define INFO(...)       Rappture::VtkVis::logMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     34#define WARN(...)       VtkVis::logMessage(LOG_WARNING, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
     35#define INFO(...)       VtkVis::logMessage(LOG_INFO, __FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
    3736
    38 #define USER_ERROR(...) Rappture::VtkVis::logUserMessage(__VA_ARGS__)
     37#define USER_ERROR(...) VtkVis::logUserMessage(__VA_ARGS__)
    3938
    40 }
    4139}
    4240
  • trunk/packages/vizservers/vtkvis/protocol.txt

    r3542 r3615  
    186186       resets to default.
    187187
     188clientinfo <list>
     189
    188190colormap add <colorMapName> <colorMap> <opacityMap>
    189191         colorMap = Tcl list of {value r g b} control points
     
    195197
    196198dataset add <datasetName> data follows <nbytes>
    197 dataset color <r> <g> <b> <?datasetName?>
    198         Set color of outline bounding box
    199199dataset delete <?datasetName?>
    200200dataset getscalar world <x> <y> <z> <datasetName>
     
    222222        Returns a list of the loaded data sets
    223223dataset opacity <val> <?datasetName?>
    224 dataset outline <bool> <?datasetName?>
    225         Toggle wireframe outline of dataset's bounding box
    226224dataset scalar <scalarName> <?datasetName?>
    227225        Set the active scalar field to plot
  • trunk/packages/vizservers/vtkvis/vtkRpCubeAxesActor.cpp

    r3586 r3615  
    2828#include "vtkTextProperty.h"
    2929#include "vtkViewport.h"
     30
     31#include "Trace.h"
    3032
    3133vtkStandardNewMacro(vtkRpCubeAxesActor);
     
    20042006  customizedLabels = this->AxisLabels[axis];
    20052007
     2008  //TRACE("sortedRange[0]: %g %g", sortedRange[0], this->FFix(sortedRange[0]*(1./major)) - sortedRange[0]*(1./major));
     2009
    20062010  if (customizedLabels == NULL)
    20072011    {
     
    20582062    }
    20592063
     2064  //TRACE("range majorStart: %g major: %g", majorStart, major);
     2065
    20602066  double t;
    20612067  t = (minorStart - sortedRange[0])/range;
     
    20662072  minor *= scale;
    20672073  major *= scale;
     2074
     2075  //TRACE("bounds majorStart: %g major: %g", majorStart, major);
    20682076
    20692077  // Set major start and delta for the corresponding cube axis
Note: See TracChangeset for help on using the changeset viewer.