Changeset 3861


Ignore:
Timestamp:
Aug 8, 2013, 3:59:21 PM (11 years ago)
Author:
ldelgass
Message:

Fix spelling of parallelepiped, silently fix left-handed ordering of vectors

Location:
trunk/packages/vizservers/vtkvis
Files:
6 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/Makefile.in

    r3859 r3861  
    147147                Molecule.cpp \
    148148                Outline.cpp \
    149                 Parallelpiped.cpp \
     149                Parallelepiped.cpp \
    150150                PolyData.cpp \
    151151                Polygon.cpp \
     
    231231Molecule.o: Molecule.h MoleculeData.h GraphicsObject.h DataSet.h Renderer.h ColorMap.h Trace.h
    232232Outline.o: Outline.h GraphicsObject.h DataSet.h Trace.h
    233 Parallelpiped.o: Parallelpiped.h Shape.h GraphicsObject.h DataSet.h Renderer.h Trace.h
     233Parallelepiped.o: Parallelepiped.h Shape.h GraphicsObject.h DataSet.h Renderer.h Trace.h
    234234PolyData.o: PolyData.h GraphicsObject.h DataSet.h Renderer.h Trace.h
    235235Polygon.o: Polygon.h Shape.h GraphicsObject.h DataSet.h Renderer.h Trace.h
     
    237237PseudoColor.o: PseudoColor.h GraphicsObject.h DataSet.h Renderer.h ColorMap.h Trace.h
    238238ReadBuffer.o: ReadBuffer.h Trace.h
    239 Renderer.o: Renderer.h RendererGraphicsObjs.h vtkRpCubeAxesActor.h vtkRpAxisFollower.h vtkRpAxisActor.h Math.h DataSet.h Arc.h Arrow.h Box.h Cone.h Contour2D.h Contour3D.h Cutplane.h Cylinder.h Disk.h Glyphs.h Group.h HeightMap.h Image.h LIC.h Line.h Molecule.h Outline.h Parallelpiped.h PolyData.h Polygon.h PseudoColor.h Sphere.h Streamlines.h Text3D.h Volume.h Warp.h ColorMap.h Trace.h
    240 RendererCmd.o: Renderer.h RendererGraphicsObjs.h vtkRpCubeAxesActor.h vtkRpAxisFollower.h vtkRpAxisActor.h DataSet.h Arc.h Arrow.h Box.h Cone.h Contour2D.h Contour3D.h Cutplane.h Cylinder.h Disk.h Glyphs.h Group.h HeightMap.h Image.h LIC.h Line.h Molecule.h Outline.h Parallelpiped.h PolyData.h Polygon.h PseudoColor.h Sphere.h Streamlines.h Text3D.h Volume.h Warp.h ColorMap.h ReadBuffer.h ResponseQueue.h Trace.h CmdProc.h PPMWriter.h TGAWriter.h
    241 RendererGraphicsObjs.o: Renderer.h RendererGraphicsObjs.h DataSet.h Arc.h Arrow.h Box.h Cone.h Contour2D.h Contour3D.h Cutplane.h Cylinder.h Disk.h Glyphs.h Group.h HeightMap.h Image.h LIC.h Line.h Molecule.h Outline.h Parallelpiped.h PolyData.h Polygon.h PseudoColor.h Sphere.h Streamlines.h Text3D.h Volume.h Warp.h ColorMap.h Trace.h
     239Renderer.o: Renderer.h RendererGraphicsObjs.h vtkRpCubeAxesActor.h vtkRpAxisFollower.h vtkRpAxisActor.h Math.h DataSet.h Arc.h Arrow.h Box.h Cone.h Contour2D.h Contour3D.h Cutplane.h Cylinder.h Disk.h Glyphs.h Group.h HeightMap.h Image.h LIC.h Line.h Molecule.h Outline.h Parallelepiped.h PolyData.h Polygon.h PseudoColor.h Sphere.h Streamlines.h Text3D.h Volume.h Warp.h ColorMap.h Trace.h
     240RendererCmd.o: Renderer.h RendererGraphicsObjs.h vtkRpCubeAxesActor.h vtkRpAxisFollower.h vtkRpAxisActor.h DataSet.h Arc.h Arrow.h Box.h Cone.h Contour2D.h Contour3D.h Cutplane.h Cylinder.h Disk.h Glyphs.h Group.h HeightMap.h Image.h LIC.h Line.h Molecule.h Outline.h Parallelepiped.h PolyData.h Polygon.h PseudoColor.h Sphere.h Streamlines.h Text3D.h Volume.h Warp.h ColorMap.h ReadBuffer.h ResponseQueue.h Trace.h CmdProc.h PPMWriter.h TGAWriter.h
     241RendererGraphicsObjs.o: Renderer.h RendererGraphicsObjs.h DataSet.h Arc.h Arrow.h Box.h Cone.h Contour2D.h Contour3D.h Cutplane.h Cylinder.h Disk.h Glyphs.h Group.h HeightMap.h Image.h LIC.h Line.h Molecule.h Outline.h Parallelepiped.h PolyData.h Polygon.h PseudoColor.h Sphere.h Streamlines.h Text3D.h Volume.h Warp.h ColorMap.h Trace.h
    242242RenderServer.o: RenderServer.h RendererCmd.h Renderer.h vtkRpCubeAxesActor.h vtkRpAxisFollower.h vtkRpAxisActor.h ReadBuffer.h ResponseQueue.h Trace.h PPMWriter.h TGAWriter.h
    243243ResponseQueue.o: ResponseQueue.h Trace.h
  • trunk/packages/vizservers/vtkvis/Parallelepiped.cpp

    r3860 r3861  
    1717#include <vtkCubeSource.h>
    1818#include <vtkReverseSense.h>
     19#include <vtkVector.h>
    1920
    20 #include "Parallelpiped.h"
     21#include "Parallelepiped.h"
    2122#include "Trace.h"
    2223
    2324using namespace VtkVis;
    2425
    25 Parallelpiped::Parallelpiped() :
     26Parallelepiped::Parallelepiped() :
    2627    Shape()
    2728{
    2829}
    2930
    30 Parallelpiped::~Parallelpiped()
     31Parallelepiped::~Parallelepiped()
    3132{
    32     TRACE("Deleting Parallelpiped");
     33    TRACE("Deleting Parallelepiped");
    3334}
    3435
    35 void Parallelpiped::update()
     36void Parallelepiped::update()
    3637{
    3738    if (_box == NULL) {
     
    6566
    6667/**
    67  * \brief Create parallelpiped from 3 basis vectors
     68 * \brief Create parallelepiped from 3 basis vectors
    6869 *
    6970 * This method expects the order of vectors to define a right-handed coordinate
    7071 * system, so ((vec1 cross vec2) dot vec3) should be positive.
    7172 */
    72 void Parallelpiped::setVectors(double vec1[3], double vec2[3], double vec3[3])
     73void Parallelepiped::setVectors(double vec1[3], double vec2[3], double vec3[3])
    7374{
     75    vtkVector3d v1(vec1);
     76    vtkVector3d v2(vec2);
     77    vtkVector3d v3(vec3);
     78    vtkVector3d tmp = v1.Cross(v2);
     79    if (tmp.Dot(v3) < 0) {
     80        // Got left-handed system, convert to right-handed
     81        v2.Set(vec1[0], vec1[1], vec1[2]);
     82        v1.Set(vec2[0], vec2[1], vec2[2]);
     83    }
     84    TRACE("v1: %g %g %g", v1[0], v1[1], v1[2]);
     85    TRACE("v2: %g %g %g", v2[0], v2[1], v2[2]);
     86    TRACE("v3: %g %g %g", v3[0], v3[1], v3[2]);
    7487    double matrix[16];
    7588    memset(matrix, 0, sizeof(double)*16);
    76     matrix[0] = vec1[0];
    77     matrix[4] = vec1[1];
    78     matrix[8] = vec1[2];
    79     matrix[1] = vec2[0];
    80     matrix[5] = vec2[1];
    81     matrix[9] = vec2[2];
    82     matrix[2] = vec3[0];
    83     matrix[6] = vec3[1];
    84     matrix[10] = vec3[2];
     89    matrix[0] = v1[0];
     90    matrix[4] = v1[1];
     91    matrix[8] = v1[2];
     92    matrix[1] = v2[0];
     93    matrix[5] = v2[1];
     94    matrix[9] = v2[2];
     95    matrix[2] = v3[0];
     96    matrix[6] = v3[1];
     97    matrix[10] = v3[2];
    8598    matrix[15] = 1;
    8699    _transform->SetMatrix(matrix);
    87100}
    88101
    89 void Parallelpiped::flipNormals(bool state)
     102void Parallelepiped::flipNormals(bool state)
    90103{
    91104    if (_box == NULL || _pdMapper == NULL)
  • trunk/packages/vizservers/vtkvis/Parallelepiped.h

    r3860 r3861  
    66 */
    77
    8 #ifndef VTKVIS_PARALLELPIPED_H
    9 #define VTKVIS_PARALLELPIPED_H
     8#ifndef VTKVIS_PARALLELEPIPED_H
     9#define VTKVIS_PARALLELEPIPED_H
    1010
    1111#include <vtkSmartPointer.h>
     
    2121
    2222/**
    23  * \brief VTK PolyData Parallelpiped
     23 * \brief VTK PolyData Parallelepiped
    2424 *
    25  * This class creates a mesh parallelpiped
     25 * This class creates a mesh parallelepiped
    2626 */
    27 class Parallelpiped : public Shape
     27class Parallelepiped : public Shape
    2828{
    2929public:
    30     Parallelpiped();
    31     virtual ~Parallelpiped();
     30    Parallelepiped();
     31    virtual ~Parallelepiped();
    3232
    3333    virtual const char *getClassName() const
    3434    {
    35         return "Parallelpiped";
     35        return "Parallelepiped";
    3636    }
    3737
  • trunk/packages/vizservers/vtkvis/Renderer.cpp

    r3859 r3861  
    197197    deleteAllGraphicsObjects<Molecule>();
    198198    deleteAllGraphicsObjects<Outline>();
    199     deleteAllGraphicsObjects<Parallelpiped>();
     199    deleteAllGraphicsObjects<Parallelepiped>();
    200200    deleteAllGraphicsObjects<PolyData>();
    201201    deleteAllGraphicsObjects<Polygon>();
     
    24372437    setGraphicsObjectAspect<Molecule>(aspectRatio);
    24382438    setGraphicsObjectAspect<Outline>(aspectRatio);
    2439     setGraphicsObjectAspect<Parallelpiped>(aspectRatio);
     2439    setGraphicsObjectAspect<Parallelepiped>(aspectRatio);
    24402440    setGraphicsObjectAspect<PolyData>(aspectRatio);
    24412441    setGraphicsObjectAspect<Polygon>(aspectRatio);
     
    33593359    mergeGraphicsObjectBounds<Molecule>(bounds, onlyVisible);
    33603360    mergeGraphicsObjectBounds<Outline>(bounds, onlyVisible);
    3361     mergeGraphicsObjectBounds<Parallelpiped>(bounds, onlyVisible);
     3361    mergeGraphicsObjectBounds<Parallelepiped>(bounds, onlyVisible);
    33623362    mergeGraphicsObjectBounds<PolyData>(bounds, onlyVisible);
    33633363    mergeGraphicsObjectBounds<Polygon>(bounds, onlyVisible);
     
    34323432    mergeGraphicsObjectUnscaledBounds<Outline>(bounds, onlyVisible);
    34333433    mergeGraphicsObjectUnscaledBounds<PolyData>(bounds, onlyVisible);
    3434     mergeGraphicsObjectUnscaledBounds<Parallelpiped>(bounds, onlyVisible);
     3434    mergeGraphicsObjectUnscaledBounds<Parallelepiped>(bounds, onlyVisible);
    34353435    mergeGraphicsObjectUnscaledBounds<Polygon>(bounds, onlyVisible);
    34363436    mergeGraphicsObjectUnscaledBounds<PseudoColor>(bounds, onlyVisible);
     
    45814581    setGraphicsObjectClippingPlanes<Molecule>(_activeClipPlanes);
    45824582    setGraphicsObjectClippingPlanes<Outline>(_activeClipPlanes);
    4583     setGraphicsObjectClippingPlanes<Parallelpiped>(_activeClipPlanes);
     4583    setGraphicsObjectClippingPlanes<Parallelepiped>(_activeClipPlanes);
    45844584    setGraphicsObjectClippingPlanes<PolyData>(_activeClipPlanes);
    45854585    setGraphicsObjectClippingPlanes<Polygon>(_activeClipPlanes);
  • trunk/packages/vizservers/vtkvis/Renderer.h

    r3859 r3861  
    4545#include "Molecule.h"
    4646#include "Outline.h"
    47 #include "Parallelpiped.h"
     47#include "Parallelepiped.h"
    4848#include "PolyData.h"
    4949#include "Polygon.h"
     
    810810                              const char *name, double range[2] = NULL);
    811811
    812     // Parallelpipeds
    813 
    814     bool addParallelpiped(const DataSetId& id, double vec1[3], double vec2[3], double vec3[3],
    815                           bool flipNormals = false);
     812    // Parallelepipeds
     813
     814    bool addParallelepiped(const DataSetId& id, double vec1[3], double vec2[3], double vec3[3],
     815                           bool flipNormals = false);
    816816
    817817    // PolyData meshes
     
    981981    typedef std::tr1::unordered_map<DataSetId, Molecule *> MoleculeHashmap;
    982982    typedef std::tr1::unordered_map<DataSetId, Outline *> OutlineHashmap;
    983     typedef std::tr1::unordered_map<DataSetId, Parallelpiped *> ParallelpipedHashmap;
     983    typedef std::tr1::unordered_map<DataSetId, Parallelepiped *> ParallelepipedHashmap;
    984984    typedef std::tr1::unordered_map<DataSetId, PolyData *> PolyDataHashmap;
    985985    typedef std::tr1::unordered_map<DataSetId, Polygon *> PolygonHashmap;
     
    11211121    MoleculeHashmap _molecules;
    11221122    OutlineHashmap _outlines;
    1123     ParallelpipedHashmap _parallelpipeds;
     1123    ParallelepipedHashmap _parallelepipeds;
    11241124    PolyDataHashmap _polyDatas;
    11251125    PolygonHashmap _polygons;
  • trunk/packages/vizservers/vtkvis/RendererCmd.cpp

    r3859 r3861  
    85598559
    85608560static int
    8561 ParallelpipedAddOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8562                    Tcl_Obj *const *objv)
     8561ParallelepipedAddOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8562                    Tcl_Obj *const *objv)
    85638563{
    85648564    double vec1[3], vec2[3], vec3[3];
     
    85758575    }
    85768576    const char *name = Tcl_GetString(objv[11]);
    8577     if (!g_renderer->addParallelpiped(name, vec1, vec2, vec3)) {
    8578         Tcl_AppendResult(interp, "Failed to create parallelpiped", (char*)NULL);
    8579         return TCL_ERROR;
    8580     }
    8581     return TCL_OK;
    8582 }
    8583 
    8584 static int
    8585 ParallelpipedDeleteOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8586                       Tcl_Obj *const *objv)
     8577    if (!g_renderer->addParallelepiped(name, vec1, vec2, vec3)) {
     8578        Tcl_AppendResult(interp, "Failed to create parallelepiped", (char*)NULL);
     8579        return TCL_ERROR;
     8580    }
     8581    return TCL_OK;
     8582}
     8583
     8584static int
     8585ParallelepipedDeleteOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8586                       Tcl_Obj *const *objv)
    85878587{
    85888588    if (objc == 3) {
    85898589        const char *name = Tcl_GetString(objv[2]);
    8590         g_renderer->deleteGraphicsObject<Parallelpiped>(name);
    8591     } else {
    8592         g_renderer->deleteGraphicsObject<Parallelpiped>("all");
    8593     }
    8594     return TCL_OK;
    8595 }
    8596 
    8597 static int
    8598 ParallelpipedColorOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8599                      Tcl_Obj *const *objv)
     8590        g_renderer->deleteGraphicsObject<Parallelepiped>(name);
     8591    } else {
     8592        g_renderer->deleteGraphicsObject<Parallelepiped>("all");
     8593    }
     8594    return TCL_OK;
     8595}
     8596
     8597static int
     8598ParallelepipedColorOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8599                      Tcl_Obj *const *objv)
    86008600{
    86018601    float color[3];
     
    86078607    if (objc == 6) {
    86088608        const char *name = Tcl_GetString(objv[5]);
    8609         g_renderer->setGraphicsObjectColor<Parallelpiped>(name, color);
    8610     } else {
    8611         g_renderer->setGraphicsObjectColor<Parallelpiped>("all", color);
    8612     }
    8613     return TCL_OK;
    8614 }
    8615 
    8616 static int
    8617 ParallelpipedCullingOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8618                        Tcl_Obj *const *objv)
     8609        g_renderer->setGraphicsObjectColor<Parallelepiped>(name, color);
     8610    } else {
     8611        g_renderer->setGraphicsObjectColor<Parallelepiped>("all", color);
     8612    }
     8613    return TCL_OK;
     8614}
     8615
     8616static int
     8617ParallelepipedCullingOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8618                        Tcl_Obj *const *objv)
    86198619{
    86208620    bool state;
     
    86248624    if (objc == 4) {
    86258625        const char *name = Tcl_GetString(objv[3]);
    8626         g_renderer->setGraphicsObjectCulling<Parallelpiped>(name, state);
    8627     } else {
    8628         g_renderer->setGraphicsObjectCulling<Parallelpiped>("all", state);
    8629     }
    8630     return TCL_OK;
    8631 }
    8632 
    8633 static int
    8634 ParallelpipedEdgeVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8635                               Tcl_Obj *const *objv)
     8626        g_renderer->setGraphicsObjectCulling<Parallelepiped>(name, state);
     8627    } else {
     8628        g_renderer->setGraphicsObjectCulling<Parallelepiped>("all", state);
     8629    }
     8630    return TCL_OK;
     8631}
     8632
     8633static int
     8634ParallelepipedEdgeVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8635                               Tcl_Obj *const *objv)
    86368636{
    86378637    bool state;
     
    86418641    if (objc == 4) {
    86428642        const char *name = Tcl_GetString(objv[3]);
    8643         g_renderer->setGraphicsObjectEdgeVisibility<Parallelpiped>(name, state);
    8644     } else {
    8645         g_renderer->setGraphicsObjectEdgeVisibility<Parallelpiped>("all", state);
    8646     }
    8647     return TCL_OK;
    8648 }
    8649 
    8650 static int
    8651 ParallelpipedFlipNormalsOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8652                            Tcl_Obj *const *objv)
     8643        g_renderer->setGraphicsObjectEdgeVisibility<Parallelepiped>(name, state);
     8644    } else {
     8645        g_renderer->setGraphicsObjectEdgeVisibility<Parallelepiped>("all", state);
     8646    }
     8647    return TCL_OK;
     8648}
     8649
     8650static int
     8651ParallelepipedFlipNormalsOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8652                            Tcl_Obj *const *objv)
    86538653{
    86548654    bool state;
     
    86588658    if (objc == 4) {
    86598659        const char *name = Tcl_GetString(objv[3]);
    8660         g_renderer->setGraphicsObjectFlipNormals<Parallelpiped>(name, state);
    8661     } else {
    8662         g_renderer->setGraphicsObjectFlipNormals<Parallelpiped>("all", state);
    8663     }
    8664     return TCL_OK;
    8665 }
    8666 
    8667 static int
    8668 ParallelpipedLightingOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8669                         Tcl_Obj *const *objv)
     8660        g_renderer->setGraphicsObjectFlipNormals<Parallelepiped>(name, state);
     8661    } else {
     8662        g_renderer->setGraphicsObjectFlipNormals<Parallelepiped>("all", state);
     8663    }
     8664    return TCL_OK;
     8665}
     8666
     8667static int
     8668ParallelepipedLightingOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8669                         Tcl_Obj *const *objv)
    86708670{
    86718671    bool state;
     
    86758675    if (objc == 4) {
    86768676        const char *name = Tcl_GetString(objv[3]);
    8677         g_renderer->setGraphicsObjectLighting<Parallelpiped>(name, state);
    8678     } else {
    8679         g_renderer->setGraphicsObjectLighting<Parallelpiped>("all", state);
    8680     }
    8681     return TCL_OK;
    8682 }
    8683 
    8684 static int
    8685 ParallelpipedLineColorOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8686                          Tcl_Obj *const *objv)
     8677        g_renderer->setGraphicsObjectLighting<Parallelepiped>(name, state);
     8678    } else {
     8679        g_renderer->setGraphicsObjectLighting<Parallelepiped>("all", state);
     8680    }
     8681    return TCL_OK;
     8682}
     8683
     8684static int
     8685ParallelepipedLineColorOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8686                          Tcl_Obj *const *objv)
    86878687{
    86888688    float color[3];
     
    86948694    if (objc == 6) {
    86958695        const char *name = Tcl_GetString(objv[5]);
    8696         g_renderer->setGraphicsObjectEdgeColor<Parallelpiped>(name, color);
    8697     } else {
    8698         g_renderer->setGraphicsObjectEdgeColor<Parallelpiped>("all", color);
    8699     }
    8700     return TCL_OK;
    8701 }
    8702 
    8703 static int
    8704 ParallelpipedLineWidthOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8705                          Tcl_Obj *const *objv)
     8696        g_renderer->setGraphicsObjectEdgeColor<Parallelepiped>(name, color);
     8697    } else {
     8698        g_renderer->setGraphicsObjectEdgeColor<Parallelepiped>("all", color);
     8699    }
     8700    return TCL_OK;
     8701}
     8702
     8703static int
     8704ParallelepipedLineWidthOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8705                          Tcl_Obj *const *objv)
    87068706{
    87078707    float width;
     
    87118711    if (objc == 4) {
    87128712        const char *name = Tcl_GetString(objv[3]);
    8713         g_renderer->setGraphicsObjectEdgeWidth<Parallelpiped>(name, width);
    8714     } else {
    8715         g_renderer->setGraphicsObjectEdgeWidth<Parallelpiped>("all", width);
    8716     }
    8717     return TCL_OK;
    8718 }
    8719 
    8720 static int
    8721 ParallelpipedMaterialOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8722                         Tcl_Obj *const *objv)
     8713        g_renderer->setGraphicsObjectEdgeWidth<Parallelepiped>(name, width);
     8714    } else {
     8715        g_renderer->setGraphicsObjectEdgeWidth<Parallelepiped>("all", width);
     8716    }
     8717    return TCL_OK;
     8718}
     8719
     8720static int
     8721ParallelepipedMaterialOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8722                         Tcl_Obj *const *objv)
    87238723{
    87248724    double ambient, diffuse, specCoeff, specPower;
     
    87328732    if (objc == 7) {
    87338733        const char *name = Tcl_GetString(objv[6]);
    8734         g_renderer->setGraphicsObjectAmbient<Parallelpiped>(name, ambient);
    8735         g_renderer->setGraphicsObjectDiffuse<Parallelpiped>(name, diffuse);
    8736         g_renderer->setGraphicsObjectSpecular<Parallelpiped>(name, specCoeff, specPower);
    8737     } else {
    8738         g_renderer->setGraphicsObjectAmbient<Parallelpiped>("all", ambient);
    8739         g_renderer->setGraphicsObjectDiffuse<Parallelpiped>("all", diffuse);
    8740         g_renderer->setGraphicsObjectSpecular<Parallelpiped>("all", specCoeff, specPower);
    8741     }
    8742     return TCL_OK;
    8743 }
    8744 
    8745 static int
    8746 ParallelpipedOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8747                        Tcl_Obj *const *objv)
     8734        g_renderer->setGraphicsObjectAmbient<Parallelepiped>(name, ambient);
     8735        g_renderer->setGraphicsObjectDiffuse<Parallelepiped>(name, diffuse);
     8736        g_renderer->setGraphicsObjectSpecular<Parallelepiped>(name, specCoeff, specPower);
     8737    } else {
     8738        g_renderer->setGraphicsObjectAmbient<Parallelepiped>("all", ambient);
     8739        g_renderer->setGraphicsObjectDiffuse<Parallelepiped>("all", diffuse);
     8740        g_renderer->setGraphicsObjectSpecular<Parallelepiped>("all", specCoeff, specPower);
     8741    }
     8742    return TCL_OK;
     8743}
     8744
     8745static int
     8746ParallelepipedOpacityOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8747                        Tcl_Obj *const *objv)
    87488748{
    87498749    double opacity;
     
    87538753    if (objc == 4) {
    87548754        const char *name = Tcl_GetString(objv[3]);
    8755         g_renderer->setGraphicsObjectOpacity<Parallelpiped>(name, opacity);
    8756     } else {
    8757         g_renderer->setGraphicsObjectOpacity<Parallelpiped>("all", opacity);
    8758     }
    8759     return TCL_OK;
    8760 }
    8761 
    8762 static int
    8763 ParallelpipedOrientOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8764                       Tcl_Obj *const *objv)
     8755        g_renderer->setGraphicsObjectOpacity<Parallelepiped>(name, opacity);
     8756    } else {
     8757        g_renderer->setGraphicsObjectOpacity<Parallelepiped>("all", opacity);
     8758    }
     8759    return TCL_OK;
     8760}
     8761
     8762static int
     8763ParallelepipedOrientOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8764                       Tcl_Obj *const *objv)
    87658765{
    87668766    double quat[4];
     
    87738773    if (objc == 7) {
    87748774        const char *name = Tcl_GetString(objv[6]);
    8775         g_renderer->setGraphicsObjectOrientation<Parallelpiped>(name, quat);
    8776     } else {
    8777         g_renderer->setGraphicsObjectOrientation<Parallelpiped>("all", quat);
    8778     }
    8779     return TCL_OK;
    8780 }
    8781 
    8782 static int
    8783 ParallelpipedOriginOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8784                       Tcl_Obj *const *objv)
     8775        g_renderer->setGraphicsObjectOrientation<Parallelepiped>(name, quat);
     8776    } else {
     8777        g_renderer->setGraphicsObjectOrientation<Parallelepiped>("all", quat);
     8778    }
     8779    return TCL_OK;
     8780}
     8781
     8782static int
     8783ParallelepipedOriginOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8784                       Tcl_Obj *const *objv)
    87858785{
    87868786    double origin[3];
     
    87928792    if (objc == 6) {
    87938793        const char *name = Tcl_GetString(objv[5]);
    8794         g_renderer->setGraphicsObjectOrigin<Parallelpiped>(name, origin);
    8795     } else {
    8796         g_renderer->setGraphicsObjectOrigin<Parallelpiped>("all", origin);
    8797     }
    8798     return TCL_OK;
    8799 }
    8800 
    8801 static int
    8802 ParallelpipedPositionOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8803                         Tcl_Obj *const *objv)
     8794        g_renderer->setGraphicsObjectOrigin<Parallelepiped>(name, origin);
     8795    } else {
     8796        g_renderer->setGraphicsObjectOrigin<Parallelepiped>("all", origin);
     8797    }
     8798    return TCL_OK;
     8799}
     8800
     8801static int
     8802ParallelepipedPositionOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8803                         Tcl_Obj *const *objv)
    88048804{
    88058805    double pos[3];
     
    88118811    if (objc == 6) {
    88128812        const char *name = Tcl_GetString(objv[5]);
    8813         g_renderer->setGraphicsObjectPosition<Parallelpiped>(name, pos);
    8814     } else {
    8815         g_renderer->setGraphicsObjectPosition<Parallelpiped>("all", pos);
    8816     }
    8817     return TCL_OK;
    8818 }
    8819 
    8820 static int
    8821 ParallelpipedScaleOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8822                      Tcl_Obj *const *objv)
     8813        g_renderer->setGraphicsObjectPosition<Parallelepiped>(name, pos);
     8814    } else {
     8815        g_renderer->setGraphicsObjectPosition<Parallelepiped>("all", pos);
     8816    }
     8817    return TCL_OK;
     8818}
     8819
     8820static int
     8821ParallelepipedScaleOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8822                      Tcl_Obj *const *objv)
    88238823{
    88248824    double scale[3];
     
    88308830    if (objc == 6) {
    88318831        const char *name = Tcl_GetString(objv[5]);
    8832         g_renderer->setGraphicsObjectScale<Parallelpiped>(name, scale);
    8833     } else {
    8834         g_renderer->setGraphicsObjectScale<Parallelpiped>("all", scale);
    8835     }
    8836     return TCL_OK;
    8837 }
    8838 
    8839 static int
    8840 ParallelpipedShadingOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8841                        Tcl_Obj *const *objv)
     8832        g_renderer->setGraphicsObjectScale<Parallelepiped>(name, scale);
     8833    } else {
     8834        g_renderer->setGraphicsObjectScale<Parallelepiped>("all", scale);
     8835    }
     8836    return TCL_OK;
     8837}
     8838
     8839static int
     8840ParallelepipedShadingOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8841                        Tcl_Obj *const *objv)
    88428842{
    88438843    GraphicsObject::ShadingModel shadeModel;
     
    88548854    if (objc == 4) {
    88558855        const char *name = Tcl_GetString(objv[3]);
    8856         g_renderer->setGraphicsObjectShadingModel<Parallelpiped>(name, shadeModel);
    8857     } else {
    8858         g_renderer->setGraphicsObjectShadingModel<Parallelpiped>("all", shadeModel);
    8859     }
    8860     return TCL_OK;
    8861 }
    8862 
    8863 static int
    8864 ParallelpipedVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8865                        Tcl_Obj *const *objv)
     8856        g_renderer->setGraphicsObjectShadingModel<Parallelepiped>(name, shadeModel);
     8857    } else {
     8858        g_renderer->setGraphicsObjectShadingModel<Parallelepiped>("all", shadeModel);
     8859    }
     8860    return TCL_OK;
     8861}
     8862
     8863static int
     8864ParallelepipedVisibleOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8865                        Tcl_Obj *const *objv)
    88668866{
    88678867    bool state;
     
    88718871    if (objc == 4) {
    88728872        const char *name = Tcl_GetString(objv[3]);
    8873         g_renderer->setGraphicsObjectVisibility<Parallelpiped>(name, state);
    8874     } else {
    8875         g_renderer->setGraphicsObjectVisibility<Parallelpiped>("all", state);
    8876     }
    8877     return TCL_OK;
    8878 }
    8879 
    8880 static int
    8881 ParallelpipedWireframeOp(ClientData clientData, Tcl_Interp *interp, int objc,
    8882                          Tcl_Obj *const *objv)
     8873        g_renderer->setGraphicsObjectVisibility<Parallelepiped>(name, state);
     8874    } else {
     8875        g_renderer->setGraphicsObjectVisibility<Parallelepiped>("all", state);
     8876    }
     8877    return TCL_OK;
     8878}
     8879
     8880static int
     8881ParallelepipedWireframeOp(ClientData clientData, Tcl_Interp *interp, int objc,
     8882                          Tcl_Obj *const *objv)
    88838883{
    88848884    bool state;
     
    88888888    if (objc == 4) {
    88898889        const char *name = Tcl_GetString(objv[3]);
    8890         g_renderer->setGraphicsObjectWireframe<Parallelpiped>(name, state);
    8891     } else {
    8892         g_renderer->setGraphicsObjectWireframe<Parallelpiped>("all", state);
    8893     }
    8894     return TCL_OK;
    8895 }
    8896 
    8897 static Rappture::CmdSpec parallelpipedOps[] = {
    8898     {"add",       1, ParallelpipedAddOp, 12, 12, "v0x v0y v0z v1x v1y v1z v2x v2y v2z name"},
    8899     {"color",     2, ParallelpipedColorOp, 5, 6, "r g b ?name?"},
    8900     {"culling",   2, ParallelpipedCullingOp, 3, 4, "bool ?name?"},
    8901     {"delete",    1, ParallelpipedDeleteOp, 2, 3, "?name?"},
    8902     {"edges",     1, ParallelpipedEdgeVisibilityOp, 3, 4, "bool ?name?"},
    8903     {"flipnorms", 1, ParallelpipedFlipNormalsOp, 3, 4, "bool ?name?"},
    8904     {"lighting",  3, ParallelpipedLightingOp, 3, 4, "bool ?name?"},
    8905     {"linecolor", 5, ParallelpipedLineColorOp, 5, 6, "r g b ?name?"},
    8906     {"linewidth", 5, ParallelpipedLineWidthOp, 3, 4, "width ?name?"},
    8907     {"material",  1, ParallelpipedMaterialOp, 6, 7, "ambientCoeff diffuseCoeff specularCoeff specularPower ?name?"},
    8908     {"opacity",   2, ParallelpipedOpacityOp, 3, 4, "value ?name?"},
    8909     {"orient",    4, ParallelpipedOrientOp, 6, 7, "qw qx qy qz ?name?"},
    8910     {"origin",    4, ParallelpipedOriginOp, 5, 6, "x y z ?name?"},
    8911     {"pos",       1, ParallelpipedPositionOp, 5, 6, "x y z ?name?"},
    8912     {"scale",     2, ParallelpipedScaleOp, 5, 6, "sx sy sz ?name?"},
    8913     {"shading",   2, ParallelpipedShadingOp, 3, 4, "val ?name?"},
    8914     {"visible",   1, ParallelpipedVisibleOp, 3, 4, "bool ?name?"},
    8915     {"wireframe", 1, ParallelpipedWireframeOp, 3, 4, "bool ?name?"}
     8890        g_renderer->setGraphicsObjectWireframe<Parallelepiped>(name, state);
     8891    } else {
     8892        g_renderer->setGraphicsObjectWireframe<Parallelepiped>("all", state);
     8893    }
     8894    return TCL_OK;
     8895}
     8896
     8897static Rappture::CmdSpec parallelepipedOps[] = {
     8898    {"add",       1, ParallelepipedAddOp, 12, 12, "v0x v0y v0z v1x v1y v1z v2x v2y v2z name"},
     8899    {"color",     2, ParallelepipedColorOp, 5, 6, "r g b ?name?"},
     8900    {"culling",   2, ParallelepipedCullingOp, 3, 4, "bool ?name?"},
     8901    {"delete",    1, ParallelepipedDeleteOp, 2, 3, "?name?"},
     8902    {"edges",     1, ParallelepipedEdgeVisibilityOp, 3, 4, "bool ?name?"},
     8903    {"flipnorms", 1, ParallelepipedFlipNormalsOp, 3, 4, "bool ?name?"},
     8904    {"lighting",  3, ParallelepipedLightingOp, 3, 4, "bool ?name?"},
     8905    {"linecolor", 5, ParallelepipedLineColorOp, 5, 6, "r g b ?name?"},
     8906    {"linewidth", 5, ParallelepipedLineWidthOp, 3, 4, "width ?name?"},
     8907    {"material",  1, ParallelepipedMaterialOp, 6, 7, "ambientCoeff diffuseCoeff specularCoeff specularPower ?name?"},
     8908    {"opacity",   2, ParallelepipedOpacityOp, 3, 4, "value ?name?"},
     8909    {"orient",    4, ParallelepipedOrientOp, 6, 7, "qw qx qy qz ?name?"},
     8910    {"origin",    4, ParallelepipedOriginOp, 5, 6, "x y z ?name?"},
     8911    {"pos",       1, ParallelepipedPositionOp, 5, 6, "x y z ?name?"},
     8912    {"scale",     2, ParallelepipedScaleOp, 5, 6, "sx sy sz ?name?"},
     8913    {"shading",   2, ParallelepipedShadingOp, 3, 4, "val ?name?"},
     8914    {"visible",   1, ParallelepipedVisibleOp, 3, 4, "bool ?name?"},
     8915    {"wireframe", 1, ParallelepipedWireframeOp, 3, 4, "bool ?name?"}
    89168916};
    8917 static int nParallelpipedOps = NumCmdSpecs(parallelpipedOps);
    8918 
    8919 static int
    8920 ParallelpipedCmd(ClientData clientData, Tcl_Interp *interp, int objc,
     8917static int nParallelepipedOps = NumCmdSpecs(parallelepipedOps);
     8918
     8919static int
     8920ParallelepipedCmd(ClientData clientData, Tcl_Interp *interp, int objc,
    89218921       Tcl_Obj *const *objv)
    89228922{
    89238923    Tcl_ObjCmdProc *proc;
    89248924
    8925     proc = Rappture::GetOpFromObj(interp, nParallelpipedOps, parallelpipedOps,
     8925    proc = Rappture::GetOpFromObj(interp, nParallelepipedOps, parallelepipedOps,
    89268926                                  Rappture::CMDSPEC_ARG1, objc, objv, 0);
    89278927    if (proc == NULL) {
     
    1260112601{
    1260212602    Tcl_MakeSafe(interp);
    12603     Tcl_CreateObjCommand(interp, "arc",           ArcCmd,           clientData, NULL);
    12604     Tcl_CreateObjCommand(interp, "arrow",         ArrowCmd,         clientData, NULL);
    12605     Tcl_CreateObjCommand(interp, "axis",          AxisCmd,          clientData, NULL);
    12606     Tcl_CreateObjCommand(interp, "box",           BoxCmd,           clientData, NULL);
    12607     Tcl_CreateObjCommand(interp, "camera",        CameraCmd,        clientData, NULL);
    12608     Tcl_CreateObjCommand(interp, "clientinfo",    ClientInfoCmd,    clientData, NULL);
    12609     Tcl_CreateObjCommand(interp, "colormap",      ColorMapCmd,      clientData, NULL);
    12610     Tcl_CreateObjCommand(interp, "cone",          ConeCmd,          clientData, NULL);
    12611     Tcl_CreateObjCommand(interp, "contour2d",     Contour2DCmd,     clientData, NULL);
    12612     Tcl_CreateObjCommand(interp, "contour3d",     Contour3DCmd,     clientData, NULL);
    12613     Tcl_CreateObjCommand(interp, "cutplane",      CutplaneCmd,      clientData, NULL);
    12614     Tcl_CreateObjCommand(interp, "cylinder",      CylinderCmd,      clientData, NULL);
    12615     Tcl_CreateObjCommand(interp, "dataset",       DataSetCmd,       clientData, NULL);
    12616     Tcl_CreateObjCommand(interp, "disk",          DiskCmd,          clientData, NULL);
    12617     Tcl_CreateObjCommand(interp, "glyphs",        GlyphsCmd,        clientData, NULL);
    12618     Tcl_CreateObjCommand(interp, "group",         GroupCmd,         clientData, NULL);
    12619     Tcl_CreateObjCommand(interp, "heightmap",     HeightMapCmd,     clientData, NULL);
    12620     Tcl_CreateObjCommand(interp, "image",         ImageCmd,         clientData, NULL);
    12621     Tcl_CreateObjCommand(interp, "imgflush",      ImageFlushCmd,    clientData, NULL);
    12622     Tcl_CreateObjCommand(interp, "legend",        LegendCmd,        clientData, NULL);
    12623     Tcl_CreateObjCommand(interp, "legend2",       LegendSimpleCmd,  clientData, NULL);
    12624     Tcl_CreateObjCommand(interp, "lic",           LICCmd,           clientData, NULL);
    12625     Tcl_CreateObjCommand(interp, "line",          LineCmd,          clientData, NULL);
    12626     Tcl_CreateObjCommand(interp, "molecule",      MoleculeCmd,      clientData, NULL);
    12627     Tcl_CreateObjCommand(interp, "outline",       OutlineCmd,       clientData, NULL);
    12628     Tcl_CreateObjCommand(interp, "parallelpiped", ParallelpipedCmd, clientData, NULL);
    12629     Tcl_CreateObjCommand(interp, "polydata",      PolyDataCmd,      clientData, NULL);
    12630     Tcl_CreateObjCommand(interp, "polygon",       PolygonCmd,       clientData, NULL);
    12631     Tcl_CreateObjCommand(interp, "pseudocolor",   PseudoColorCmd,   clientData, NULL);
    12632     Tcl_CreateObjCommand(interp, "renderer",      RendererCmd,      clientData, NULL);
    12633     Tcl_CreateObjCommand(interp, "screen",        ScreenCmd,        clientData, NULL);
    12634     Tcl_CreateObjCommand(interp, "sphere",        SphereCmd,        clientData, NULL);
    12635     Tcl_CreateObjCommand(interp, "streamlines",   StreamlinesCmd,   clientData, NULL);
    12636     Tcl_CreateObjCommand(interp, "text3d",        Text3DCmd,        clientData, NULL);
    12637     Tcl_CreateObjCommand(interp, "volume",        VolumeCmd,        clientData, NULL);
    12638     Tcl_CreateObjCommand(interp, "warp",          WarpCmd,          clientData, NULL);
     12603    Tcl_CreateObjCommand(interp, "arc",            ArcCmd,            clientData, NULL);
     12604    Tcl_CreateObjCommand(interp, "arrow",          ArrowCmd,          clientData, NULL);
     12605    Tcl_CreateObjCommand(interp, "axis",           AxisCmd,           clientData, NULL);
     12606    Tcl_CreateObjCommand(interp, "box",            BoxCmd,            clientData, NULL);
     12607    Tcl_CreateObjCommand(interp, "camera",         CameraCmd,         clientData, NULL);
     12608    Tcl_CreateObjCommand(interp, "clientinfo",     ClientInfoCmd,     clientData, NULL);
     12609    Tcl_CreateObjCommand(interp, "colormap",       ColorMapCmd,       clientData, NULL);
     12610    Tcl_CreateObjCommand(interp, "cone",           ConeCmd,           clientData, NULL);
     12611    Tcl_CreateObjCommand(interp, "contour2d",      Contour2DCmd,      clientData, NULL);
     12612    Tcl_CreateObjCommand(interp, "contour3d",      Contour3DCmd,      clientData, NULL);
     12613    Tcl_CreateObjCommand(interp, "cutplane",       CutplaneCmd,       clientData, NULL);
     12614    Tcl_CreateObjCommand(interp, "cylinder",       CylinderCmd,       clientData, NULL);
     12615    Tcl_CreateObjCommand(interp, "dataset",        DataSetCmd,        clientData, NULL);
     12616    Tcl_CreateObjCommand(interp, "disk",           DiskCmd,           clientData, NULL);
     12617    Tcl_CreateObjCommand(interp, "glyphs",         GlyphsCmd,         clientData, NULL);
     12618    Tcl_CreateObjCommand(interp, "group",          GroupCmd,          clientData, NULL);
     12619    Tcl_CreateObjCommand(interp, "heightmap",      HeightMapCmd,      clientData, NULL);
     12620    Tcl_CreateObjCommand(interp, "image",          ImageCmd,          clientData, NULL);
     12621    Tcl_CreateObjCommand(interp, "imgflush",       ImageFlushCmd,     clientData, NULL);
     12622    Tcl_CreateObjCommand(interp, "legend",         LegendCmd,         clientData, NULL);
     12623    Tcl_CreateObjCommand(interp, "legend2",        LegendSimpleCmd,   clientData, NULL);
     12624    Tcl_CreateObjCommand(interp, "lic",            LICCmd,            clientData, NULL);
     12625    Tcl_CreateObjCommand(interp, "line",           LineCmd,           clientData, NULL);
     12626    Tcl_CreateObjCommand(interp, "molecule",       MoleculeCmd,       clientData, NULL);
     12627    Tcl_CreateObjCommand(interp, "outline",        OutlineCmd,        clientData, NULL);
     12628    Tcl_CreateObjCommand(interp, "parallelepiped", ParallelepipedCmd, clientData, NULL);
     12629    Tcl_CreateObjCommand(interp, "polydata",       PolyDataCmd,       clientData, NULL);
     12630    Tcl_CreateObjCommand(interp, "polygon",        PolygonCmd,        clientData, NULL);
     12631    Tcl_CreateObjCommand(interp, "pseudocolor",    PseudoColorCmd,    clientData, NULL);
     12632    Tcl_CreateObjCommand(interp, "renderer",       RendererCmd,       clientData, NULL);
     12633    Tcl_CreateObjCommand(interp, "screen",         ScreenCmd,         clientData, NULL);
     12634    Tcl_CreateObjCommand(interp, "sphere",         SphereCmd,         clientData, NULL);
     12635    Tcl_CreateObjCommand(interp, "streamlines",    StreamlinesCmd,    clientData, NULL);
     12636    Tcl_CreateObjCommand(interp, "text3d",         Text3DCmd,         clientData, NULL);
     12637    Tcl_CreateObjCommand(interp, "volume",         VolumeCmd,         clientData, NULL);
     12638    Tcl_CreateObjCommand(interp, "warp",           WarpCmd,           clientData, NULL);
    1263912639}
    1264012640
     
    1266912669    Tcl_DeleteCommand(interp, "molecule");
    1267012670    Tcl_DeleteCommand(interp, "outline");
    12671     Tcl_DeleteCommand(interp, "parallelpiped");
     12671    Tcl_DeleteCommand(interp, "parallelepiped");
    1267212672    Tcl_DeleteCommand(interp, "polydata");
    1267312673    Tcl_DeleteCommand(interp, "polygon");
  • trunk/packages/vizservers/vtkvis/RendererGraphicsObjs.cpp

    r3859 r3861  
    2828#include "Line.h"
    2929#include "Molecule.h"
    30 #include "Parallelpiped.h"
     30#include "Parallelepiped.h"
    3131#include "PolyData.h"
    3232#include "PseudoColor.h"
     
    126126
    127127template<>
    128 Renderer::ParallelpipedHashmap &
    129 Renderer::getGraphicsObjectHashmap<Parallelpiped>()
    130 { return _parallelpipeds; }
     128Renderer::ParallelepipedHashmap &
     129Renderer::getGraphicsObjectHashmap<Parallelepiped>()
     130{ return _parallelepipeds; }
    131131
    132132template<>
     
    179179template Group *Renderer::getGraphicsObject(const DataSetId&);
    180180template Line *Renderer::getGraphicsObject(const DataSetId&);
    181 template Parallelpiped *Renderer::getGraphicsObject(const DataSetId&);
     181template Parallelepiped *Renderer::getGraphicsObject(const DataSetId&);
    182182template Polygon *Renderer::getGraphicsObject(const DataSetId&);
    183183template Sphere *Renderer::getGraphicsObject(const DataSetId&);
     
    296296        return gobj;
    297297    }
    298     if ((gobj = getGraphicsObject<Parallelpiped>(id)) != NULL) {
     298    if ((gobj = getGraphicsObject<Parallelepiped>(id)) != NULL) {
    299299        return gobj;
    300300    }
     
    29482948
    29492949/**
    2950  * \brief Create a new Parallelpiped and associate it with an ID
    2951  */
    2952 bool Renderer::addParallelpiped(const DataSetId& id,
    2953                                 double vec1[3], double vec2[3], double vec3[3],
    2954                                 bool flipNormals)
    2955 {
    2956     Parallelpiped *gobj;
    2957     if ((gobj = getGraphicsObject<Parallelpiped>(id)) != NULL) {
     2950 * \brief Create a new Parallelepiped and associate it with an ID
     2951 */
     2952bool Renderer::addParallelepiped(const DataSetId& id,
     2953                                 double vec1[3], double vec2[3], double vec3[3],
     2954                                 bool flipNormals)
     2955{
     2956    Parallelepiped *gobj;
     2957    if ((gobj = getGraphicsObject<Parallelepiped>(id)) != NULL) {
    29582958        WARN("Replacing existing %s %s", gobj->getClassName(), id.c_str());
    2959         deleteGraphicsObject<Parallelpiped>(id);
    2960     }
    2961 
    2962     gobj = new Parallelpiped();
     2959        deleteGraphicsObject<Parallelepiped>(id);
     2960    }
     2961
     2962    gobj = new Parallelepiped();
    29632963 
    29642964    gobj->setDataSet(NULL, this);
     
    29792979        gobj->flipNormals(flipNormals);
    29802980
    2981     getGraphicsObjectHashmap<Parallelpiped>()[id] = gobj;
     2981    getGraphicsObjectHashmap<Parallelepiped>()[id] = gobj;
    29822982
    29832983    sceneBoundsChanged();
  • trunk/packages/vizservers/vtkvis/protocol.txt

    r3859 r3861  
    686686outline visible <bool> <?datasetName?>
    687687
    688 parallelpiped add <v0x> <v0y> <v0z> <v1x> <v1y> <v1z> <v2x> <v2y> <v2z> <name>
    689               Specify parallelpiped using 3 basis vectors.  The 3 vectors should
    690               be given in order to create a right-handed coordinate system, i.e.
    691               (v0 cross v1) dot v2 should be positive.
    692 parallelpiped color <r> <g> <b> <?name?>
    693 parallelpiped culling <bool> <?name?>
    694 parallelpiped delete <?name?>
    695 parallelpiped edges <bool> <?name?>
    696 parallelpiped flipnorm <bool> <?name?>
    697 parallelpiped lighting <bool> <?name?>
    698 parallelpiped linecolor <r> <g> <b> <?name?>
    699 parallelpiped linewidth <val> <?name?>
    700 parallelpiped material <ambientCoeff> <diffuseCoeff> <specularCoeff> <specularExp> <?name?>
    701 parallelpiped opacity <val> <?name?>
    702 parallelpiped orient <qw> <qx> <qy> <qz> <?name?>
    703 parallelpiped origin <x> <y> <z> <?name?>
    704 parallelpiped pos <x> <y> <z> <?name?>
    705 parallelpiped scale <sx> <sy> <sz> <?name?>
    706 parallelpiped shading <val> <?name?>
    707               val = flat|smooth
    708 parallelpiped visible <bool> <?name?>
    709 parallelpiped wireframe <bool> <?name?>
     688parallelepiped add <v0x> <v0y> <v0z> <v1x> <v1y> <v1z> <v2x> <v2y> <v2z> <name>
     689               Specify parallelepiped using 3 basis vectors.  The 3 vectors should
     690               be given in order to create a right-handed coordinate system, i.e.
     691               (v0 cross v1) dot v2 should be positive.
     692parallelepiped color <r> <g> <b> <?name?>
     693parallelepiped culling <bool> <?name?>
     694parallelepiped delete <?name?>
     695parallelepiped edges <bool> <?name?>
     696parallelepiped flipnorm <bool> <?name?>
     697parallelepiped lighting <bool> <?name?>
     698parallelepiped linecolor <r> <g> <b> <?name?>
     699parallelepiped linewidth <val> <?name?>
     700parallelepiped material <ambientCoeff> <diffuseCoeff> <specularCoeff> <specularExp> <?name?>
     701parallelepiped opacity <val> <?name?>
     702parallelepiped orient <qw> <qx> <qy> <qz> <?name?>
     703parallelepiped origin <x> <y> <z> <?name?>
     704parallelepiped pos <x> <y> <z> <?name?>
     705parallelepiped scale <sx> <sy> <sz> <?name?>
     706parallelepiped shading <val> <?name?>
     707               val = flat|smooth
     708parallelepiped visible <bool> <?name?>
     709parallelepiped wireframe <bool> <?name?>
    710710
    711711polydata add <?datasetName?>
Note: See TracChangeset for help on using the changeset viewer.