Changeset 3611
- Timestamp:
- Apr 2, 2013, 8:02:50 PM (12 years ago)
- Location:
- trunk/packages/vizservers/nanovis
- Files:
-
- 72 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Axis.cpp
r3502 r3611 12 12 13 13 #include "Axis.h" 14 15 using namespace nv; 14 16 15 17 inline bool DEFINED(double x) { -
trunk/packages/vizservers/nanovis/Axis.h
r3502 r3611 19 19 #define NAN (std::numeric_limits<double>::quiet_NaN()) 20 20 #endif 21 22 namespace nv { 21 23 22 24 class Axis; … … 409 411 }; 410 412 413 } 414 411 415 #endif -
trunk/packages/vizservers/nanovis/AxisRange.h
r3502 r3611 9 9 10 10 #include <string.h> 11 12 namespace nv { 11 13 12 14 class AxisRange … … 81 83 }; 82 84 85 } 86 83 87 #endif -
trunk/packages/vizservers/nanovis/Camera.cpp
r3610 r3611 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 2 /* 3 * ---------------------------------------------------------------------- 4 * NvCamera.cpp : NvCamera class 3 * Copyright (c) 2004-2013 HUBzero Foundation, LLC 5 4 * 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> 15 7 */ 16 8 #include <stdio.h> … … 28 20 29 21 #include "nanovis.h" 30 #include " NvCamera.h"22 #include "Camera.h" 31 23 #include "Trace.h" 32 24 25 using namespace nv; 33 26 using namespace vrmath; 34 27 … … 43 36 } 44 37 45 NvCamera::NvCamera(int startx, int starty, int w, int h,46 38 Camera::Camera(int startx, int starty, int w, int h, 39 float loc_x, float loc_y, float loc_z) : 47 40 _location(loc_x, loc_y, loc_z), 48 41 _fov(30.0), … … 57 50 58 51 void 59 NvCamera::getUpDirMatrix(Matrix4x4d& upMat)52 Camera::getUpDirMatrix(Matrix4x4d& upMat) 60 53 { 61 54 switch (NanoVis::updir) { … … 97 90 */ 98 91 void 99 NvCamera::reset(const Vector3f& bboxMin,100 101 92 Camera::reset(const Vector3f& bboxMin, 93 const Vector3f& bboxMax, 94 bool resetOrientation) 102 95 { 103 96 TRACE("Enter"); … … 179 172 180 173 void 181 NvCamera::resetClippingRange(const Vector3f& bboxMin, const Vector3f& bboxMax)174 Camera::resetClippingRange(const Vector3f& bboxMin, const Vector3f& bboxMax) 182 175 { 183 176 Vector3f emin(bboxMin.x, bboxMin.y, bboxMin.z), emax(bboxMax.x, bboxMax.y, bboxMax.z); … … 219 212 220 213 void 221 NvCamera::initialize()214 Camera::initialize() 222 215 { 223 216 TRACE("Enter"); … … 238 231 } 239 232 240 void NvCamera::rotate(double *quat)233 void Camera::rotate(double *quat) 241 234 { 242 235 Quaternion q(quat[0], quat[1], quat[2], quat[3]); … … 249 242 } 250 243 251 void NvCamera::rotate(float angleX, float angleY, float angleZ)244 void Camera::rotate(float angleX, float angleY, float angleZ) 252 245 { 253 246 angleX = -angleX; … … 266 259 } 267 260 268 void NvCamera::print() const261 void Camera::print() const 269 262 { 270 263 TRACE("x: %d y: %d w: %d h: %d", _startX, _startY, _width, _height); -
trunk/packages/vizservers/nanovis/Camera.h
r3610 r3611 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 2 /* 3 * ---------------------------------------------------------------------- 4 * NvCamera.h : NvCamera class 3 * Copyright (c) 2004-2013 HUBzero Foundation, LLC 5 4 * 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> 15 7 */ 16 #ifndef CAMERA_H17 #define CAMERA_H8 #ifndef NV_CAMERA_H 9 #define NV_CAMERA_H 18 10 19 11 #include <vrmath/Matrix4x4d.h> … … 22 14 #include "config.h" 23 15 24 class NvCamera 16 namespace nv { 17 18 class Camera 25 19 { 26 20 public: 27 NvCamera(int startx, int starty, int w, int h,21 Camera(int startx, int starty, int w, int h, 28 22 float loc_x, float loc_y, float loc_z); 29 23 30 ~ NvCamera()24 ~Camera() 31 25 {} 32 26 … … 125 119 }; 126 120 121 } 122 127 123 #endif -
trunk/packages/vizservers/nanovis/Chain.cpp
r2923 r3611 27 27 28 28 #include "Chain.h" 29 30 using namespace nv; 29 31 30 32 typedef int (QSortCompareProc) (const void *, const void *); -
trunk/packages/vizservers/nanovis/Chain.h
r2923 r3611 24 24 #ifndef CHAIN_H 25 25 #define CHAIN_H 26 27 namespace nv { 26 28 27 29 /** … … 143 145 }; 144 146 147 } 148 145 149 #endif -
trunk/packages/vizservers/nanovis/Command.cpp
r3608 r3611 60 60 #include "Grid.h" 61 61 #include "HeightMap.h" 62 #include " NvCamera.h"63 #include " NvZincBlendeReconstructor.h"62 #include "Camera.h" 63 #include "ZincBlendeReconstructor.h" 64 64 #include "OrientationIndicator.h" 65 65 #include "Unirect.h" … … 114 114 void 115 115 nv::queueResponse(const void *bytes, size_t len, 116 117 116 Response::AllocationType allocType, 117 Response::ResponseType type) 118 118 { 119 119 Response *response = new Response(type); … … 185 185 186 186 int 187 GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, bool *boolPtr)187 nv::GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, bool *boolPtr) 188 188 { 189 189 int value; … … 197 197 198 198 int 199 GetFloatFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, float *valuePtr)199 nv::GetFloatFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, float *valuePtr) 200 200 { 201 201 double value; … … 285 285 return NULL; 286 286 } 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) || 291 291 (Tcl_GetIntFromObj(interp, objv[4], &xNum) != TCL_OK) || 292 292 (Tcl_GetIntFromObj(interp, objv[5], &yNum) != TCL_OK)) { … … 317 317 int i; 318 318 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) { 320 320 delete [] heights; 321 321 return NULL; … … 359 359 */ 360 360 int 361 GetVolumeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Volume **volPtrPtr)361 nv::GetVolumeFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Volume **volPtrPtr) 362 362 { 363 363 const char *string = Tcl_GetString(objPtr); … … 477 477 */ 478 478 int 479 GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *indexPtr)479 nv::GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *indexPtr) 480 480 { 481 481 return GetAxis(interp, Tcl_GetString(objPtr), indexPtr); … … 534 534 */ 535 535 int 536 GetDataStream(Tcl_Interp *interp, Rappture::Buffer &buf, int nBytes)536 nv::GetDataStream(Tcl_Interp *interp, Rappture::Buffer &buf, int nBytes) 537 537 { 538 538 if (!SocketRead(buf, nBytes)) { … … 1258 1258 if ((nBytes > 5) && (strncmp(bytes, "<HDR>", 5) == 0)) { 1259 1259 TRACE("ZincBlende Stream loading..."); 1260 volume = NvZincBlendeReconstructor::getInstance()->loadFromMemory(const_cast<char *>(bytes));1260 volume = (Volume *)ZincBlendeReconstructor::getInstance()->loadFromMemory(const_cast<char *>(bytes)); 1261 1261 if (volume == NULL) { 1262 1262 Tcl_AppendResult(interp, "can't get volume instance", (char *)NULL); -
trunk/packages/vizservers/nanovis/Command.h
r3607 r3611 21 21 class Buffer; 22 22 } 23 class Volume;24 23 25 24 namespace nv { 25 26 26 class ReadBuffer; 27 class Volume; 27 28 28 29 #ifdef USE_THREADS … … 47 48 48 49 extern void initTcl(Tcl_Interp *interp, ClientData clientData); 49 }50 50 51 51 extern int GetAxisFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, … … 63 63 Volume **volume); 64 64 65 } 66 65 67 #endif -
trunk/packages/vizservers/nanovis/ContourLineFilter.cpp
r3492 r3611 14 14 #include "ContourLineFilter.h" 15 15 16 using namespace nv; 16 17 using namespace nv::graphics; 17 18 using namespace vrmath; -
trunk/packages/vizservers/nanovis/ContourLineFilter.h
r3492 r3611 9 9 #include <vrmath/Vector3f.h> 10 10 #include <vrmath/Vector4f.h> 11 12 namespace nv { 11 13 12 14 class ContourLineFilter … … 60 62 }; 61 63 64 } 65 62 66 #endif -
trunk/packages/vizservers/nanovis/ConvexPolygon.cpp
r3502 r3611 21 21 #include "Trace.h" 22 22 23 using namespace nv; 23 24 using namespace vrmath; 24 25 -
trunk/packages/vizservers/nanovis/ConvexPolygon.h
r3502 r3611 25 25 26 26 #include "Plane.h" 27 28 namespace nv { 27 29 28 30 typedef std::vector<vrmath::Vector4f> VertexVector; … … 71 73 }; 72 74 75 } 76 73 77 #endif -
trunk/packages/vizservers/nanovis/Flow.cpp
r3597 r3611 20 20 #include "FlowParticles.h" 21 21 #include "FlowBox.h" 22 #include " NvLIC.h"22 #include "LIC.h" 23 23 #include "VelocityArrowsSlice.h" 24 #include "NvParticleRenderer.h"25 24 #include "Switch.h" 26 25 #include "Unirect.h" … … 29 28 #include "TransferFunction.h" 30 29 30 using namespace nv; 31 31 using namespace vrmath; 32 32 -
trunk/packages/vizservers/nanovis/Flow.h
r3597 r3611 25 25 #include "FlowParticles.h" 26 26 #include "FlowBox.h" 27 #include "NvLIC.h" 28 #include "NvParticleRenderer.h" 27 #include "LIC.h" 29 28 #include "Unirect.h" 30 29 #include "Volume.h" 31 30 #include "TransferFunction.h" 31 32 namespace nv { 32 33 33 34 struct FlowValues { … … 253 254 }; 254 255 256 } 257 255 258 #endif -
trunk/packages/vizservers/nanovis/FlowBox.cpp
r3567 r3611 21 21 #include "Trace.h" 22 22 23 using namespace nv; 23 24 using namespace vrmath; 24 25 -
trunk/packages/vizservers/nanovis/FlowBox.h
r3568 r3611 21 21 #include "Switch.h" 22 22 #include "Volume.h" 23 24 namespace nv { 23 25 24 26 struct FlowBoxValues { … … 71 73 }; 72 74 75 } 76 73 77 #endif -
trunk/packages/vizservers/nanovis/FlowCmd.cpp
r3608 r3611 37 37 #include "Switch.h" 38 38 #include "TransferFunction.h" 39 #include " NvLIC.h"39 #include "LIC.h" 40 40 #include "Unirect.h" 41 41 #include "VelocityArrowsSlice.h" … … 840 840 */ 841 841 int 842 FlowInstObjCmd(ClientData clientData, Tcl_Interp *interp, int objc,843 Tcl_Obj *const *objv)842 nv::FlowInstObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, 843 Tcl_Obj *const *objv) 844 844 { 845 845 Tcl_ObjCmdProc *proc; … … 863 863 */ 864 864 void 865 FlowInstDeleteProc(ClientData clientData)865 nv::FlowInstDeleteProc(ClientData clientData) 866 866 { 867 867 Flow *flow = (Flow *)clientData; … … 1307 1307 */ 1308 1308 void 1309 FlowCmdInitProc(Tcl_Interp *interp, ClientData clientData)1309 nv::FlowCmdInitProc(Tcl_Interp *interp, ClientData clientData) 1310 1310 { 1311 1311 Tcl_CreateObjCommand(interp, "flow", FlowCmdProc, clientData, NULL); -
trunk/packages/vizservers/nanovis/FlowCmd.h
r3605 r3611 27 27 #include <tcl.h> 28 28 29 namespace nv { 30 29 31 extern void FlowCmdInitProc(Tcl_Interp *interp, ClientData clientData); 30 32 … … 32 34 extern Tcl_CmdDeleteProc FlowInstDeleteProc; 33 35 36 } 37 34 38 #endif -
trunk/packages/vizservers/nanovis/FlowParticles.cpp
r3597 r3611 19 19 #include "Trace.h" 20 20 21 using namespace nv; 21 22 using namespace vrmath; 22 23 23 24 FlowParticles::FlowParticles(const char *name) : 24 25 _name(name), 25 _renderer(new NvParticleRenderer(NMESH, NMESH))26 _renderer(new ParticleRenderer(NMESH, NMESH)) 26 27 { 27 28 _sv.position.value = 0.0f; -
trunk/packages/vizservers/nanovis/FlowParticles.h
r3597 r3611 9 9 * Leif Delgass <ldelgass@purdue.edu> 10 10 */ 11 #ifndef FLOWPARTICLES_H12 #define FLOWPARTICLES_H11 #ifndef _FLOWPARTICLES_H 12 #define _FLOWPARTICLES_H 13 13 14 14 #include <cassert> … … 21 21 #include "FlowTypes.h" 22 22 #include "Switch.h" 23 #include " NvParticleRenderer.h"23 #include "ParticleRenderer.h" 24 24 #include "Volume.h" 25 26 namespace nv { 25 27 26 28 struct FlowParticlesValues { … … 96 98 */ 97 99 std::string _name; 98 NvParticleRenderer *_renderer; ///< Particle renderer100 nv::ParticleRenderer *_renderer; ///< Particle renderer 99 101 FlowParticlesValues _sv; 100 102 … … 102 104 }; 103 105 106 } 107 104 108 #endif -
trunk/packages/vizservers/nanovis/FlowTypes.h
r3567 r3611 11 11 #ifndef FLOWTYPES_H 12 12 #define FLOWTYPES_H 13 14 namespace nv { 13 15 14 16 struct FlowColor { … … 30 32 #define ABSPOS 1 31 33 34 } 35 32 36 #endif -
trunk/packages/vizservers/nanovis/Grid.cpp
r3605 r3611 13 13 #include "Trace.h" 14 14 15 using namespace nv; 15 16 using namespace nv::util; 16 17 -
trunk/packages/vizservers/nanovis/Grid.h
r3502 r3611 11 11 #include "Axis.h" 12 12 #include "AxisRange.h" 13 14 namespace nv { 13 15 14 16 class RGBA … … 74 76 }; 75 77 78 } 76 79 77 80 #endif -
trunk/packages/vizservers/nanovis/HeightMap.cpp
r3605 r3611 15 15 #include "Texture1D.h" 16 16 17 using namespace nv; 18 using namespace nv::graphics; 19 using namespace vrmath; 20 17 21 bool HeightMap::updatePending = false; 18 22 double HeightMap::valueMin = 0.0; 19 23 double HeightMap::valueMax = 1.0; 20 21 using namespace nv::graphics;22 using namespace vrmath;23 24 24 25 HeightMap::HeightMap() : -
trunk/packages/vizservers/nanovis/HeightMap.h
r3597 r3611 4 4 * 5 5 */ 6 #ifndef HEIGHTMAP_H7 #define HEIGHTMAP_H6 #ifndef NV_HEIGHTMAP_H 7 #define NV_HEIGHTMAP_H 8 8 9 9 #include <graphics/Geometry.h> … … 14 14 #include "NvShader.h" 15 15 #include "AxisRange.h" 16 17 namespace nv { 16 18 17 19 class Grid; … … 145 147 }; 146 148 149 } 150 147 151 #endif -
trunk/packages/vizservers/nanovis/LIC.cpp
r3610 r3611 21 21 #include "define.h" 22 22 23 #include " NvLIC.h"23 #include "LIC.h" 24 24 #include "NvShader.h" 25 25 #include "Trace.h" … … 29 29 #define SCALE 3.0 //scale for background pattern. small value -> fine texture 30 30 31 using namespace nv; 31 32 using namespace vrmath; 32 33 33 NvLIC::NvLIC(int size, int width, int height, int axis,34 34 LIC::LIC(int size, int width, int height, int axis, 35 float offset) : 35 36 _width(width), 36 37 _height(height), … … 116 117 } 117 118 118 NvLIC::~NvLIC()119 LIC::~LIC() 119 120 { 120 121 glDeleteTextures(1, &_patternTex); … … 138 139 139 140 void 140 NvLIC::makePatterns()141 LIC::makePatterns() 141 142 { 142 143 TRACE("Enter"); … … 185 186 } 186 187 187 void NvLIC::makeMagnitudes()188 void LIC::makeMagnitudes() 188 189 { 189 190 GLubyte mag[NMESH][NMESH][4]; … … 222 223 223 224 void 224 NvLIC::getSlice()225 LIC::getSlice() 225 226 { 226 227 int fboOrig; … … 320 321 //line integral convolution 321 322 void 322 NvLIC::convolve()323 LIC::convolve() 323 324 { 324 325 if (_vectorFieldId == 0) { … … 433 434 434 435 void 435 NvLIC::render()436 LIC::render() 436 437 { 437 438 if (_vectorFieldId == 0) { … … 490 491 491 492 void 492 NvLIC::setVectorField(unsigned int texID, const Vector3f& origin,493 LIC::setVectorField(unsigned int texID, const Vector3f& origin, 493 494 float scaleX, float scaleY, float scaleZ, float max) 494 495 { 495 TRACE(" NvLIC: vector field is assigned [%d]", texID);496 TRACE("LIC: vector field is assigned [%d]", texID); 496 497 _vectorFieldId = texID; 497 498 _origin = origin; … … 505 506 506 507 void 507 NvLIC::getVelocity(float x, float y, float *px, float *py)508 LIC::getVelocity(float x, float y, float *px, float *py) 508 509 { 509 510 float vx, vy, r; … … 544 545 545 546 void 546 NvLIC::setOffset(float offset)547 LIC::setOffset(float offset) 547 548 { 548 549 _offset = offset; … … 550 551 } 551 552 552 void NvLIC::setAxis(int axis)553 void LIC::setAxis(int axis) 553 554 { 554 555 _axis = axis; 555 556 } 556 557 557 void NvLIC::reset()558 void LIC::reset() 558 559 { 559 560 makePatterns(); -
trunk/packages/vizservers/nanovis/LIC.h
r3610 r3611 24 24 #include "NvShader.h" 25 25 26 class NvLIC 26 namespace nv { 27 28 class LIC 27 29 { 28 30 public: 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(); 31 33 32 34 /// project 3D vectors to a 2D slice for line integral convolution … … 124 126 }; 125 127 128 } 129 126 130 #endif -
trunk/packages/vizservers/nanovis/Makefile.in
r3605 r3611 108 108 Axis.o \ 109 109 BMPWriter.o \ 110 Camera.o \ 110 111 Chain.o \ 111 112 CmdProc.o \ … … 120 121 Grid.o \ 121 122 HeightMap.o \ 122 NvCamera.o \123 LIC.o \ 123 124 NvColorTableShader.o \ 124 NvLIC.o \125 125 NvParticleAdvectionShader.o \ 126 NvParticleRenderer.o \127 126 NvRegularVolumeShader.o \ 128 127 NvShader.o \ 129 128 NvStdVertexShader.o \ 130 129 NvVolumeShader.o \ 131 NvZincBlendeReconstructor.o \132 130 NvZincBlendeVolumeShader.o \ 133 131 OrientationIndicator.o \ 132 ParticleRenderer.o \ 134 133 PerfQuery.o \ 135 134 Plane.o \ … … 152 151 VolumeRenderer.o \ 153 152 VtkReader.o \ 153 ZincBlendeReconstructor.o \ 154 154 ZincBlendeVolume.o \ 155 155 dxReader.o \ … … 279 279 BMPWriter.o: BMPWriter.cpp nanovis.h 280 280 BucketSort.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 281 Camera.o: Camera.cpp Camera.h config.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h 281 282 Chain.o: Chain.cpp Chain.h 282 283 CmdProc.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.h284 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 Camera.h ZincBlendeReconstructor.h OrientationIndicator.h Unirect.h Volume.h VolumeRenderer.h 284 285 ContourLineFilter.o: ContourLineFilter.cpp ContourLineFilter.h 285 286 ConvexPolygon.o: ConvexPolygon.cpp ConvexPolygon.h $(VRMATH_DIR)/include/vrmath/Vector4f.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h Plane.h 286 287 Flow.o: Flow.cpp Flow.h FlowCmd.h FlowTypes.h FlowBox.h FlowParticles.h Switch.h Trace.h 287 288 FlowBox.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.h289 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.h289 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 LIC.h Unirect.h Volume.h VelocityArrowsSlice.h $(VRMATH_DIR)/include/vrmath/Vector3f.h 290 FlowParticles.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 290 291 GradientFilter.o: GradientFilter.cpp GradientFilter.h 291 292 Grid.o: Grid.cpp Grid.h Axis.h Chain.h 292 293 HeightMap.o: HeightMap.cpp HeightMap.h 293 NvCamera.o: NvCamera.cpp NvCamera.h config.h $(VRMATH_DIR)/include/vrmath/Matrix4x4d.h294 LIC.o: LIC.cpp LIC.h 294 295 NvColorTableShader.o: NvColorTableShader.cpp NvColorTableShader.h NvShader.h 295 NvLIC.o: NvLIC.cpp NvLIC.h296 296 NvParticleAdvectionShader.o: NvParticleAdvectionShader.cpp NvParticleAdvectionShader.h NvShader.h 297 NvParticleRenderer.o: NvParticleRenderer.cpp NvParticleRenderer.h298 297 NvRegularVolumeShader.o: NvRegularVolumeShader.cpp NvRegularVolumeShader.h NvVolumeShader.h NvShader.h 299 298 NvShader.o: NvShader.cpp NvShader.h 300 299 NvStdVertexShader.o: NvStdVertexShader.cpp NvStdVertexShader.h NvShader.h 301 300 NvVolumeShader.o: NvVolumeShader.cpp NvVolumeShader.h NvShader.h 302 NvZincBlendeReconstructor.o: NvZincBlendeReconstructor.cpp NvZincBlendeReconstructor.h ZincBlendeVolume.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h303 301 NvZincBlendeVolumeShader.o: NvZincBlendeVolumeShader.cpp NvZincBlendeVolumeShader.h NvVolumeShader.h NvShader.h 304 302 OrientationIndicator.o: OrientationIndicator.cpp OrientationIndicator.h 305 303 ParticleEmitter.o: ParticleEmitter.cpp ParticleEmitter.h 304 ParticleRenderer.o: ParticleRenderer.cpp ParticleRenderer.h 306 305 ParticleSystem.o: ParticleSystem.cpp ParticleSystem.h DataLoader.h 307 306 ParticleSystemFactory.o: ParticleSystemFactory.cpp ParticleSystemFactory.h … … 326 325 Volume.o: Volume.cpp Volume.h config.h define.h 327 326 VolumeInterpolator.o: VolumeInterpolator.cpp VolumeInterpolator.h Volume.h 328 VolumeRenderer.o: VolumeRenderer.cpp VolumeRenderer.h 327 VolumeRenderer.o: VolumeRenderer.cpp VolumeRenderer.h ConvexPolygon.h Volume.h nanovis.h Trace.h Plane.h NvStdVertexShader.h NvShader.h 329 328 VtkReader.o: VtkReader.h Trace.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h ReaderCommon.h nanovis.h 329 ZincBlendeReconstructor.o: ZincBlendeReconstructor.cpp ZincBlendeReconstructor.h ZincBlendeVolume.h Volume.h $(VRMATH_DIR)/include/vrmath/Vector3f.h 330 330 ZincBlendeVolume.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.h331 dxReader.o: dxReader.cpp ReaderCommon.h config.h nanovis.h Unirect.h ZincBlendeVolume.h ZincBlendeReconstructor.h 332 332 md5.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.h333 nanovis.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 334 334 nanovisServer.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 5 5 */ 6 6 #include "NvColorTableShader.h" 7 8 using namespace nv; 7 9 8 10 NvColorTableShader::NvColorTableShader() -
trunk/packages/vizservers/nanovis/NvColorTableShader.h
r3502 r3611 10 10 #include "Texture2D.h" 11 11 #include "TransferFunction.h" 12 13 namespace nv { 12 14 13 15 class NvColorTableShader : public NvShader … … 26 28 }; 27 29 30 } 31 28 32 #endif -
trunk/packages/vizservers/nanovis/NvParticleAdvectionShader.cpp
r3502 r3611 5 5 */ 6 6 #include "NvParticleAdvectionShader.h" 7 8 using namespace nv; 7 9 8 10 NvParticleAdvectionShader::NvParticleAdvectionShader() : -
trunk/packages/vizservers/nanovis/NvParticleAdvectionShader.h
r3502 r3611 10 10 11 11 #include "NvShader.h" 12 13 namespace nv { 12 14 13 15 class NvParticleAdvectionShader : public NvShader … … 56 58 }; 57 59 60 } 61 58 62 #endif -
trunk/packages/vizservers/nanovis/NvRegularVolumeShader.cpp
r3502 r3611 5 5 */ 6 6 #include "NvRegularVolumeShader.h" 7 8 using namespace nv; 7 9 8 10 NvRegularVolumeShader::NvRegularVolumeShader() -
trunk/packages/vizservers/nanovis/NvRegularVolumeShader.h
r3502 r3611 9 9 #include "Volume.h" 10 10 #include "NvVolumeShader.h" 11 12 namespace nv { 11 13 12 14 /// Shader for regular volume (uniform grid) … … 27 29 }; 28 30 31 } 32 29 33 #endif -
trunk/packages/vizservers/nanovis/NvShader.cpp
r3502 r3611 15 15 #include "Trace.h" 16 16 17 using namespace nv; 17 18 using namespace nv::util; 18 19 -
trunk/packages/vizservers/nanovis/NvShader.h
r3502 r3611 15 15 16 16 #include "Trace.h" 17 18 namespace nv { 17 19 18 20 class NvShader … … 337 339 }; 338 340 341 } 342 339 343 #endif -
trunk/packages/vizservers/nanovis/NvStdVertexShader.cpp
r3502 r3611 5 5 */ 6 6 #include "NvStdVertexShader.h" 7 8 using namespace nv; 7 9 8 10 NvStdVertexShader::NvStdVertexShader() -
trunk/packages/vizservers/nanovis/NvStdVertexShader.h
r3502 r3611 8 8 9 9 #include "NvShader.h" 10 11 namespace nv { 10 12 11 13 class NvStdVertexShader : public NvShader … … 27 29 }; 28 30 31 } 32 29 33 #endif 30 34 -
trunk/packages/vizservers/nanovis/NvVolumeShader.cpp
r3502 r3611 5 5 */ 6 6 #include "NvVolumeShader.h" 7 8 using namespace nv; 7 9 8 10 NvVolumeShader::NvVolumeShader() -
trunk/packages/vizservers/nanovis/NvVolumeShader.h
r3502 r3611 8 8 9 9 #include "NvShader.h" 10 11 namespace nv { 10 12 11 13 class Volume; … … 28 30 }; 29 31 32 } 30 33 31 34 #endif // -
trunk/packages/vizservers/nanovis/NvZincBlendeVolumeShader.cpp
r3502 r3611 4 4 * 5 5 */ 6 6 7 #include "NvZincBlendeVolumeShader.h" 8 #include "ZincBlendeVolume.h" 9 10 using namespace nv; 7 11 8 12 NvZincBlendeVolumeShader::NvZincBlendeVolumeShader() -
trunk/packages/vizservers/nanovis/NvZincBlendeVolumeShader.h
r3502 r3611 7 7 #define NV_ZINCBLENDE_SHADER_H 8 8 9 #include "ZincBlendeVolume.h"10 9 #include "NvVolumeShader.h" 10 11 namespace nv { 11 12 12 13 class NvZincBlendeVolumeShader : public NvVolumeShader … … 26 27 }; 27 28 29 } 30 28 31 #endif -
trunk/packages/vizservers/nanovis/ParticleRenderer.cpp
r3610 r3611 1 1 /* -*- 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 /* 10 3 * Copyright (c) 2004-2013 HUBzero Foundation, LLC 11 4 * 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> 15 7 */ 16 8 … … 21 13 #include <GL/glew.h> 22 14 23 #include " NvParticleRenderer.h"15 #include "ParticleRenderer.h" 24 16 #include "define.h" 25 17 #include "Trace.h" 26 18 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) : 19 using namespace nv; 20 21 NvParticleAdvectionShader *ParticleRenderer::_advectionShader = NULL; 22 ParticleAdvectionShaderInstance shaderInstance; 23 24 ParticleRenderer::ParticleRenderer(int w, int h) : 46 25 _initPosTex(0), 47 26 _data(NULL), … … 128 107 } 129 108 130 NvParticleRenderer::~NvParticleRenderer()109 ParticleRenderer::~ParticleRenderer() 131 110 { 132 111 glDeleteTextures(1, &_initPosTex); … … 144 123 } 145 124 146 void NvParticleRenderer::initializeDataArray() 125 void 126 ParticleRenderer::initializeDataArray() 147 127 { 148 128 size_t n = _psysWidth * _psysHeight * 4; … … 193 173 } 194 174 195 void NvParticleRenderer::initialize() 175 void 176 ParticleRenderer::initialize() 196 177 { 197 178 initializeDataArray(); … … 223 204 } 224 205 225 void NvParticleRenderer::reset() 206 void 207 ParticleRenderer::reset() 226 208 { 227 209 glBindTexture(GL_TEXTURE_RECTANGLE_ARB, _psysTex[0]); … … 239 221 } 240 222 241 void 242 NvParticleRenderer::advect()223 void 224 ParticleRenderer::advect() 243 225 { 244 226 if (_reborn) … … 307 289 308 290 void 309 NvParticleRenderer::updateVertexBuffer()291 ParticleRenderer::updateVertexBuffer() 310 292 { 311 293 _vertexArray->read(_psysWidth, _psysHeight); … … 315 297 } 316 298 317 void 318 NvParticleRenderer::render()299 void 300 ParticleRenderer::render() 319 301 { 320 302 glPushAttrib(GL_ENABLE_BIT); … … 344 326 345 327 void 346 NvParticleRenderer::setVectorField(unsigned int texID, const vrmath::Vector3f& origin,347 348 328 ParticleRenderer::setVectorField(unsigned int texID, const vrmath::Vector3f& origin, 329 float scaleX, float scaleY, float scaleZ, 330 float max) 349 331 { 350 332 _origin = origin; … … 354 336 } 355 337 356 void NvParticleRenderer::setAxis(int axis) 338 void 339 ParticleRenderer::setAxis(int axis) 357 340 { 358 341 _sliceAxis = axis; … … 360 343 } 361 344 362 void NvParticleRenderer::setPos(float pos) 345 void 346 ParticleRenderer::setPos(float pos) 363 347 { 364 348 _slicePos = pos; -
trunk/packages/vizservers/nanovis/ParticleRenderer.h
r3610 r3611 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 2 /* 3 * ----------------------------------------------------------------------4 * NvParticleRenderer.h: particle system class5 *6 * ======================================================================7 * AUTHOR: Wei Qiao <qiaow@purdue.edu>8 * Purdue Rendering and Perceptualization Lab (PURPL)9 *10 3 * Copyright (c) 2004-2013 HUBzero Foundation, LLC 11 4 * 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> 15 7 */ 16 #ifndef NV PARTICLERENDERER_H17 #define NV PARTICLERENDERER_H8 #ifndef NV_PARTICLE_RENDERER_H 9 #define NV_PARTICLE_RENDERER_H 18 10 19 11 #include <GL/glew.h> … … 24 16 #include "NvParticleAdvectionShader.h" 25 17 #include "RenderVertexArray.h" 18 19 namespace nv { 26 20 27 21 struct Particle { … … 39 33 }; 40 34 41 class NvParticleRenderer35 class ParticleRenderer 42 36 { 43 37 public: 44 NvParticleRenderer(int w, int h);38 ParticleRenderer(int w, int h); 45 39 46 ~ NvParticleRenderer();40 ~ParticleRenderer(); 47 41 48 42 void setVectorField(unsigned int texID, const vrmath::Vector3f& origin, … … 135 129 }; 136 130 131 class ParticleAdvectionShaderInstance 132 { 133 public : 134 ParticleAdvectionShaderInstance() 135 {} 136 137 ~ParticleAdvectionShaderInstance() 138 { 139 if (ParticleRenderer::_advectionShader) { 140 delete ParticleRenderer::_advectionShader; 141 } 142 } 143 }; 144 145 } 146 137 147 #endif -
trunk/packages/vizservers/nanovis/PerfQuery.cpp
r3502 r3611 17 17 18 18 #include "PerfQuery.h" 19 20 using namespace nv; 19 21 20 22 PerfQuery::PerfQuery() -
trunk/packages/vizservers/nanovis/PerfQuery.h
r3502 r3611 24 24 25 25 #include "Trace.h" 26 27 namespace nv { 26 28 27 29 class PerfQuery … … 68 70 } 69 71 } 72 73 } 74 70 75 #endif 71 76 -
trunk/packages/vizservers/nanovis/PlaneRenderer.cpp
r3597 r3611 19 19 #include "PlaneRenderer.h" 20 20 #include "Trace.h" 21 22 using namespace nv; 21 23 22 24 PlaneRenderer::PlaneRenderer(int width, int height) : -
trunk/packages/vizservers/nanovis/PlaneRenderer.h
r3502 r3611 22 22 #include "TransferFunction.h" 23 23 #include "Texture2D.h" 24 25 namespace nv { 24 26 25 27 class PlaneRenderer … … 55 57 }; 56 58 59 } 60 57 61 #endif -
trunk/packages/vizservers/nanovis/ReaderCommon.cpp
r3580 r3611 4 4 * 5 5 */ 6 7 #include <cstdlib> 8 9 #include <vrmath/Vector3f.h> 10 6 11 #include "ReaderCommon.h" 7 12 #include "GradientFilter.h" 8 13 9 #include <vrmath/Vector3f.h> 10 11 #include "stdlib.h" 12 14 using namespace nv; 13 15 using namespace vrmath; 14 16 15 17 float * 16 merge(float *scalar, float *gradient, int size)18 nv::merge(float *scalar, float *gradient, int size) 17 19 { 18 20 float *data = (float *)malloc(sizeof(float) * 4 * size); … … 43 45 */ 44 46 void 45 n ormalizeScalar(float *data, int count, int stride, double vmin, double vmax)47 nv::normalizeScalar(float *data, int count, int stride, double vmin, double vmax) 46 48 { 47 49 double dv = vmax - vmin; … … 82 84 */ 83 85 float * 84 computeGradient(float *data,85 int nx, int ny, int nz,86 float dx, float dy, float dz,87 float min, float max)86 nv::computeGradient(float *data, 87 int nx, int ny, int nz, 88 float dx, float dy, float dz, 89 float min, float max) 88 90 { 89 91 int npts = nx * ny * nz; … … 123 125 */ 124 126 void 125 computeSimpleGradient(float *data,126 int nx, int ny, int nz,127 float dx, float dy, float dz)127 nv::computeSimpleGradient(float *data, 128 int nx, int ny, int nz, 129 float dx, float dy, float dz) 128 130 { 129 131 bool clampToEdge = true; -
trunk/packages/vizservers/nanovis/ReaderCommon.h
r3574 r3611 6 6 #ifndef DX_READER_COMMON_H 7 7 #define DX_READER_COMMON_H 8 9 namespace nv { 8 10 9 11 extern float * … … 24 26 float dx = 1.0f, float dy = 1.0f, float dz = 1.0f); 25 27 28 } 29 26 30 #endif -
trunk/packages/vizservers/nanovis/RenderVertexArray.cpp
r3502 r3611 42 42 #include "RenderVertexArray.h" 43 43 #include "Trace.h" 44 45 using namespace nv; 44 46 45 47 RenderVertexArray::RenderVertexArray(int nverts, GLint size, GLenum type) : -
trunk/packages/vizservers/nanovis/RenderVertexArray.h
r3502 r3611 19 19 #include <GL/glew.h> 20 20 #include <GL/gl.h> 21 22 namespace nv { 21 23 22 24 class RenderVertexArray … … 44 46 }; 45 47 48 } 49 46 50 #endif -
trunk/packages/vizservers/nanovis/Texture1D.cpp
r3561 r3611 21 21 #include "Texture1D.h" 22 22 #include "Trace.h" 23 24 using namespace nv; 23 25 24 26 Texture1D::Texture1D() : -
trunk/packages/vizservers/nanovis/Texture1D.h
r3502 r3611 18 18 19 19 #include <GL/glew.h> 20 21 namespace nv { 20 22 21 23 class Texture1D … … 68 70 }; 69 71 72 } 73 70 74 #endif -
trunk/packages/vizservers/nanovis/Texture2D.cpp
r3561 r3611 22 22 #include "Texture2D.h" 23 23 #include "Trace.h" 24 25 using namespace nv; 24 26 25 27 Texture2D::Texture2D() : -
trunk/packages/vizservers/nanovis/Texture2D.h
r3502 r3611 18 18 19 19 #include <GL/glew.h> 20 21 namespace nv { 20 22 21 23 class Texture2D … … 77 79 }; 78 80 81 } 82 79 83 #endif -
trunk/packages/vizservers/nanovis/Texture3D.cpp
r3561 r3611 22 22 #include "Texture3D.h" 23 23 #include "Trace.h" 24 25 using namespace nv; 24 26 25 27 Texture3D::Texture3D() : -
trunk/packages/vizservers/nanovis/Texture3D.h
r3502 r3611 18 18 19 19 #include <GL/glew.h> 20 21 namespace nv { 20 22 21 23 class Texture3D … … 86 88 }; 87 89 90 } 91 88 92 #endif -
trunk/packages/vizservers/nanovis/TransferFunction.cpp
r3568 r3611 22 22 #include "TransferFunction.h" 23 23 24 using namespace nv; 24 25 using namespace vrmath; 25 26 -
trunk/packages/vizservers/nanovis/TransferFunction.h
r3568 r3611 22 22 23 23 #include "Texture1D.h" 24 25 namespace nv { 24 26 25 27 class TransferFunction … … 78 80 }; 79 81 82 } 83 80 84 #endif -
trunk/packages/vizservers/nanovis/Unirect.cpp
r3605 r3611 15 15 #include "Unirect.h" 16 16 #include "Trace.h" 17 18 using namespace nv; 17 19 18 20 static inline char * -
trunk/packages/vizservers/nanovis/VelocityArrowsSlice.cpp
r3502 r3611 20 20 #include "VelocityArrowsSlice.h" 21 21 #include "NvShader.h" 22 #include "NvCamera.h" 23 22 #include "Camera.h" 23 24 using namespace nv; 24 25 using namespace nv::util; 25 26 using namespace vrmath; -
trunk/packages/vizservers/nanovis/VelocityArrowsSlice.h
r3502 r3611 13 13 #include "Texture2D.h" 14 14 #include "NvShader.h" 15 16 namespace nv { 15 17 16 18 class VelocityArrowsSlice … … 135 137 }; 136 138 139 } 140 137 141 #endif -
trunk/packages/vizservers/nanovis/Volume.cpp
r3597 r3611 24 24 #include "Trace.h" 25 25 26 using namespace nv; 26 27 using namespace vrmath; 27 28 -
trunk/packages/vizservers/nanovis/Volume.h
r3597 r3611 26 26 #include "AxisRange.h" 27 27 #include "TransferFunction.h" 28 29 namespace nv { 28 30 29 31 struct CutPlane { … … 468 470 } 469 471 472 } 473 470 474 #endif -
trunk/packages/vizservers/nanovis/VolumeInterpolator.cpp
r3597 r3611 17 17 #include "Trace.h" 18 18 19 using namespace nv; 19 20 using namespace vrmath; 20 21 -
trunk/packages/vizservers/nanovis/VolumeInterpolator.h
r3502 r3611 10 10 11 11 #include "Volume.h" 12 13 namespace nv { 12 14 13 15 class VolumeInterpolator … … 64 66 } 65 67 68 } 69 66 70 #endif 67 71 -
trunk/packages/vizservers/nanovis/VolumeRenderer.cpp
r3597 r3611 31 31 #include "Trace.h" 32 32 33 using namespace nv; 33 34 using namespace vrmath; 34 35 -
trunk/packages/vizservers/nanovis/VolumeRenderer.h
r3502 r3611 24 24 #include "NvZincBlendeVolumeShader.h" 25 25 #include "NvStdVertexShader.h" 26 27 namespace nv { 26 28 27 29 class VolumeRenderer … … 114 116 }; 115 117 118 } 119 116 120 #endif -
trunk/packages/vizservers/nanovis/VtkReader.cpp
r3597 r3611 20 20 #include "Volume.h" 21 21 #include "Trace.h" 22 23 using namespace nv; 22 24 23 25 enum FieldType { … … 181 183 182 184 Volume * 183 load_vtk_volume_stream(Rappture::Outcome& result, const char *tag, std::iostream& fin)185 nv::load_vtk_volume_stream(Rappture::Outcome& result, const char *tag, std::iostream& fin) 184 186 { 185 187 TRACE("Enter tag:%s", tag); -
trunk/packages/vizservers/nanovis/VtkReader.h
r3503 r3611 10 10 11 11 namespace Rappture { 12 12 class Outcome; 13 13 } 14 15 namespace nv { 16 14 17 class Volume; 15 18 … … 17 20 load_vtk_volume_stream(Rappture::Outcome& status, const char *tag, std::iostream& fin); 18 21 22 } 23 19 24 #endif -
trunk/packages/vizservers/nanovis/ZincBlendeReconstructor.cpp
r3610 r3611 2 2 /* 3 3 * Copyright (c) 2004-2013 HUBzero Foundation, LLC 4 * 4 * 5 * Authors: 6 * Insoo Woo <iwoo@purdue.edu> 5 7 */ 6 8 #include <stdio.h> … … 10 12 #include <vrmath/Vector3f.h> 11 13 12 #include " NvZincBlendeReconstructor.h"14 #include "ZincBlendeReconstructor.h" 13 15 #include "ZincBlendeVolume.h" 14 16 #include "Trace.h" 15 17 18 using namespace nv; 16 19 using namespace vrmath; 17 20 18 NvZincBlendeReconstructor *NvZincBlendeReconstructor::_instance = NULL;19 20 NvZincBlendeReconstructor::NvZincBlendeReconstructor()21 { 22 } 23 24 NvZincBlendeReconstructor::~NvZincBlendeReconstructor()25 { 26 } 27 28 NvZincBlendeReconstructor *NvZincBlendeReconstructor::getInstance()21 ZincBlendeReconstructor *ZincBlendeReconstructor::_instance = NULL; 22 23 ZincBlendeReconstructor::ZincBlendeReconstructor() 24 { 25 } 26 27 ZincBlendeReconstructor::~ZincBlendeReconstructor() 28 { 29 } 30 31 ZincBlendeReconstructor *ZincBlendeReconstructor::getInstance() 29 32 { 30 33 if (_instance == NULL) { 31 return (_instance = new NvZincBlendeReconstructor());34 return (_instance = new ZincBlendeReconstructor()); 32 35 } 33 36 … … 35 38 } 36 39 37 ZincBlendeVolume * NvZincBlendeReconstructor::loadFromFile(const char *fileName)40 ZincBlendeVolume *ZincBlendeReconstructor::loadFromFile(const char *fileName) 38 41 { 39 42 std::ifstream stream; … … 47 50 } 48 51 49 ZincBlendeVolume * NvZincBlendeReconstructor::loadFromStream(std::istream& stream)52 ZincBlendeVolume *ZincBlendeReconstructor::loadFromStream(std::istream& stream) 50 53 { 51 54 ZincBlendeVolume *volume = NULL; … … 201 204 202 205 ZincBlendeVolume * 203 NvZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta,206 ZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta, 204 207 int width, int height, int depth, void *data) 205 208 { … … 270 273 271 274 ZincBlendeVolume * 272 NvZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta,275 ZincBlendeReconstructor::buildUp(const Vector3f& origin, const Vector3f& delta, 273 276 int width, int height, int depth, 274 277 int datacount, double emptyvalue, void* data) … … 347 350 } 348 351 349 void NvZincBlendeReconstructor::getLine(std::istream& sin)352 void ZincBlendeReconstructor::getLine(std::istream& sin) 350 353 { 351 354 char ch; … … 369 372 370 373 ZincBlendeVolume * 371 NvZincBlendeReconstructor::loadFromMemory(void *dataBlock)374 ZincBlendeReconstructor::loadFromMemory(void *dataBlock) 372 375 { 373 376 ZincBlendeVolume *volume = NULL; … … 469 472 } 470 473 471 void NvZincBlendeReconstructor::getLine(unsigned char*& stream)474 void ZincBlendeReconstructor::getLine(unsigned char*& stream) 472 475 { 473 476 char ch; -
trunk/packages/vizservers/nanovis/ZincBlendeReconstructor.h
r3610 r3611 1 1 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 2 /** 3 * ----------------------------------------------------------------------4 * @class NvZincBlendeReconstructor5 *6 * ======================================================================7 * @author Insoo Woo (iwoo@purdue.edu)8 * @author Purdue Rendering and Perceptualization Lab (PURPL)9 *10 3 * Copyright (c) 2004-2013 HUBzero Foundation, LLC 11 4 * 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> 15 7 */ 16 8 #ifndef NV_ZINC_BLENDE_RECONSTRUCTOR_H … … 24 16 #include <vrmath/Vector3f.h> 25 17 18 namespace nv { 19 26 20 class ZincBlendeVolume; 27 21 28 class NvZincBlendeReconstructor22 class ZincBlendeReconstructor 29 23 { 30 24 public: … … 62 56 * @brief Return a singleton instance 63 57 */ 64 static NvZincBlendeReconstructor *getInstance();58 static ZincBlendeReconstructor *getInstance(); 65 59 66 60 private: 67 NvZincBlendeReconstructor();61 ZincBlendeReconstructor(); 68 62 69 ~ NvZincBlendeReconstructor();63 ~ZincBlendeReconstructor(); 70 64 71 65 /** … … 78 72 79 73 /// A ZincBlendeReconstructor Singleton instance 80 static NvZincBlendeReconstructor *_instance;74 static ZincBlendeReconstructor *_instance; 81 75 }; 82 76 77 } 78 83 79 #endif -
trunk/packages/vizservers/nanovis/ZincBlendeVolume.cpp
r3502 r3611 21 21 #include "ZincBlendeVolume.h" 22 22 23 using namespace nv; 23 24 using namespace vrmath; 24 25 -
trunk/packages/vizservers/nanovis/ZincBlendeVolume.h
r3502 r3611 15 15 * ====================================================================== 16 16 */ 17 #ifndef _ZINCBLENDE_VOLUME_H_18 #define _ZINCBLENDE_VOLUME_H_17 #ifndef NV_ZINCBLENDE_VOLUME_H 18 #define NV_ZINCBLENDE_VOLUME_H 19 19 20 20 #include <vrmath/Vector3f.h> 21 21 22 22 #include "Volume.h" 23 24 namespace nv { 23 25 24 26 class ZincBlendeVolume : public Volume … … 36 38 }; 37 39 40 } 41 38 42 #endif -
trunk/packages/vizservers/nanovis/dxReader.cpp
r3605 r3611 39 39 #include "config.h" 40 40 #include "nanovis.h" 41 #include "dxReader.h" 41 42 #include "Unirect.h" 42 43 #include "Volume.h" 43 #include "ZincBlendeVolume.h" 44 #include "NvZincBlendeReconstructor.h" 44 45 using namespace nv; 45 46 46 47 /** … … 57 58 */ 58 59 Volume * 59 load_dx_volume_stream(Rappture::Outcome& result, const char *tag,60 std::iostream& fin)60 nv::load_dx_volume_stream(Rappture::Outcome& result, const char *tag, 61 std::iostream& fin) 61 62 { 62 63 TRACE("Enter tag:%s", tag); -
trunk/packages/vizservers/nanovis/dxReader.h
r3502 r3611 10 10 11 11 namespace Rappture { 12 12 class Outcome; 13 13 } 14 15 namespace nv { 16 14 17 class Volume; 15 18 … … 18 21 std::iostream& fin); 19 22 23 } 24 20 25 #endif -
trunk/packages/vizservers/nanovis/nanovis.cpp
r3605 r3611 40 40 #include "Grid.h" 41 41 #include "HeightMap.h" 42 #include " NvCamera.h"43 #include " NvLIC.h"42 #include "Camera.h" 43 #include "LIC.h" 44 44 #include "NvShader.h" 45 45 #include "OrientationIndicator.h" … … 74 74 Fonts *NanoVis::fonts; 75 75 int NanoVis::updir = Y_POS; 76 NvCamera *NanoVis::cam = NULL;76 Camera *NanoVis::cam = NULL; 77 77 RenderContext *NanoVis::renderContext = NULL; 78 78 … … 96 96 VolumeRenderer *NanoVis::volRenderer = NULL; 97 97 VelocityArrowsSlice *NanoVis::velocityArrowsSlice = NULL; 98 NvLIC *NanoVis::licRenderer = NULL;98 LIC *NanoVis::licRenderer = NULL; 99 99 PlaneRenderer *NanoVis::planeRenderer = NULL; 100 100 OrientationIndicator *NanoVis::orientationIndicator = NULL; … … 318 318 sprintf(prefix, "nv>legend %s %g %g", volArg, min, max); 319 319 #ifdef USE_THREADS 320 queuePPM( nv::g_queue, prefix, screenBuffer, width, height);320 queuePPM(g_queue, prefix, screenBuffer, width, height); 321 321 #else 322 writePPM( nv::g_fdOut, prefix, screenBuffer, width, height);322 writePPM(g_fdOut, prefix, screenBuffer, width, height); 323 323 #endif 324 324 } … … 544 544 545 545 velocityArrowsSlice = new VelocityArrowsSlice; 546 licRenderer = new NvLIC(NMESH, NPIX, NPIX, _licAxis, _licSlice);546 licRenderer = new LIC(NMESH, NPIX, NPIX, _licAxis, _licSlice); 547 547 548 548 grid = new Grid(); … … 564 564 565 565 //create the camera with default setting 566 cam = new NvCamera(0, 0, winWidth, winHeight,567 566 cam = new Camera(0, 0, winWidth, winHeight, 567 def_eye_x, def_eye_y, def_eye_z); 568 568 569 569 glEnable(GL_TEXTURE_2D); -
trunk/packages/vizservers/nanovis/nanovis.h
r3605 r3611 49 49 class Fonts; 50 50 } 51 52 class Camera; 53 class Flow; 54 class Grid; 55 class HeightMap; 56 class LIC; 51 57 class OrientationIndicator; 52 }53 54 class VolumeRenderer;55 class NvParticleRenderer;56 class VelocityArrowsSlice;57 class NvLIC;58 58 class PlaneRenderer; 59 59 class Texture2D; 60 class HeightMap;61 class Grid;62 class NvCamera;63 60 class TransferFunction; 61 class VelocityArrowsSlice; 64 62 class Volume; 65 class Flow;63 class VolumeRenderer; 66 64 67 65 class NanoVis … … 101 99 static void removeAllData(); 102 100 103 static const NvCamera *getCamera()101 static const Camera *getCamera() 104 102 { 105 103 return cam; … … 161 159 static unsigned char *screenBuffer; 162 160 static Texture2D *legendTexture; 163 static nv::util::Fonts *fonts;161 static util::Fonts *fonts; 164 162 static int updir; 165 static NvCamera *cam;166 static nv::graphics::RenderContext *renderContext;163 static Camera *cam; 164 static graphics::RenderContext *renderContext; 167 165 168 166 static TransferFunctionHashmap tfTable; ///< maps transfunc name to TransferFunction object … … 177 175 static VolumeRenderer *volRenderer; 178 176 static VelocityArrowsSlice *velocityArrowsSlice; 179 static NvLIC *licRenderer;177 static LIC *licRenderer; 180 178 static PlaneRenderer *planeRenderer; 181 static nv::OrientationIndicator *orientationIndicator;179 static OrientationIndicator *orientationIndicator; 182 180 static Grid *grid; 183 181 … … 192 190 }; 193 191 192 } 193 194 194 #endif
Note: See TracChangeset
for help on using the changeset viewer.