- Timestamp:
- Mar 10, 2008, 5:24:42 PM (17 years ago)
- Location:
- trunk/vizservers/nanovis
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vizservers/nanovis/Chain.h
r933 r934 31 31 */ 32 32 33 class Chain;34 33 35 34 class ChainLink { … … 46 45 ChainLink(void *clientData) { 47 46 _clientData = clientData; 48 _next = _prev = NULL;47 _next = _prev = NULL; 49 48 } 50 49 void *GetValue(void) { -
trunk/vizservers/nanovis/CmdProc.h
r913 r934 49 49 CmdSpec *specs, int operPos, int objc, Tcl_Obj *const *objv, int flags); 50 50 51 #define NumCmdSpecs(s) (sizeof(s) / sizeof(Rappture::CmdSpec)) ;51 #define NumCmdSpecs(s) (sizeof(s) / sizeof(Rappture::CmdSpec)) 52 52 53 } ;53 } 54 54 55 55 -
trunk/vizservers/nanovis/Command.cpp
r932 r934 85 85 // EXTERN DECLARATIONS 86 86 // in Nv.cpp 87 88 extern Grid* NanoVis::grid;89 87 90 88 // in nanovis.cpp -
trunk/vizservers/nanovis/Grid.h
r932 r934 34 34 return _visible; 35 35 } 36 void setVisible(bool visible) { 37 _visible = visible; 38 } 39 void setAxisColor(float r, float g, float b, float a) { 40 _axisColor.SetColor(r, g, b, a); 41 } 42 void setLineColor(float r, float g, float b, float a) { 43 _majorColor.SetColor(r, g, b, a); 44 _minorColor = _majorColor; 45 } 36 46 void render(); 37 38 47 void setFont(R2Fonts* font); 39 void setVisible(bool visible);40 void setAxisColor(float r, float g, float b, float a);41 void setLineColor(float r, float g, float b, float a);42 48 }; 43 49 44 inline void Grid::setVisible(bool visible)45 {46 _visible = visible;47 }48 49 inline void Grid::setAxisColor(float r, float g, float b, float a)50 {51 _axisColor.SetColor(r, g, b, a);52 }53 54 inline void Grid::setLineColor(float r, float g, float b, float a)55 {56 _majorColor.SetColor(r, g, b, a);57 _minorColor = _majorColor;58 }59 50 60 51 #endif -
trunk/vizservers/nanovis/HeightMap.h
r932 r934 12 12 13 13 namespace graphics { 14 class RenderContext;15 } ;14 class RenderContext; 15 } 16 16 17 17 /** -
trunk/vizservers/nanovis/Makefile.in
r933 r934 1 1 2 #3 # FIXME: I can see at least 3 possible candidates for separate libraries.4 # R2, mat, and Image. (First 2 are done.)5 #6 2 SHELL = /bin/sh 7 3 … … 20 16 21 17 INSTALL = @INSTALL@ 18 #Why are these files installed owner writable? 22 19 INSTALL_PROGRAM = ${INSTALL} -m 755 23 20 INSTALL_DATA = ${INSTALL} -m 644 24 21 INSTALL_SCRIPT = ${INSTALL} -m 644 25 22 26 CC = @CC@ 27 28 AUXSRC = config.h define.h global.h 23 AUXSRC = config.h define.h global.h 29 24 30 25 DX_DIR = /usr/lib/dx … … 44 39 R2_INC_SPEC = -I$(srcdir)/$(R2_DIR)/include 45 40 R2_LIB = $(R2_DIR)/src/libR2.a 46 R2_LIB_SPEC = $(R2_LIB) 41 R2_LIB_SPEC = $(R2_LIB) 42 47 43 RP_DIR = @RP_DIR@ 48 44 RP_INC_SPEC = -I$(RP_DIR)/include -I$(RP_DIR)/include/rappture2 49 45 RP_LIB_SPEC = -L$(RP_DIR)/lib -lrappture2 -lb64 -lz 50 46 51 LIBS = \ 52 $(RP_LIB_SPEC) \ 53 -ltcl8.4 \ 54 $(GL_LIB_SPEC) \ 55 $(DX_LIB_SPEC) \ 56 $(IMG_LIB_SPEC) \ 57 $(R2_LIB_SPEC) \ 58 $(MAT_LIB_SPEC) 59 60 INCLUDES = \ 61 -I. \ 62 $(RP_INC_SPEC) \ 63 $(GL_INC_SPEC) \ 64 $(R2_INC_SPEC) \ 65 $(IMG_INC_SPEC) \ 66 $(MAT_INC_SPEC) 67 68 CFLAGS = @CFLAGS@ 69 EXTRA_CFLAGS = -Wall 70 DEFINES = @DEFINES@ 71 CC_SWITCHES = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) 72 73 OBJS = \ 74 BucketSort.o \ 75 NvCamera.o \ 76 CmdProc.o \ 77 Axis.o \ 78 Chain.o \ 79 Color.o \ 80 ColorGradient.o \ 81 ColorGradientGLUTWindow.o \ 82 ColorPaletteWindow.o\ 83 Command.o \ 84 ContourLineFilter.o \ 85 ControlPoint.o \ 86 ConvexPolygon.o \ 87 Event.o \ 88 GradientFilter.o \ 89 Grid.o \ 90 HeightMap.o \ 91 MainWindow.o \ 92 Mat4x4.o \ 93 Nv.o \ 94 NvColorTableRenderer.o \ 95 NvColorTableShader.o \ 96 NvDefaultTFData.o \ 97 NvEventLog.o \ 98 NvLIC.o \ 99 NvLoadFile.o \ 100 NvParticleAdvectionShader.o \ 101 NvParticleRenderer.o \ 102 NvRegularVolumeShader.o \ 103 NvShader.o \ 104 NvStdVertexShader.o \ 105 NvVolumeShader.o \ 106 NvZincBlendeReconstructor.o \ 107 NvZincBlendeVolumeShader.o \ 108 PCASplit.o \ 109 PerfQuery.o \ 110 Plane.o \ 111 PlaneRenderer.o \ 112 PointSet.o \ 113 PointSetRenderer.o \ 114 PointShader.o \ 115 RenderContext.o \ 116 RenderVertexArray.o \ 117 Renderable.o \ 118 RpDX.o \ 119 ScreenSnapper.o \ 120 Socket.o \ 121 Sphere.o \ 122 Texture1D.o \ 123 Texture2D.o \ 124 Texture3D.o \ 125 Trace.o \ 126 TransferFunction.o \ 127 TransferFunctionGLUTWindow.o \ 128 Util.o \ 129 Vector3.o \ 130 Vector4.o \ 131 Volume.o \ 132 VolumeInterpolator.o \ 133 VolumeRenderer.o \ 134 ZincBlendeVolume.o \ 135 dxReader.o \ 136 dxReader2.o \ 137 dxReaderCommon.o \ 138 nanovis.o 139 47 TF_DIR = ./transfer-function 48 TF_INC_SPEC = -I$(TF_DIR) 49 TF_LIB = $(TF_DIR)/libTransferFunction.a 50 TF_LIB_SPEC = $(TF_LIB) 51 52 LIBS = \ 53 $(RP_LIB_SPEC) \ 54 $(DX_LIB_SPEC) \ 55 $(IMG_LIB_SPEC) \ 56 $(R2_LIB_SPEC) \ 57 $(TF_LIB_SPEC) \ 58 $(MAT_LIB_SPEC) \ 59 -ltcl8.4 \ 60 $(GL_LIB_SPEC) 61 62 INCLUDES = \ 63 -I. \ 64 $(RP_INC_SPEC) \ 65 $(GL_INC_SPEC) \ 66 $(R2_INC_SPEC) \ 67 $(IMG_INC_SPEC) \ 68 $(MAT_INC_SPEC) 69 70 CC = @CC@ 71 CFLAGS = @CFLAGS@ 72 EXTRA_CFLAGS = -Wall 73 DEFINES = @DEFINES@ 74 CC_SWITCHES = $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDES) 75 76 OBJS = \ 77 Axis.o \ 78 BucketSort.o \ 79 Chain.o \ 80 CmdProc.o \ 81 Color.o \ 82 Command.o \ 83 ContourLineFilter.o \ 84 ConvexPolygon.o \ 85 Event.o \ 86 GradientFilter.o \ 87 Grid.o \ 88 HeightMap.o \ 89 Mat4x4.o \ 90 Nv.o \ 91 NvCamera.o \ 92 NvColorTableRenderer.o \ 93 NvColorTableShader.o \ 94 NvDefaultTFData.o \ 95 NvEventLog.o \ 96 NvLIC.o \ 97 NvLoadFile.o \ 98 NvParticleAdvectionShader.o \ 99 NvParticleRenderer.o \ 100 NvRegularVolumeShader.o \ 101 NvShader.o \ 102 NvStdVertexShader.o \ 103 NvVolumeShader.o \ 104 NvZincBlendeReconstructor.o \ 105 NvZincBlendeVolumeShader.o \ 106 PCASplit.o \ 107 PerfQuery.o \ 108 Plane.o \ 109 PlaneRenderer.o \ 110 PointSet.o \ 111 PointSetRenderer.o \ 112 PointShader.o \ 113 RenderContext.o \ 114 RenderVertexArray.o \ 115 Renderable.o \ 116 RpDX.o \ 117 ScreenSnapper.o \ 118 Sphere.o \ 119 Texture1D.o \ 120 Texture2D.o \ 121 Texture3D.o \ 122 Trace.o \ 123 TransferFunction.o \ 124 Util.o \ 125 Vector3.o \ 126 Vector4.o \ 127 Volume.o \ 128 VolumeInterpolator.o \ 129 VolumeRenderer.o \ 130 ZincBlendeVolume.o \ 131 dxReader.o \ 132 dxReader2.o \ 133 dxReaderCommon.o \ 134 nanovis.o 135 136 resources = \ 137 $(srcdir)/resources/Font.bmp \ 138 $(srcdir)/resources/particle2.bmp \ 139 $(srcdir)/resources/verdana.fnt \ 140 $(srcdir)/resources/verdana_bold.fnt 141 142 shaders = \ 143 $(srcdir)/shaders/common.cg \ 144 $(srcdir)/shaders/copy_texcoord.cg \ 145 $(srcdir)/shaders/heightcolor.cg \ 146 $(srcdir)/shaders/one_plane.cg \ 147 $(srcdir)/shaders/one_volume.cg \ 148 $(srcdir)/shaders/passthru.cg \ 149 $(srcdir)/shaders/pointsvp.cg \ 150 $(srcdir)/shaders/render_vel.cg \ 151 $(srcdir)/shaders/update_pos.cg \ 152 $(srcdir)/shaders/update_pos_vel.cg \ 153 $(srcdir)/shaders/update_vel.cg \ 154 $(srcdir)/shaders/vertex_std.cg \ 155 $(srcdir)/shaders/volqd_volume.cg \ 156 $(srcdir)/shaders/zincblende_volume.cg 140 157 141 158 all: nanovis 142 159 143 install: nanovis 144 $(INSTALL_PROGRAM) nanovis $(bindir)/nanovis 145 $(INSTALL_PROGRAM) @RP_DIR@/bin/voronoi $(bindir)/voronoi 146 $(INSTALL_PROGRAM) -d $(libdir)/resources $(libdir)/shaders 147 $(INSTALL_DATA) resources/* $(libdir)/resources 148 $(INSTALL_DATA) shaders/* $(libdir)/shaders 149 $(INSTALL_DATA) @RP_DIR@/lib/librappture2.so $(libdir)/librappture2.so 150 $(INSTALL_DATA) @RP_DIR@/lib/libz.so $(libdir)/libz.so 151 $(INSTALL_DATA) @RP_DIR@/lib/libb64.so $(libdir)/libb64.so 160 install: install-nanovis install-resources install-shaders 161 162 $(MAT_LIB): 163 make -C $(MAT_DIR) all 164 165 $(R2_LIB): 166 make -C $(R2_DIR)/src all 167 168 $(IMG_LIB): 169 make -C $(IMG_DIR) all 170 171 $(TF_LIB): 172 make -C $(TF_DIR) all 173 174 nanovis: $(MAT_LIB) $(R2_LIB) $(IMG_LIB) $(TF_LIB) $(OBJS) 175 $(CC) $(CC_SWITCHES) -o $@ $^ $(LIBS) 176 177 .cpp.o: 178 $(CC) $(CC_SWITCHES) -o $@ -c $< 179 180 dxReader2.o: $(srcdir)/dxReader2.cpp 181 $(CC) -c $(CC_SWITCHES) $(DX_INC_SPEC) $? 182 RpDX.o: $(srcdir)/RpDX.cpp 183 $(CC) -c $(CC_SWITCHES) $(DX_INC_SPEC) $? 184 185 client: Socket.o ClientSocket.o RenderClient.o Event.o 186 $(CC) $(CC_SWITCHES) -o $@ $^ $(LIBS) 187 188 Socket.o: socket/Socket.cpp socket/Socket.h 189 $(CC) $(CC_SWITCHES) -o $@ -c $< 190 ClientSocket.o: socket/ClientSocket.cpp socket/ClientSocket.h 191 $(CC) $(CC_SWITCHES) -o $@ -c $< 192 RenderClient.o: socket/RenderClient.cpp socket/RenderClient.h 193 $(CC) $(CC_SWITCHES) -o $@ -c $< 194 195 install-resources: 196 mkdir -p $(libdir)/resources 197 @for i in $(resources) ; do \ 198 echo "installing $$i..." ; \ 199 $(INSTALL_DATA) -m 0444 $$i $(libdir)/resources ; \ 200 done 201 202 install-shaders: 203 mkdir -p $(libdir)/shaders 204 @for i in $(shaders) ; do \ 205 echo "installing $$i..." ; \ 206 $(INSTALL_DATA) -m 0444 $$i $(libdir)/shaders ; \ 207 done 208 209 install-nanovis: nanovis 210 $(INSTALL) -m 0555 nanovis $(bindir)/nanovis 211 212 # Only do what's necessary: These items assume an already installed version 213 # of rappture. We won't install them. 214 # $(INSTALL_PROGRAM) $(RP_DIR)/bin/voronoi $(bindir)/voronoi 215 # $(INSTALL_DATA) $(RP_DIR)/lib/librappture2.so $(libdir)/librappture2.so 216 # $(INSTALL_DATA) $(RP_DIR)/lib/libz.so $(libdir)/libz.so 217 # $(INSTALL_DATA) $(RP_DIR)/lib/libb64.so $(libdir)/libb64.so 218 152 219 153 220 clean: … … 155 222 make -C $(R2_DIR)/src clean 156 223 make -C $(IMG_DIR) clean 224 make -C $(TF_DIR) clean 157 225 rm -f nanovis client $(OBJS) 158 226 159 227 distclean: clean 160 228 rm -f Makefile *~ 161 162 $(MAT_LIB):163 make -C $(MAT_DIR) all164 165 $(R2_LIB):166 make -C $(R2_DIR)/src all167 168 $(IMG_LIB):169 make -C $(IMG_DIR) all170 171 nanovis: $(MAT_LIB) $(R2_LIB) $(IMG_LIB) $(OBJS)172 $(CC) $(CC_SWITCHES) -o $@ $^ $(LIBS)173 174 client: Socket.o ClientSocket.o RenderClient.o Event.o175 $(CC) $(CC_SWITCHES) -o $@ $^ $(LIBS)176 177 .cpp.o:178 $(CC) $(CC_SWITCHES) -o $@ -c $<179 180 Nv.o: Nv.cpp NvShader.cpp181 $(CC) $(CC_SWITCHES) -c $^182 183 dxReader2.o: $(srcdir)/dxReader2.cpp184 $(CC) -c $(CC_SWITCHES) $(DX_INC_SPEC) $?185 RpDX.o: $(srcdir)/RpDX.cpp186 $(CC) -c $(CC_SWITCHES) $(DX_INC_SPEC) $?187 188 ColorGradient.o: transfer-function/ColorGradient.cpp189 $(CC) $(CC_SWITCHES) -o $@ -c $<190 ColorPaletteWindow.o: transfer-function/ColorPaletteWindow.cpp191 $(CC) $(CC_SWITCHES) -o $@ -c $<192 ColorGradientGLUTWindow.o: transfer-function/ColorGradientGLUTWindow.cpp193 $(CC) $(CC_SWITCHES) -o $@ -c $<194 ControlPoint.o: transfer-function/ControlPoint.cpp195 $(CC) $(CC_SWITCHES) -o $@ -c $<196 TransferFunctionGLUTWindow.o: transfer-function/TransferFunctionGLUTWindow.cpp197 $(CC) $(CC_SWITCHES) -o $@ -c $<198 MainWindow.o: transfer-function/MainWindow.cpp199 $(CC) $(CC_SWITCHES) -o $@ -c $<200 Socket.o: socket/Socket.cpp socket/Socket.h201 $(CC) $(CC_SWITCHES) -o $@ -c $<202 ClientSocket.o: socket/ClientSocket.cpp socket/ClientSocket.h203 $(CC) $(CC_SWITCHES) -o $@ -c $<204 RenderClient.o: socket/RenderClient.cpp socket/RenderClient.h205 $(CC) $(CC_SWITCHES) -o $@ -c $<206 229 207 230 NvStdVertexShader.o: NvStdVertexShader.cpp NvStdVertexShader.h -
trunk/vizservers/nanovis/PCASplit.h
r846 r934 154 154 } 155 155 156 } ;156 } 157 157 158 158 #endif -
trunk/vizservers/nanovis/R2/include/R2/R2.h
r580 r934 42 42 enum R2TEXFILTER { 43 43 R2_NEAREST = GL_NEAREST, /*< GL_NEAREST */ 44 R2_LINEAR = GL_LINEAR ,/*< GL_LINEAR */44 R2_LINEAR = GL_LINEAR /*< GL_LINEAR */ 45 45 }; 46 46 … … 49 49 R2_TEXTURE_2D = GL_TEXTURE_2D, /*< GL_TEXTURE_2D */ 50 50 R2_TEXTURE_RECTANGLE = GL_TEXTURE_RECTANGLE_NV, /*< GL_TEXTURE_RECTANGLE_NV */ 51 R2_TEXTURE_3D = GL_TEXTURE_3D ,/*< GL_TEXTURE_3D */51 R2_TEXTURE_3D = GL_TEXTURE_3D /*< GL_TEXTURE_3D */ 52 52 53 53 }; … … 55 55 R2_CLAMP = GL_CLAMP, /*< GL_CLAMP */ 56 56 R2_CLAMP_TO_EDGE = GL_CLAMP_TO_EDGE, /*< GL_CLAMP_TO_EDGE */ 57 R2_REPEAT = GL_REPEAT ,/*< GL_REPEAT */57 R2_REPEAT = GL_REPEAT /*< GL_REPEAT */ 58 58 }; 59 59 -
trunk/vizservers/nanovis/R2/include/R2/graphics/R2Geometry.h
r929 r934 14 14 TRIANGLES = GL_TRIANGLES, 15 15 TRIANGLE_STRIP = GL_TRIANGLE_STRIP, 16 QUADS = GL_QUADS ,16 QUADS = GL_QUADS 17 17 }; 18 18 -
trunk/vizservers/nanovis/RenderContext.h
r838 r934 9 9 public : 10 10 enum ShadingModel { 11 FLAT = GL_FLAT , 12 SMOOTH = GL_SMOOTH ,//!< Smooth shading (Goraud shading model)11 FLAT = GL_FLAT , //!< Flat Shading 12 SMOOTH = GL_SMOOTH //!< Smooth shading (Goraud shading model) 13 13 }; 14 14 15 15 enum PolygonMode { 16 16 LINE = GL_LINE, 17 FILL = GL_FILL ,17 FILL = GL_FILL 18 18 }; 19 19 20 20 enum CullMode { 21 NO_CULL, 22 BACK= GL_BACK, 23 FRONT= GL_FRONT ,//!< Front face culling21 NO_CULL, //!< No culling 22 BACK= GL_BACK, //!< Back face culling 23 FRONT= GL_FRONT //!< Front face culling 24 24 }; 25 25 … … 85 85 } 86 86 87 } ;87 } 88 88 89 89 #endif // -
trunk/vizservers/nanovis/Texture1D.cpp
r259 r934 1 1 2 /* 2 3 * ---------------------------------------------------------------------- … … 21 22 22 23 Texture1D::Texture1D(){ 23 id = -1; 24 24 id = -1; 25 gl_resource_allocated = false; 25 26 } 26 27 27 28 Texture1D::Texture1D(int width, int type) 28 29 { 29 assert(type == GL_UNSIGNED_BYTE || type == GL_FLOAT|| type ==GL_UNSIGNED_INT); 30 31 this->width = width; 32 this->type = type; 30 assert(type == GL_UNSIGNED_BYTE || type == GL_FLOAT || 31 type == GL_UNSIGNED_INT); 32 33 this->width = width; 34 this->type = type; 33 35 34 35 36 id = -1; 37 gl_resource_allocated = false; 36 38 } 37 39 38 40 GLuint Texture1D::initialize_float_rgba(float *data) 39 41 { 40 42 glPixelStorei(GL_UNPACK_ALIGNMENT, 1); 41 43 42 43 44 assert(id!=-1);44 glGenTextures(1, &id); 45 glBindTexture(GL_TEXTURE_1D, id); 46 assert(id != -1); 45 47 46 48 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 47 49 48 49 50 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 51 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 50 52 51 52 53 54 55 53 glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, width, 0, GL_RGBA, GL_FLOAT, data); 54 assert(glGetError()==0); 55 56 gl_resource_allocated = true; 57 return id; 56 58 } 57 59 58 60 void Texture1D::update_float_rgba(float* data){ 59 60 61 62 61 glPixelStorei(GL_UNPACK_ALIGNMENT, 1); 62 glBindTexture(GL_TEXTURE_1D, id); 63 64 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 63 65 64 65 66 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 67 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 66 68 67 68 assert(glGetError()==0); 69 glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, width, 0, GL_RGBA, GL_FLOAT, data); 70 assert(glGetError()==0); 69 71 } 70 72 71 73 void Texture1D::activate() 72 74 { 73 74 75 glBindTexture(GL_TEXTURE_1D, id); 76 glEnable(GL_TEXTURE_1D); 75 77 } 76 78 77 79 void Texture1D::deactivate() 78 80 { 79 glDisable(GL_TEXTURE_1D); 81 glDisable(GL_TEXTURE_1D); 80 82 } 81 83 82 84 Texture1D::~Texture1D() 83 85 { 84 86 glDeleteTextures(1, &id); 85 87 } 86 88 87 89 void Texture1D::check_max_size(){ 88 89 90 91 92 90 GLint max = 0; 91 glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max); 92 93 //printf("%d", glGetError()); 94 fprintf(stderr, "max texture size: %d\n", max); 93 95 } 94 96 95 97 void Texture1D::check_max_unit(){ 96 97 98 int max; 99 glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &max); 98 100 99 101 fprintf(stderr, "max texture units: %d.\n", max); 100 102 } -
trunk/vizservers/nanovis/Texture1D.h
r273 r934 18 18 #include <GL/glew.h> 19 19 20 class Texture1D{ 21 20 class Texture1D { 22 21 public: 23 24 25 26 27 28 22 int width; 23 bool gl_resource_allocated; 24 25 GLuint type; 26 GLuint id; 27 GLuint tex_unit; 29 28 30 31 32 33 34 35 36 37 38 39 29 Texture1D(); 30 Texture1D(int length, int type = GL_UNSIGNED_BYTE); 31 ~Texture1D(); 32 33 void activate(); 34 void deactivate(); 35 GLuint initialize_float_rgba(float* data); 36 void update_float_rgba(float* data); 37 static void check_max_size(); 38 static void check_max_unit(); 40 39 }; 41 40 -
trunk/vizservers/nanovis/dxReader2.cpp
r932 r934 63 63 64 64 // This is legacy code that can be removed during code cleanup 65 int getInterpData( int rank, float* numPts, float* max, float* dxpos, Object* dxobj, 66 double* dataMin, double* dataMax, float** result) 65 int 66 getInterpData(int rank, float* numPts, float* max, float* dxpos, Object* dxobj, 67 double* dataMin, double* dataMax, float** result) 67 68 { 68 69 int pts = int(numPts[0]*numPts[1]*numPts[2]); 69 70 int interppts = pts; 71 Interpolator interpolator; 72 73 #ifdef test 70 74 int arrSize = interppts*rank; 71 75 float interppos[arrSize]; 72 Interpolator interpolator;73 74 76 // commented this out to see what happens when we use the dxpos array 75 77 // which holds the positions dx generated for interpolation. 76 78 // 77 //generate the positions we want to interpolate on79 // generate the positions we want to interpolate on 78 80 // getInterpPos(numPts,dxpos,max,rank,interppos); 79 81 // fprintf(stdout, "after getInterpPos\n"); 80 82 // fflush(stdout); 81 83 #endif 82 84 // build the interpolator and interpolate 83 85 interpolator = DXNewInterpolator(*dxobj,INTERP_INIT_IMMEDIATE,-1.0); … … 93 95 fprintf(stdout, 94 96 "(%f,%f,%f)|->% 8e\n(%f,%f,%f)|->% 8e\n(%f,%f,%f)|->% 8e\n", 97 #ifdef test 95 98 // interppos[pt],interppos[pt+1],interppos[pt+2], (*result)[lcv], 96 99 // interppos[pt+3],interppos[pt+4],interppos[pt+5],(*result)[lcv+1], 97 100 // interppos[pt+6],interppos[pt+7],interppos[pt+8],(*result)[lcv+2]); 101 #endif 98 102 dxpos[pt],dxpos[pt+1],dxpos[pt+2], (*result)[lcv], 99 103 dxpos[pt+3],dxpos[pt+4],dxpos[pt+5],(*result)[lcv+1], -
trunk/vizservers/nanovis/imgLoaders/Image.h
r823 r934 6 6 enum DataType { 7 7 IMG_UNSIGNED_BYTE, 8 IMG_FLOAT ,8 IMG_FLOAT 9 9 }; 10 10 11 11 enum ImageFormat { 12 12 IMG_RGB = 3, 13 IMG_RGBA = 4 ,13 IMG_RGBA = 4 14 14 }; 15 15 -
trunk/vizservers/nanovis/nanovis.cpp
r932 r934 78 78 79 79 // STATIC MEMBER DATA 80 Grid *NanoVis::grid = NULL; 80 81 int NanoVis::updir = Y_POS; 81 82 NvCamera* NanoVis::cam = NULL; … … 101 102 bool NanoVis::vector_on = false; 102 103 bool NanoVis::config_pending = false; 104 103 105 104 106 // pointers to volumes, currently handle up to 10 volumes
Note: See TracChangeset
for help on using the changeset viewer.