Ignore:
Timestamp:
Apr 2, 2013, 8:02:50 PM (12 years ago)
Author:
ldelgass
Message:

Use nv namespace for classes in nanovis rather than prefixing class names with
Nv (still need to convert shader classes).

Location:
trunk/packages/vizservers/nanovis
Files:
72 edited
8 moved

Legend:

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

    r3502 r3611  
    1212
    1313#include "Axis.h"
     14
     15using namespace nv;
    1416
    1517inline bool DEFINED(double x) {
  • trunk/packages/vizservers/nanovis/Axis.h

    r3502 r3611  
    1919#define NAN (std::numeric_limits<double>::quiet_NaN())
    2020#endif
     21
     22namespace nv {
    2123
    2224class Axis;
     
    409411};
    410412
     413}
     414
    411415#endif
  • trunk/packages/vizservers/nanovis/AxisRange.h

    r3502 r3611  
    99
    1010#include <string.h>
     11
     12namespace nv {
    1113
    1214class AxisRange
     
    8183};
    8284
     85}
     86
    8387#endif
  • trunk/packages/vizservers/nanovis/Camera.cpp

    r3610 r3611  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/*
    3  * ----------------------------------------------------------------------
    4  * NvCamera.cpp : NvCamera class
     3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
    54 *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    10  *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    11  *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    168#include <stdio.h>
     
    2820
    2921#include "nanovis.h"
    30 #include "NvCamera.h"
     22#include "Camera.h"
    3123#include "Trace.h"
    3224
     25using namespace nv;
    3326using namespace vrmath;
    3427
     
    4336}
    4437
    45 NvCamera::NvCamera(int startx, int starty, int w, int h,
    46                    float loc_x, float loc_y, float loc_z) :
     38Camera::Camera(int startx, int starty, int w, int h,
     39               float loc_x, float loc_y, float loc_z) :
    4740    _location(loc_x, loc_y, loc_z),
    4841    _fov(30.0),
     
    5750
    5851void
    59 NvCamera::getUpDirMatrix(Matrix4x4d& upMat)
     52Camera::getUpDirMatrix(Matrix4x4d& upMat)
    6053{
    6154    switch (NanoVis::updir) {
     
    9790 */
    9891void
    99 NvCamera::reset(const Vector3f& bboxMin,
    100                 const Vector3f& bboxMax,
    101                 bool resetOrientation)
     92Camera::reset(const Vector3f& bboxMin,
     93              const Vector3f& bboxMax,
     94              bool resetOrientation)
    10295{
    10396    TRACE("Enter");
     
    179172
    180173void
    181 NvCamera::resetClippingRange(const Vector3f& bboxMin, const Vector3f& bboxMax)
     174Camera::resetClippingRange(const Vector3f& bboxMin, const Vector3f& bboxMax)
    182175{
    183176    Vector3f emin(bboxMin.x, bboxMin.y, bboxMin.z), emax(bboxMax.x, bboxMax.y, bboxMax.z);
     
    219212
    220213void
    221 NvCamera::initialize()
     214Camera::initialize()
    222215{
    223216    TRACE("Enter");
     
    238231}
    239232
    240 void NvCamera::rotate(double *quat)
     233void Camera::rotate(double *quat)
    241234{
    242235    Quaternion q(quat[0], quat[1], quat[2], quat[3]);
     
    249242}
    250243
    251 void NvCamera::rotate(float angleX, float angleY, float angleZ)
     244void Camera::rotate(float angleX, float angleY, float angleZ)
    252245{
    253246    angleX = -angleX;
     
    266259}
    267260
    268 void NvCamera::print() const
     261void Camera::print() const
    269262{
    270263    TRACE("x: %d y: %d w: %d h: %d", _startX, _startY, _width, _height);
  • trunk/packages/vizservers/nanovis/Camera.h

    r3610 r3611  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/*
    3  * ----------------------------------------------------------------------
    4  * NvCamera.h : NvCamera class
     3 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
    54 *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    10  *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    11  *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    16 #ifndef CAMERA_H
    17 #define CAMERA_H
     8#ifndef NV_CAMERA_H
     9#define NV_CAMERA_H
    1810
    1911#include <vrmath/Matrix4x4d.h>
     
    2214#include "config.h"
    2315
    24 class NvCamera
     16namespace nv {
     17
     18class Camera
    2519{
    2620public:
    27     NvCamera(int startx, int starty, int w, int h,
     21    Camera(int startx, int starty, int w, int h,
    2822             float loc_x, float loc_y, float loc_z);
    2923
    30     ~NvCamera()
     24    ~Camera()
    3125    {}
    3226
     
    125119};
    126120
     121}
     122
    127123#endif
  • trunk/packages/vizservers/nanovis/Chain.cpp

    r2923 r3611  
    2727
    2828#include "Chain.h"
     29
     30using namespace nv;
    2931
    3032typedef int (QSortCompareProc) (const void *, const void *);
  • trunk/packages/vizservers/nanovis/Chain.h

    r2923 r3611  
    2424#ifndef CHAIN_H
    2525#define CHAIN_H
     26
     27namespace nv {
    2628
    2729/**
     
    143145};
    144146
     147}
     148
    145149#endif
  • trunk/packages/vizservers/nanovis/Command.cpp

    r3608 r3611  
    6060#include "Grid.h"
    6161#include "HeightMap.h"
    62 #include "NvCamera.h"
    63 #include "NvZincBlendeReconstructor.h"
     62#include "Camera.h"
     63#include "ZincBlendeReconstructor.h"
    6464#include "OrientationIndicator.h"
    6565#include "Unirect.h"
     
    114114void
    115115nv::queueResponse(const void *bytes, size_t len,
    116                   Response::AllocationType allocType,
    117                   Response::ResponseType type)
     116              Response::AllocationType allocType,
     117              Response::ResponseType type)
    118118{
    119119    Response *response = new Response(type);
     
    185185
    186186int
    187 GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, bool *boolPtr)
     187nv::GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, bool *boolPtr)
    188188{
    189189    int value;
     
    197197
    198198int
    199 GetFloatFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, float *valuePtr)
     199nv::GetFloatFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, float *valuePtr)
    200200{
    201201    double value;
     
    285285        return NULL;
    286286    }
    287     if ((GetFloatFromObj(interp, objv[0], &xMin) != TCL_OK) ||
    288         (GetFloatFromObj(interp, objv[1], &yMin) != TCL_OK) ||
    289         (GetFloatFromObj(interp, objv[2], &xMax) != TCL_OK) ||
    290         (GetFloatFromObj(interp, objv[3], &yMax) != TCL_OK) ||
     287    if ((nv::GetFloatFromObj(interp, objv[0], &xMin) != TCL_OK) ||
     288        (nv::GetFloatFromObj(interp, objv[1], &yMin) != TCL_OK) ||
     289        (nv::GetFloatFromObj(interp, objv[2], &xMax) != TCL_OK) ||
     290        (nv::GetFloatFromObj(interp, objv[3], &yMax) != TCL_OK) ||
    291291        (Tcl_GetIntFromObj(interp, objv[4], &xNum) != TCL_OK) ||
    292292        (Tcl_GetIntFromObj(interp, objv[5], &yNum) != TCL_OK)) {
     
    317317    int i;
    318318    for (i = 0; i < nValues; i++) {
    319         if (GetFloatFromObj(interp, elem[i], heights + i) != TCL_OK) {
     319        if (nv::GetFloatFromObj(interp, elem[i], heights + i) != TCL_OK) {
    320320            delete [] heights;
    321321            return NULL;
     
    359359 */
    360360int
    361 GetVolumeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Volume **volPtrPtr)
     361nv::GetVolumeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Volume **volPtrPtr)
    362362{
    363363    const char *string = Tcl_GetString(objPtr);
     
    477477 */
    478478int
    479 GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *indexPtr)
     479nv::GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *indexPtr)
    480480{
    481481    return GetAxis(interp, Tcl_GetString(objPtr), indexPtr);
     
    534534 */
    535535int
    536 GetDataStream(Tcl_Interp *interp, Rappture::Buffer &buf, int nBytes)
     536nv::GetDataStream(Tcl_Interp *interp, Rappture::Buffer &buf, int nBytes)
    537537{
    538538    if (!SocketRead(buf, nBytes)) {
     
    12581258    if ((nBytes > 5) && (strncmp(bytes, "<HDR>", 5) == 0)) {
    12591259        TRACE("ZincBlende Stream loading...");
    1260         volume = NvZincBlendeReconstructor::getInstance()->loadFromMemory(const_cast<char *>(bytes));
     1260        volume = (Volume *)ZincBlendeReconstructor::getInstance()->loadFromMemory(const_cast<char *>(bytes));
    12611261        if (volume == NULL) {
    12621262            Tcl_AppendResult(interp, "can't get volume instance", (char *)NULL);
  • trunk/packages/vizservers/nanovis/Command.h

    r3607 r3611  
    2121class Buffer;
    2222}
    23 class Volume;
    2423
    2524namespace nv {
     25
    2626class ReadBuffer;
     27class Volume;
    2728
    2829#ifdef USE_THREADS
     
    4748
    4849extern void initTcl(Tcl_Interp *interp, ClientData clientData);
    49 }
    5050
    5151extern int GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr,
     
    6363                            Volume **volume);
    6464
     65}
     66
    6567#endif
  • trunk/packages/vizservers/nanovis/ContourLineFilter.cpp

    r3492 r3611  
    1414#include "ContourLineFilter.h"
    1515
     16using namespace nv;
    1617using namespace nv::graphics;
    1718using namespace vrmath;
  • trunk/packages/vizservers/nanovis/ContourLineFilter.h

    r3492 r3611  
    99#include <vrmath/Vector3f.h>
    1010#include <vrmath/Vector4f.h>
     11
     12namespace nv {
    1113
    1214class ContourLineFilter
     
    6062};
    6163
     64}
     65
    6266#endif
  • trunk/packages/vizservers/nanovis/ConvexPolygon.cpp

    r3502 r3611  
    2121#include "Trace.h"
    2222
     23using namespace nv;
    2324using namespace vrmath;
    2425
  • trunk/packages/vizservers/nanovis/ConvexPolygon.h

    r3502 r3611  
    2525
    2626#include "Plane.h"
     27
     28namespace nv {
    2729
    2830typedef std::vector<vrmath::Vector4f> VertexVector;
     
    7173};
    7274
     75}
     76
    7377#endif
  • trunk/packages/vizservers/nanovis/Flow.cpp

    r3597 r3611  
    2020#include "FlowParticles.h"
    2121#include "FlowBox.h"
    22 #include "NvLIC.h"
     22#include "LIC.h"
    2323#include "VelocityArrowsSlice.h"
    24 #include "NvParticleRenderer.h"
    2524#include "Switch.h"
    2625#include "Unirect.h"
     
    2928#include "TransferFunction.h"
    3029
     30using namespace nv;
    3131using namespace vrmath;
    3232
  • trunk/packages/vizservers/nanovis/Flow.h

    r3597 r3611  
    2525#include "FlowParticles.h"
    2626#include "FlowBox.h"
    27 #include "NvLIC.h"
    28 #include "NvParticleRenderer.h"
     27#include "LIC.h"
    2928#include "Unirect.h"
    3029#include "Volume.h"
    3130#include "TransferFunction.h"
     31
     32namespace nv {
    3233
    3334struct FlowValues {
     
    253254};
    254255
     256}
     257
    255258#endif
  • trunk/packages/vizservers/nanovis/FlowBox.cpp

    r3567 r3611  
    2121#include "Trace.h"
    2222
     23using namespace nv;
    2324using namespace vrmath;
    2425
  • trunk/packages/vizservers/nanovis/FlowBox.h

    r3568 r3611  
    2121#include "Switch.h"
    2222#include "Volume.h"
     23
     24namespace nv {
    2325
    2426struct FlowBoxValues {
     
    7173};
    7274
     75}
     76
    7377#endif
  • trunk/packages/vizservers/nanovis/FlowCmd.cpp

    r3608 r3611  
    3737#include "Switch.h"
    3838#include "TransferFunction.h"
    39 #include "NvLIC.h"
     39#include "LIC.h"
    4040#include "Unirect.h"
    4141#include "VelocityArrowsSlice.h"
     
    840840 */
    841841int
    842 FlowInstObjCmd(ClientData clientData, Tcl_Interp *interp, int objc,
    843                Tcl_Obj *const *objv)
     842nv::FlowInstObjCmd(ClientData clientData, Tcl_Interp *interp, int objc,
     843                   Tcl_Obj *const *objv)
    844844{
    845845    Tcl_ObjCmdProc *proc;
     
    863863 */
    864864void
    865 FlowInstDeleteProc(ClientData clientData)
     865nv::FlowInstDeleteProc(ClientData clientData)
    866866{
    867867    Flow *flow = (Flow *)clientData;
     
    13071307 */
    13081308void
    1309 FlowCmdInitProc(Tcl_Interp *interp, ClientData clientData)
     1309nv::FlowCmdInitProc(Tcl_Interp *interp, ClientData clientData)
    13101310{
    13111311    Tcl_CreateObjCommand(interp, "flow", FlowCmdProc, clientData, NULL);
  • trunk/packages/vizservers/nanovis/FlowCmd.h

    r3605 r3611  
    2727#include <tcl.h>
    2828
     29namespace nv {
     30
    2931extern void FlowCmdInitProc(Tcl_Interp *interp, ClientData clientData);
    3032
     
    3234extern Tcl_CmdDeleteProc FlowInstDeleteProc;
    3335
     36}
     37
    3438#endif
  • trunk/packages/vizservers/nanovis/FlowParticles.cpp

    r3597 r3611  
    1919#include "Trace.h"
    2020
     21using namespace nv;
    2122using namespace vrmath;
    2223
    2324FlowParticles::FlowParticles(const char *name) :
    2425    _name(name),
    25     _renderer(new NvParticleRenderer(NMESH, NMESH))
     26    _renderer(new ParticleRenderer(NMESH, NMESH))
    2627{
    2728    _sv.position.value = 0.0f;
  • trunk/packages/vizservers/nanovis/FlowParticles.h

    r3597 r3611  
    99 *   Leif Delgass <ldelgass@purdue.edu>
    1010 */
    11 #ifndef FLOWPARTICLES_H
    12 #define FLOWPARTICLES_H
     11#ifndef _FLOWPARTICLES_H
     12#define _FLOWPARTICLES_H
    1313
    1414#include <cassert>
     
    2121#include "FlowTypes.h"
    2222#include "Switch.h"
    23 #include "NvParticleRenderer.h"
     23#include "ParticleRenderer.h"
    2424#include "Volume.h"
     25
     26namespace nv {
    2527
    2628struct FlowParticlesValues {
     
    9698     */
    9799    std::string _name;
    98     NvParticleRenderer *_renderer;        ///< Particle renderer
     100    nv::ParticleRenderer *_renderer;        ///< Particle renderer
    99101    FlowParticlesValues _sv;
    100102
     
    102104};
    103105
     106}
     107
    104108#endif
  • trunk/packages/vizservers/nanovis/FlowTypes.h

    r3567 r3611  
    1111#ifndef FLOWTYPES_H
    1212#define FLOWTYPES_H
     13
     14namespace nv {
    1315
    1416struct FlowColor {
     
    3032#define ABSPOS 1
    3133
     34}
     35
    3236#endif
  • trunk/packages/vizservers/nanovis/Grid.cpp

    r3605 r3611  
    1313#include "Trace.h"
    1414
     15using namespace nv;
    1516using namespace nv::util;
    1617
  • trunk/packages/vizservers/nanovis/Grid.h

    r3502 r3611  
    1111#include "Axis.h"
    1212#include "AxisRange.h"
     13
     14namespace nv {
    1315
    1416class RGBA
     
    7476};
    7577
     78}
    7679
    7780#endif
  • trunk/packages/vizservers/nanovis/HeightMap.cpp

    r3605 r3611  
    1515#include "Texture1D.h"
    1616
     17using namespace nv;
     18using namespace nv::graphics;
     19using namespace vrmath;
     20
    1721bool HeightMap::updatePending = false;
    1822double HeightMap::valueMin = 0.0;
    1923double HeightMap::valueMax = 1.0;
    20 
    21 using namespace nv::graphics;
    22 using namespace vrmath;
    2324
    2425HeightMap::HeightMap() :
  • trunk/packages/vizservers/nanovis/HeightMap.h

    r3597 r3611  
    44 *
    55 */
    6 #ifndef HEIGHTMAP_H
    7 #define HEIGHTMAP_H
     6#ifndef NV_HEIGHTMAP_H
     7#define NV_HEIGHTMAP_H
    88
    99#include <graphics/Geometry.h>
     
    1414#include "NvShader.h"
    1515#include "AxisRange.h"
     16
     17namespace nv {
    1618
    1719class Grid;
     
    145147};
    146148
     149}
     150
    147151#endif
  • trunk/packages/vizservers/nanovis/LIC.cpp

    r3610 r3611  
    2121#include "define.h"
    2222
    23 #include "NvLIC.h"
     23#include "LIC.h"
    2424#include "NvShader.h"
    2525#include "Trace.h"
     
    2929#define SCALE 3.0 //scale for background pattern. small value -> fine texture
    3030
     31using namespace nv;
    3132using namespace vrmath;
    3233
    33 NvLIC::NvLIC(int size, int width, int height, int axis,
    34              float offset) :
     34LIC::LIC(int size, int width, int height, int axis,
     35         float offset) :
    3536    _width(width),
    3637    _height(height),
     
    116117}
    117118
    118 NvLIC::~NvLIC()
     119LIC::~LIC()
    119120{
    120121    glDeleteTextures(1, &_patternTex);
     
    138139
    139140void
    140 NvLIC::makePatterns()
     141LIC::makePatterns()
    141142{
    142143    TRACE("Enter");
     
    185186}
    186187
    187 void NvLIC::makeMagnitudes()
     188void LIC::makeMagnitudes()
    188189{
    189190    GLubyte mag[NMESH][NMESH][4];
     
    222223
    223224void
    224 NvLIC::getSlice()
     225LIC::getSlice()
    225226{
    226227    int fboOrig;
     
    320321//line integral convolution
    321322void
    322 NvLIC::convolve()
     323LIC::convolve()
    323324{
    324325    if (_vectorFieldId == 0) {
     
    433434
    434435void
    435 NvLIC::render()
     436LIC::render()
    436437{
    437438    if (_vectorFieldId == 0) {
     
    490491
    491492void
    492 NvLIC::setVectorField(unsigned int texID, const Vector3f& origin,
     493LIC::setVectorField(unsigned int texID, const Vector3f& origin,
    493494                      float scaleX, float scaleY, float scaleZ, float max)
    494495{
    495     TRACE("NvLIC: vector field is assigned [%d]", texID);
     496    TRACE("LIC: vector field is assigned [%d]", texID);
    496497    _vectorFieldId = texID;
    497498    _origin = origin;
     
    505506
    506507void
    507 NvLIC::getVelocity(float x, float y, float *px, float *py)
     508LIC::getVelocity(float x, float y, float *px, float *py)
    508509{
    509510   float vx, vy, r;
     
    544545
    545546void
    546 NvLIC::setOffset(float offset)
     547LIC::setOffset(float offset)
    547548{
    548549    _offset = offset;
     
    550551}
    551552
    552 void NvLIC::setAxis(int axis)
     553void LIC::setAxis(int axis)
    553554{
    554555    _axis = axis;
    555556}
    556557
    557 void NvLIC::reset()
     558void LIC::reset()
    558559{
    559560    makePatterns();
  • trunk/packages/vizservers/nanovis/LIC.h

    r3610 r3611  
    2424#include "NvShader.h"
    2525
    26 class NvLIC
     26namespace nv {
     27
     28class LIC
    2729{
    2830public:
    29     NvLIC(int size, int width, int height, int axis, float offset);
    30     ~NvLIC();
     31    LIC(int size, int width, int height, int axis, float offset);
     32    ~LIC();
    3133
    3234    /// project 3D vectors to a 2D slice for line integral convolution
     
    124126};
    125127
     128}
     129
    126130#endif
  • trunk/packages/vizservers/nanovis/Makefile.in

    r3605 r3611  
    108108                Axis.o \
    109109                BMPWriter.o \
     110                Camera.o \
    110111                Chain.o \
    111112                CmdProc.o \
     
    120121                Grid.o \
    121122                HeightMap.o \
    122                 NvCamera.o \
     123                LIC.o \
    123124                NvColorTableShader.o \
    124                 NvLIC.o \
    125125                NvParticleAdvectionShader.o \
    126                 NvParticleRenderer.o \
    127126                NvRegularVolumeShader.o \
    128127                NvShader.o \
    129128                NvStdVertexShader.o \
    130129                NvVolumeShader.o \
    131                 NvZincBlendeReconstructor.o \
    132130                NvZincBlendeVolumeShader.o \
    133131                OrientationIndicator.o \
     132                ParticleRenderer.o \
    134133                PerfQuery.o \
    135134                Plane.o \
     
    152151                VolumeRenderer.o \
    153152                VtkReader.o \
     153                ZincBlendeReconstructor.o \
    154154                ZincBlendeVolume.o \
    155155                dxReader.o \
     
    279279BMPWriter.o: BMPWriter.cpp nanovis.h
    280280BucketSort.o: BucketSort.cpp BucketSort.h $(VRMATH_DIR)/include/vrmath/Vector3f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h PCASplit.h
     281Camera.o: Camera.cpp Camera.h config.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h
    281282Chain.o: Chain.cpp Chain.h
    282283CmdProc.o: CmdProc.cpp CmdProc.h
    283 Command.o: Command.cpp nanovis.h config.h define.h FlowCmd.h CmdProc.h Trace.h PlaneRenderer.h PPMWriter.h BMPWriter.h dxReader.h Grid.h HeightMap.h NvCamera.h NvZincBlendeReconstructor.h OrientationIndicator.h Unirect.h Volume.h VolumeRenderer.h
     284Command.o: Command.cpp nanovis.h config.h define.h FlowCmd.h CmdProc.h Trace.h PlaneRenderer.h PPMWriter.h BMPWriter.h dxReader.h Grid.h HeightMap.h Camera.h ZincBlendeReconstructor.h OrientationIndicator.h Unirect.h Volume.h VolumeRenderer.h
    284285ContourLineFilter.o: ContourLineFilter.cpp ContourLineFilter.h
    285286ConvexPolygon.o: ConvexPolygon.cpp ConvexPolygon.h $(VRMATH_DIR)/include/vrmath/Vector4f.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h Plane.h
    286287Flow.o: Flow.cpp Flow.h FlowCmd.h FlowTypes.h FlowBox.h FlowParticles.h Switch.h Trace.h
    287288FlowBox.o: FlowBox.cpp FlowBox.h FlowTypes.h Switch.h Trace.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h
    288 FlowCmd.o: FlowCmd.cpp FlowCmd.h FlowParticles.h FlowBox.h FlowTypes.h Command.h PPMWriter.h Switch.h Trace.h TransferFunction.h nanovis.h CmdProc.h NvLIC.h Unirect.h Volume.h VelocityArrowsSlice.h $(VRMATH_DIR)/include/vrmath/Vector3f.h
    289 FlowParticles.o: FlowParticles.cpp FlowParticles.h FlowTypes.h FlowCmd.h Switch.h Trace.h NvParticleRenderer.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h
     289FlowCmd.o: FlowCmd.cpp FlowCmd.h FlowParticles.h FlowBox.h FlowTypes.h Command.h PPMWriter.h Switch.h Trace.h TransferFunction.h nanovis.h CmdProc.h LIC.h Unirect.h Volume.h VelocityArrowsSlice.h $(VRMATH_DIR)/include/vrmath/Vector3f.h
     290FlowParticles.o: FlowParticles.cpp FlowParticles.h FlowTypes.h FlowCmd.h Switch.h Trace.h ParticleRenderer.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h $(VRMATH_DIR)/include/vrmath/Vector4f.h
    290291GradientFilter.o: GradientFilter.cpp GradientFilter.h
    291292Grid.o: Grid.cpp Grid.h Axis.h Chain.h
    292293HeightMap.o: HeightMap.cpp HeightMap.h
    293 NvCamera.o: NvCamera.cpp NvCamera.h config.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h
     294LIC.o: LIC.cpp LIC.h
    294295NvColorTableShader.o: NvColorTableShader.cpp NvColorTableShader.h NvShader.h
    295 NvLIC.o: NvLIC.cpp NvLIC.h
    296296NvParticleAdvectionShader.o: NvParticleAdvectionShader.cpp NvParticleAdvectionShader.h NvShader.h
    297 NvParticleRenderer.o: NvParticleRenderer.cpp NvParticleRenderer.h
    298297NvRegularVolumeShader.o: NvRegularVolumeShader.cpp NvRegularVolumeShader.h NvVolumeShader.h NvShader.h
    299298NvShader.o: NvShader.cpp NvShader.h
    300299NvStdVertexShader.o: NvStdVertexShader.cpp NvStdVertexShader.h NvShader.h
    301300NvVolumeShader.o: NvVolumeShader.cpp NvVolumeShader.h NvShader.h
    302 NvZincBlendeReconstructor.o: NvZincBlendeReconstructor.cpp NvZincBlendeReconstructor.h ZincBlendeVolume.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h
    303301NvZincBlendeVolumeShader.o: NvZincBlendeVolumeShader.cpp NvZincBlendeVolumeShader.h NvVolumeShader.h NvShader.h
    304302OrientationIndicator.o: OrientationIndicator.cpp OrientationIndicator.h
    305303ParticleEmitter.o: ParticleEmitter.cpp ParticleEmitter.h
     304ParticleRenderer.o: ParticleRenderer.cpp ParticleRenderer.h
    306305ParticleSystem.o: ParticleSystem.cpp ParticleSystem.h DataLoader.h
    307306ParticleSystemFactory.o: ParticleSystemFactory.cpp ParticleSystemFactory.h
     
    326325Volume.o: Volume.cpp Volume.h config.h define.h
    327326VolumeInterpolator.o: VolumeInterpolator.cpp VolumeInterpolator.h Volume.h
    328 VolumeRenderer.o: VolumeRenderer.cpp VolumeRenderer.h
     327VolumeRenderer.o: VolumeRenderer.cpp VolumeRenderer.h ConvexPolygon.h Volume.h nanovis.h Trace.h Plane.h NvStdVertexShader.h NvShader.h
    329328VtkReader.o: VtkReader.h Trace.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h ReaderCommon.h nanovis.h
     329ZincBlendeReconstructor.o: ZincBlendeReconstructor.cpp ZincBlendeReconstructor.h ZincBlendeVolume.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h
    330330ZincBlendeVolume.o: ZincBlendeVolume.cpp ZincBlendeVolume.h config.h define.h
    331 dxReader.o: dxReader.cpp ReaderCommon.h config.h nanovis.h Unirect.h ZincBlendeVolume.h NvZincBlendeReconstructor.h
     331dxReader.o: dxReader.cpp ReaderCommon.h config.h nanovis.h Unirect.h ZincBlendeVolume.h ZincBlendeReconstructor.h
    332332md5.o: md5.h
    333 nanovis.o: nanovis.cpp nanovis.h config.h define.h Command.h Flow.h Grid.h HeightMap.h NvCamera.h NvLIC.h NvZincBlendeReconstructor.h OrientationIndicator.h PerfQuery.h PlaneRenderer.h PointSetRenderer.h PointSet.h Switch.h Trace.h Unirect.h VelocityArrowsSlice.h VolumeInterpolator.h VolumeRenderer.h ZincBlendeVolume.h Axis.h Chain.h
     333nanovis.o: nanovis.cpp nanovis.h config.h define.h Command.h Flow.h Grid.h HeightMap.h Camera.h LIC.h ZincBlendeReconstructor.h OrientationIndicator.h PerfQuery.h PlaneRenderer.h PointSetRenderer.h PointSet.h Switch.h Trace.h Unirect.h VelocityArrowsSlice.h VolumeInterpolator.h VolumeRenderer.h ZincBlendeVolume.h Axis.h Chain.h
    334334nanovisServer.o: nanovisServer.cpp nanovisServer.h config.h nanovis.h define.h Command.h PPMWriter.h ReadBuffer.h NvShader.h ResponseQueue.h Trace.h
  • trunk/packages/vizservers/nanovis/NvColorTableShader.cpp

    r3502 r3611  
    55 */
    66#include "NvColorTableShader.h"
     7
     8using namespace nv;
    79
    810NvColorTableShader::NvColorTableShader()
  • trunk/packages/vizservers/nanovis/NvColorTableShader.h

    r3502 r3611  
    1010#include "Texture2D.h"
    1111#include "TransferFunction.h"
     12
     13namespace nv {
    1214
    1315class NvColorTableShader : public NvShader
     
    2628};
    2729
     30}
     31
    2832#endif
  • trunk/packages/vizservers/nanovis/NvParticleAdvectionShader.cpp

    r3502 r3611  
    55 */
    66#include "NvParticleAdvectionShader.h"
     7
     8using namespace nv;
    79
    810NvParticleAdvectionShader::NvParticleAdvectionShader() :
  • trunk/packages/vizservers/nanovis/NvParticleAdvectionShader.h

    r3502 r3611  
    1010
    1111#include "NvShader.h"
     12
     13namespace nv {
    1214
    1315class NvParticleAdvectionShader : public NvShader
     
    5658};
    5759
     60}
     61
    5862#endif
  • trunk/packages/vizservers/nanovis/NvRegularVolumeShader.cpp

    r3502 r3611  
    55 */
    66#include "NvRegularVolumeShader.h"
     7
     8using namespace nv;
    79
    810NvRegularVolumeShader::NvRegularVolumeShader()
  • trunk/packages/vizservers/nanovis/NvRegularVolumeShader.h

    r3502 r3611  
    99#include "Volume.h"
    1010#include "NvVolumeShader.h"
     11
     12namespace nv {
    1113
    1214/// Shader for regular volume (uniform grid)
     
    2729};
    2830
     31}
     32
    2933#endif
  • trunk/packages/vizservers/nanovis/NvShader.cpp

    r3502 r3611  
    1515#include "Trace.h"
    1616
     17using namespace nv;
    1718using namespace nv::util;
    1819
  • trunk/packages/vizservers/nanovis/NvShader.h

    r3502 r3611  
    1515
    1616#include "Trace.h"
     17
     18namespace nv {
    1719
    1820class NvShader
     
    337339};
    338340
     341}
     342
    339343#endif
  • trunk/packages/vizservers/nanovis/NvStdVertexShader.cpp

    r3502 r3611  
    55 */
    66#include "NvStdVertexShader.h"
     7
     8using namespace nv;
    79
    810NvStdVertexShader::NvStdVertexShader()
  • trunk/packages/vizservers/nanovis/NvStdVertexShader.h

    r3502 r3611  
    88
    99#include "NvShader.h"
     10
     11namespace nv {
    1012
    1113class NvStdVertexShader : public NvShader
     
    2729};
    2830
     31}
     32
    2933#endif
    3034
  • trunk/packages/vizservers/nanovis/NvVolumeShader.cpp

    r3502 r3611  
    55 */
    66#include "NvVolumeShader.h"
     7
     8using namespace nv;
    79
    810NvVolumeShader::NvVolumeShader()
  • trunk/packages/vizservers/nanovis/NvVolumeShader.h

    r3502 r3611  
    88
    99#include "NvShader.h"
     10
     11namespace nv {
    1012
    1113class Volume;
     
    2830};
    2931
     32}
    3033
    3134#endif //
  • trunk/packages/vizservers/nanovis/NvZincBlendeVolumeShader.cpp

    r3502 r3611  
    44 *
    55 */
     6
    67#include "NvZincBlendeVolumeShader.h"
     8#include "ZincBlendeVolume.h"
     9
     10using namespace nv;
    711
    812NvZincBlendeVolumeShader::NvZincBlendeVolumeShader()
  • trunk/packages/vizservers/nanovis/NvZincBlendeVolumeShader.h

    r3502 r3611  
    77#define NV_ZINCBLENDE_SHADER_H
    88
    9 #include "ZincBlendeVolume.h"
    109#include "NvVolumeShader.h"
     10
     11namespace nv {
    1112
    1213class NvZincBlendeVolumeShader : public NvVolumeShader
     
    2627};
    2728
     29}
     30
    2831#endif
  • trunk/packages/vizservers/nanovis/ParticleRenderer.cpp

    r3610 r3611  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    2 /*
    3  * ----------------------------------------------------------------------
    4  * NvParticleRenderer.cpp: particle system class
    5  *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
     2/*
    103 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    168
     
    2113#include <GL/glew.h>
    2214
    23 #include "NvParticleRenderer.h"
     15#include "ParticleRenderer.h"
    2416#include "define.h"
    2517#include "Trace.h"
    2618
    27 NvParticleAdvectionShader *NvParticleRenderer::_advectionShader = NULL;
    28 
    29 class NvParticleAdvectionShaderInstance
    30 {
    31 public :
    32     NvParticleAdvectionShaderInstance()
    33     {}
    34 
    35     ~NvParticleAdvectionShaderInstance()
    36     {
    37         if (NvParticleRenderer::_advectionShader) {
    38             delete NvParticleRenderer::_advectionShader;
    39         }
    40     }
    41 };
    42 
    43 NvParticleAdvectionShaderInstance shaderInstance;
    44 
    45 NvParticleRenderer::NvParticleRenderer(int w, int h) :
     19using namespace nv;
     20
     21NvParticleAdvectionShader *ParticleRenderer::_advectionShader = NULL;
     22ParticleAdvectionShaderInstance shaderInstance;
     23
     24ParticleRenderer::ParticleRenderer(int w, int h) :
    4625    _initPosTex(0),
    4726    _data(NULL),
     
    128107}
    129108
    130 NvParticleRenderer::~NvParticleRenderer()
     109ParticleRenderer::~ParticleRenderer()
    131110{
    132111    glDeleteTextures(1, &_initPosTex);
     
    144123}
    145124
    146 void NvParticleRenderer::initializeDataArray()
     125void
     126ParticleRenderer::initializeDataArray()
    147127{
    148128    size_t n = _psysWidth * _psysHeight * 4;
     
    193173}
    194174
    195 void NvParticleRenderer::initialize()
     175void
     176ParticleRenderer::initialize()
    196177{
    197178    initializeDataArray();
     
    223204}
    224205
    225 void NvParticleRenderer::reset()
     206void
     207ParticleRenderer::reset()
    226208{
    227209    glBindTexture(GL_TEXTURE_RECTANGLE_ARB, _psysTex[0]);
     
    239221}
    240222
    241 void 
    242 NvParticleRenderer::advect()
     223void
     224ParticleRenderer::advect()
    243225{
    244226    if (_reborn)
     
    307289
    308290void
    309 NvParticleRenderer::updateVertexBuffer()
     291ParticleRenderer::updateVertexBuffer()
    310292{
    311293    _vertexArray->read(_psysWidth, _psysHeight);
     
    315297}
    316298
    317 void
    318 NvParticleRenderer::render()
     299void 
     300ParticleRenderer::render()
    319301{
    320302    glPushAttrib(GL_ENABLE_BIT);
     
    344326
    345327void
    346 NvParticleRenderer::setVectorField(unsigned int texID, const vrmath::Vector3f& origin,
    347                                    float scaleX, float scaleY, float scaleZ,
    348                                    float max)
     328ParticleRenderer::setVectorField(unsigned int texID, const vrmath::Vector3f& origin,
     329                                 float scaleX, float scaleY, float scaleZ,
     330                                 float max)
    349331{
    350332    _origin = origin;
     
    354336}
    355337
    356 void NvParticleRenderer::setAxis(int axis)
     338void
     339ParticleRenderer::setAxis(int axis)
    357340{
    358341    _sliceAxis = axis;
     
    360343}
    361344
    362 void NvParticleRenderer::setPos(float pos)
     345void
     346ParticleRenderer::setPos(float pos)
    363347{
    364348    _slicePos = pos;
  • trunk/packages/vizservers/nanovis/ParticleRenderer.h

    r3610 r3611  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/*
    3  * ----------------------------------------------------------------------
    4  * NvParticleRenderer.h: particle system class
    5  *
    6  * ======================================================================
    7  *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
    8  *           Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    103 *  Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  *  See the file "license.terms" for information on usage and
    13  *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 *  Authors:
     6 *    Wei Qiao <qiaow@purdue.edu>
    157 */
    16 #ifndef NVPARTICLERENDERER_H
    17 #define NVPARTICLERENDERER_H
     8#ifndef NV_PARTICLE_RENDERER_H
     9#define NV_PARTICLE_RENDERER_H
    1810
    1911#include <GL/glew.h>
     
    2416#include "NvParticleAdvectionShader.h"
    2517#include "RenderVertexArray.h"
     18
     19namespace nv {
    2620
    2721struct Particle {
     
    3933};
    4034
    41 class NvParticleRenderer
     35class ParticleRenderer
    4236{
    4337public:
    44     NvParticleRenderer(int w, int h);
     38    ParticleRenderer(int w, int h);
    4539
    46     ~NvParticleRenderer();
     40    ~ParticleRenderer();
    4741
    4842    void setVectorField(unsigned int texID, const vrmath::Vector3f& origin,
     
    135129};
    136130
     131class ParticleAdvectionShaderInstance
     132{
     133public :
     134    ParticleAdvectionShaderInstance()
     135    {}
     136
     137    ~ParticleAdvectionShaderInstance()
     138    {
     139        if (ParticleRenderer::_advectionShader) {
     140            delete ParticleRenderer::_advectionShader;
     141        }
     142    }
     143};
     144
     145}
     146
    137147#endif
  • trunk/packages/vizservers/nanovis/PerfQuery.cpp

    r3502 r3611  
    1717
    1818#include "PerfQuery.h"
     19
     20using namespace nv;
    1921
    2022PerfQuery::PerfQuery()
  • trunk/packages/vizservers/nanovis/PerfQuery.h

    r3502 r3611  
    2424
    2525#include "Trace.h"
     26
     27namespace nv {
    2628
    2729class PerfQuery
     
    6870    }
    6971}
     72
     73}
     74
    7075#endif
    7176
  • trunk/packages/vizservers/nanovis/PlaneRenderer.cpp

    r3597 r3611  
    1919#include "PlaneRenderer.h"
    2020#include "Trace.h"
     21
     22using namespace nv;
    2123
    2224PlaneRenderer::PlaneRenderer(int width, int height) :
  • trunk/packages/vizservers/nanovis/PlaneRenderer.h

    r3502 r3611  
    2222#include "TransferFunction.h"
    2323#include "Texture2D.h"
     24
     25namespace nv {
    2426
    2527class PlaneRenderer
     
    5557};
    5658
     59}
     60
    5761#endif
  • trunk/packages/vizservers/nanovis/ReaderCommon.cpp

    r3580 r3611  
    44 *
    55 */
     6
     7#include <cstdlib>
     8
     9#include <vrmath/Vector3f.h>
     10
    611#include "ReaderCommon.h"
    712#include "GradientFilter.h"
    813
    9 #include <vrmath/Vector3f.h>
    10 
    11 #include "stdlib.h"
    12 
     14using namespace nv;
    1315using namespace vrmath;
    1416
    1517float *
    16 merge(float *scalar, float *gradient, int size)
     18nv::merge(float *scalar, float *gradient, int size)
    1719{
    1820    float *data = (float *)malloc(sizeof(float) * 4 * size);
     
    4345 */
    4446void
    45 normalizeScalar(float *data, int count, int stride, double vmin, double vmax)
     47nv::normalizeScalar(float *data, int count, int stride, double vmin, double vmax)
    4648{
    4749    double dv = vmax - vmin;
     
    8284 */
    8385float *
    84 computeGradient(float *data,
    85                 int nx, int ny, int nz,
    86                 float dx, float dy, float dz,
    87                 float min, float max)
     86nv::computeGradient(float *data,
     87                    int nx, int ny, int nz,
     88                    float dx, float dy, float dz,
     89                    float min, float max)
    8890{
    8991    int npts = nx * ny * nz;
     
    123125 */
    124126void
    125 computeSimpleGradient(float *data,
    126                       int nx, int ny, int nz,
    127                       float dx, float dy, float dz)
     127nv::computeSimpleGradient(float *data,
     128                          int nx, int ny, int nz,
     129                          float dx, float dy, float dz)
    128130{
    129131    bool clampToEdge = true;
  • trunk/packages/vizservers/nanovis/ReaderCommon.h

    r3574 r3611  
    66#ifndef DX_READER_COMMON_H
    77#define DX_READER_COMMON_H
     8
     9namespace nv {
    810
    911extern float *
     
    2426                      float dx = 1.0f, float dy = 1.0f, float dz = 1.0f);
    2527
     28}
     29
    2630#endif
  • trunk/packages/vizservers/nanovis/RenderVertexArray.cpp

    r3502 r3611  
    4242#include "RenderVertexArray.h"
    4343#include "Trace.h"
     44
     45using namespace nv;
    4446
    4547RenderVertexArray::RenderVertexArray(int nverts, GLint size, GLenum type) :
  • trunk/packages/vizservers/nanovis/RenderVertexArray.h

    r3502 r3611  
    1919#include <GL/glew.h>
    2020#include <GL/gl.h>
     21
     22namespace nv {
    2123
    2224class RenderVertexArray
     
    4446};
    4547
     48}
     49
    4650#endif
  • trunk/packages/vizservers/nanovis/Texture1D.cpp

    r3561 r3611  
    2121#include "Texture1D.h"
    2222#include "Trace.h"
     23
     24using namespace nv;
    2325
    2426Texture1D::Texture1D() :
  • trunk/packages/vizservers/nanovis/Texture1D.h

    r3502 r3611  
    1818
    1919#include <GL/glew.h>
     20
     21namespace nv {
    2022
    2123class Texture1D
     
    6870};
    6971
     72}
     73
    7074#endif
  • trunk/packages/vizservers/nanovis/Texture2D.cpp

    r3561 r3611  
    2222#include "Texture2D.h"
    2323#include "Trace.h"
     24
     25using namespace nv;
    2426
    2527Texture2D::Texture2D() :
  • trunk/packages/vizservers/nanovis/Texture2D.h

    r3502 r3611  
    1818
    1919#include <GL/glew.h>
     20
     21namespace nv {
    2022
    2123class Texture2D
     
    7779};
    7880
     81}
     82
    7983#endif
  • trunk/packages/vizservers/nanovis/Texture3D.cpp

    r3561 r3611  
    2222#include "Texture3D.h"
    2323#include "Trace.h"
     24
     25using namespace nv;
    2426
    2527Texture3D::Texture3D() :
  • trunk/packages/vizservers/nanovis/Texture3D.h

    r3502 r3611  
    1818
    1919#include <GL/glew.h>
     20
     21namespace nv {
    2022
    2123class Texture3D
     
    8688};
    8789
     90}
     91
    8892#endif
  • trunk/packages/vizservers/nanovis/TransferFunction.cpp

    r3568 r3611  
    2222#include "TransferFunction.h"
    2323
     24using namespace nv;
    2425using namespace vrmath;
    2526
  • trunk/packages/vizservers/nanovis/TransferFunction.h

    r3568 r3611  
    2222
    2323#include "Texture1D.h"
     24
     25namespace nv {
    2426
    2527class TransferFunction
     
    7880};
    7981
     82}
     83
    8084#endif
  • trunk/packages/vizservers/nanovis/Unirect.cpp

    r3605 r3611  
    1515#include "Unirect.h"
    1616#include "Trace.h"
     17
     18using namespace nv;
    1719
    1820static inline char *
  • trunk/packages/vizservers/nanovis/VelocityArrowsSlice.cpp

    r3502 r3611  
    2020#include "VelocityArrowsSlice.h"
    2121#include "NvShader.h"
    22 #include "NvCamera.h"
    23 
     22#include "Camera.h"
     23
     24using namespace nv;
    2425using namespace nv::util;
    2526using namespace vrmath;
  • trunk/packages/vizservers/nanovis/VelocityArrowsSlice.h

    r3502 r3611  
    1313#include "Texture2D.h"
    1414#include "NvShader.h"
     15
     16namespace nv {
    1517
    1618class VelocityArrowsSlice
     
    135137};
    136138
     139}
     140
    137141#endif
  • trunk/packages/vizservers/nanovis/Volume.cpp

    r3597 r3611  
    2424#include "Trace.h"
    2525
     26using namespace nv;
    2627using namespace vrmath;
    2728
  • trunk/packages/vizservers/nanovis/Volume.h

    r3597 r3611  
    2626#include "AxisRange.h"
    2727#include "TransferFunction.h"
     28
     29namespace nv {
    2830
    2931struct CutPlane {
     
    468470}
    469471
     472}
     473
    470474#endif
  • trunk/packages/vizservers/nanovis/VolumeInterpolator.cpp

    r3597 r3611  
    1717#include "Trace.h"
    1818
     19using namespace nv;
    1920using namespace vrmath;
    2021
  • trunk/packages/vizservers/nanovis/VolumeInterpolator.h

    r3502 r3611  
    1010
    1111#include "Volume.h"
     12
     13namespace nv {
    1214
    1315class VolumeInterpolator
     
    6466}
    6567
     68}
     69
    6670#endif
    6771
  • trunk/packages/vizservers/nanovis/VolumeRenderer.cpp

    r3597 r3611  
    3131#include "Trace.h"
    3232
     33using namespace nv;
    3334using namespace vrmath;
    3435
  • trunk/packages/vizservers/nanovis/VolumeRenderer.h

    r3502 r3611  
    2424#include "NvZincBlendeVolumeShader.h"
    2525#include "NvStdVertexShader.h"
     26
     27namespace nv {
    2628
    2729class VolumeRenderer
     
    114116};
    115117
     118}
     119
    116120#endif
  • trunk/packages/vizservers/nanovis/VtkReader.cpp

    r3597 r3611  
    2020#include "Volume.h"
    2121#include "Trace.h"
     22
     23using namespace nv;
    2224
    2325enum FieldType {
     
    181183
    182184Volume *
    183 load_vtk_volume_stream(Rappture::Outcome& result, const char *tag, std::iostream& fin)
     185nv::load_vtk_volume_stream(Rappture::Outcome& result, const char *tag, std::iostream& fin)
    184186{
    185187    TRACE("Enter tag:%s", tag);
  • trunk/packages/vizservers/nanovis/VtkReader.h

    r3503 r3611  
    1010
    1111namespace Rappture {
    12     class Outcome;
     12class Outcome;
    1313}
     14
     15namespace nv {
     16
    1417class Volume;
    1518
     
    1720load_vtk_volume_stream(Rappture::Outcome& status, const char *tag, std::iostream& fin);
    1821
     22}
     23
    1924#endif
  • trunk/packages/vizservers/nanovis/ZincBlendeReconstructor.cpp

    r3610 r3611  
    22/*
    33 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
    4  *
     4 *
     5 * Authors:
     6 *   Insoo Woo <iwoo@purdue.edu>
    57 */
    68#include <stdio.h>
     
    1012#include <vrmath/Vector3f.h>
    1113
    12 #include "NvZincBlendeReconstructor.h"
     14#include "ZincBlendeReconstructor.h"
    1315#include "ZincBlendeVolume.h"
    1416#include "Trace.h"
    1517
     18using namespace nv;
    1619using namespace vrmath;
    1720
    18 NvZincBlendeReconstructor *NvZincBlendeReconstructor::_instance = NULL;
    19 
    20 NvZincBlendeReconstructor::NvZincBlendeReconstructor()
    21 {
    22 }
    23 
    24 NvZincBlendeReconstructor::~NvZincBlendeReconstructor()
    25 {
    26 }
    27 
    28 NvZincBlendeReconstructor *NvZincBlendeReconstructor::getInstance()
     21ZincBlendeReconstructor *ZincBlendeReconstructor::_instance = NULL;
     22
     23ZincBlendeReconstructor::ZincBlendeReconstructor()
     24{
     25}
     26
     27ZincBlendeReconstructor::~ZincBlendeReconstructor()
     28{
     29}
     30
     31ZincBlendeReconstructor *ZincBlendeReconstructor::getInstance()
    2932{
    3033    if (_instance == NULL) {
    31         return (_instance = new NvZincBlendeReconstructor());
     34        return (_instance = new ZincBlendeReconstructor());
    3235    }
    3336
     
    3538}
    3639
    37 ZincBlendeVolume *NvZincBlendeReconstructor::loadFromFile(const char *fileName)
     40ZincBlendeVolume *ZincBlendeReconstructor::loadFromFile(const char *fileName)
    3841{
    3942    std::ifstream stream;
     
    4750}
    4851
    49 ZincBlendeVolume *NvZincBlendeReconstructor::loadFromStream(std::istream& stream)
     52ZincBlendeVolume *ZincBlendeReconstructor::loadFromStream(std::istream& stream)
    5053{
    5154    ZincBlendeVolume *volume = NULL;
     
    201204
    202205ZincBlendeVolume *
    203 NvZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta,
     206ZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta,
    204207                                   int width, int height, int depth, void *data)
    205208{
     
    270273
    271274ZincBlendeVolume *
    272 NvZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta,
     275ZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta,
    273276                                   int width, int height, int depth,
    274277                                   int datacount, double emptyvalue, void* data)
     
    347350}
    348351
    349 void NvZincBlendeReconstructor::getLine(std::istream& sin)
     352void ZincBlendeReconstructor::getLine(std::istream& sin)
    350353{
    351354    char ch;
     
    369372
    370373ZincBlendeVolume *
    371 NvZincBlendeReconstructor::loadFromMemory(void *dataBlock)
     374ZincBlendeReconstructor::loadFromMemory(void *dataBlock)
    372375{
    373376    ZincBlendeVolume *volume = NULL;
     
    469472}
    470473
    471 void NvZincBlendeReconstructor::getLine(unsigned char*& stream)
     474void ZincBlendeReconstructor::getLine(unsigned char*& stream)
    472475{
    473476    char ch;
  • trunk/packages/vizservers/nanovis/ZincBlendeReconstructor.h

    r3610 r3611  
    11/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
    22/**
    3  * ----------------------------------------------------------------------
    4  * @class NvZincBlendeReconstructor
    5  *
    6  * ======================================================================
    7  * @author Insoo Woo (iwoo@purdue.edu)
    8  * @author Purdue Rendering and Perceptualization Lab (PURPL)
    9  *
    103 * Copyright (c) 2004-2013  HUBzero Foundation, LLC
    114 *
    12  * See the file "license.terms" for information on usage and
    13  * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    14  * ======================================================================
     5 * Authors:
     6 *   Insoo Woo <iwoo@purdue.edu>
    157 */
    168#ifndef NV_ZINC_BLENDE_RECONSTRUCTOR_H
     
    2416#include <vrmath/Vector3f.h>
    2517
     18namespace nv {
     19
    2620class ZincBlendeVolume;
    2721
    28 class NvZincBlendeReconstructor
     22class ZincBlendeReconstructor
    2923{
    3024public:
     
    6256     * @brief Return a singleton instance
    6357     */
    64     static NvZincBlendeReconstructor *getInstance();
     58    static ZincBlendeReconstructor *getInstance();
    6559
    6660private:
    67     NvZincBlendeReconstructor();
     61    ZincBlendeReconstructor();
    6862
    69     ~NvZincBlendeReconstructor();
     63    ~ZincBlendeReconstructor();
    7064
    7165    /**
     
    7872
    7973    /// A ZincBlendeReconstructor Singleton instance
    80     static NvZincBlendeReconstructor *_instance;
     74    static ZincBlendeReconstructor *_instance;
    8175};
    8276
     77}
     78
    8379#endif
  • trunk/packages/vizservers/nanovis/ZincBlendeVolume.cpp

    r3502 r3611  
    2121#include "ZincBlendeVolume.h"
    2222
     23using namespace nv;
    2324using namespace vrmath;
    2425
  • trunk/packages/vizservers/nanovis/ZincBlendeVolume.h

    r3502 r3611  
    1515 * ======================================================================
    1616 */
    17 #ifndef _ZINCBLENDE_VOLUME_H_
    18 #define _ZINCBLENDE_VOLUME_H_
     17#ifndef NV_ZINCBLENDE_VOLUME_H
     18#define NV_ZINCBLENDE_VOLUME_H
    1919
    2020#include <vrmath/Vector3f.h>
    2121
    2222#include "Volume.h"
     23
     24namespace nv {
    2325
    2426class ZincBlendeVolume : public Volume
     
    3638};
    3739
     40}
     41
    3842#endif
  • trunk/packages/vizservers/nanovis/dxReader.cpp

    r3605 r3611  
    3939#include "config.h"
    4040#include "nanovis.h"
     41#include "dxReader.h"
    4142#include "Unirect.h"
    4243#include "Volume.h"
    43 #include "ZincBlendeVolume.h"
    44 #include "NvZincBlendeReconstructor.h"
     44
     45using namespace nv;
    4546
    4647/**
     
    5758 */
    5859Volume *
    59 load_dx_volume_stream(Rappture::Outcome& result, const char *tag,
    60                       std::iostream& fin)
     60nv::load_dx_volume_stream(Rappture::Outcome& result, const char *tag,
     61                          std::iostream& fin)
    6162{
    6263    TRACE("Enter tag:%s", tag);
  • trunk/packages/vizservers/nanovis/dxReader.h

    r3502 r3611  
    1010
    1111namespace Rappture {
    12     class Outcome;
     12class Outcome;
    1313}
     14
     15namespace nv {
     16
    1417class Volume;
    1518
     
    1821                      std::iostream& fin);
    1922
     23}
     24
    2025#endif
  • trunk/packages/vizservers/nanovis/nanovis.cpp

    r3605 r3611  
    4040#include "Grid.h"
    4141#include "HeightMap.h"
    42 #include "NvCamera.h"
    43 #include "NvLIC.h"
     42#include "Camera.h"
     43#include "LIC.h"
    4444#include "NvShader.h"
    4545#include "OrientationIndicator.h"
     
    7474Fonts *NanoVis::fonts;
    7575int NanoVis::updir = Y_POS;
    76 NvCamera *NanoVis::cam = NULL;
     76Camera *NanoVis::cam = NULL;
    7777RenderContext *NanoVis::renderContext = NULL;
    7878
     
    9696VolumeRenderer *NanoVis::volRenderer = NULL;
    9797VelocityArrowsSlice *NanoVis::velocityArrowsSlice = NULL;
    98 NvLIC *NanoVis::licRenderer = NULL;
     98LIC *NanoVis::licRenderer = NULL;
    9999PlaneRenderer *NanoVis::planeRenderer = NULL;
    100100OrientationIndicator *NanoVis::orientationIndicator = NULL;
     
    318318        sprintf(prefix, "nv>legend %s %g %g", volArg, min, max);
    319319#ifdef USE_THREADS
    320         queuePPM(nv::g_queue, prefix, screenBuffer, width, height);
     320        queuePPM(g_queue, prefix, screenBuffer, width, height);
    321321#else
    322         writePPM(nv::g_fdOut, prefix, screenBuffer, width, height);
     322        writePPM(g_fdOut, prefix, screenBuffer, width, height);
    323323#endif
    324324    }
     
    544544
    545545    velocityArrowsSlice = new VelocityArrowsSlice;
    546     licRenderer = new NvLIC(NMESH, NPIX, NPIX, _licAxis, _licSlice);
     546    licRenderer = new LIC(NMESH, NPIX, NPIX, _licAxis, _licSlice);
    547547
    548548    grid = new Grid();
     
    564564
    565565    //create the camera with default setting
    566     cam = new NvCamera(0, 0, winWidth, winHeight,
    567                        def_eye_x, def_eye_y, def_eye_z);
     566    cam = new Camera(0, 0, winWidth, winHeight,
     567                     def_eye_x, def_eye_y, def_eye_z);
    568568
    569569    glEnable(GL_TEXTURE_2D);
  • trunk/packages/vizservers/nanovis/nanovis.h

    r3605 r3611  
    4949    class Fonts;
    5050}
     51
     52class Camera;
     53class Flow;
     54class Grid;
     55class HeightMap;
     56class LIC;
    5157class OrientationIndicator;
    52 }
    53 
    54 class VolumeRenderer;
    55 class NvParticleRenderer;
    56 class VelocityArrowsSlice;
    57 class NvLIC;
    5858class PlaneRenderer;
    5959class Texture2D;
    60 class HeightMap;
    61 class Grid;
    62 class NvCamera;
    6360class TransferFunction;
     61class VelocityArrowsSlice;
    6462class Volume;
    65 class Flow;
     63class VolumeRenderer;
    6664
    6765class NanoVis
     
    10199    static void removeAllData();
    102100
    103     static const NvCamera *getCamera()
     101    static const Camera *getCamera()
    104102    {
    105103        return cam;
     
    161159    static unsigned char *screenBuffer;
    162160    static Texture2D *legendTexture;
    163     static nv::util::Fonts *fonts;
     161    static util::Fonts *fonts;
    164162    static int updir;
    165     static NvCamera *cam;
    166     static nv::graphics::RenderContext *renderContext;
     163    static Camera *cam;
     164    static graphics::RenderContext *renderContext;
    167165
    168166    static TransferFunctionHashmap tfTable; ///< maps transfunc name to TransferFunction object
     
    177175    static VolumeRenderer *volRenderer;
    178176    static VelocityArrowsSlice *velocityArrowsSlice;
    179     static NvLIC *licRenderer;
     177    static LIC *licRenderer;
    180178    static PlaneRenderer *planeRenderer;
    181     static nv::OrientationIndicator *orientationIndicator;
     179    static OrientationIndicator *orientationIndicator;
    182180    static Grid *grid;
    183181
     
    192190};
    193191
     192}
     193
    194194#endif
Note: See TracChangeset for help on using the changeset viewer.