Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] Re: Re: Re: Re: r2287 - in trunk: Model/Materials scenes scenes/csafe/python scenes/csafe/src


Chronological Thread 
  • From: Carson Brownlee < >
  • To:
  • Subject: [Manta] Re: Re: Re: Re: r2287 - in trunk: Model/Materials scenes scenes/csafe/python scenes/csafe/src
  • Date: Mon, 9 Jun 2008 21:47:48 -0600

nope, all usage was taken out but I missed the constructor.
Carson


On Jun 9, 2008, at 3:58 PM, Aaron Knoll wrote:
Agreed. I wasn't sure if metersPerUnit was used in the loading / interface code; but now I see it is not.

I'll go ahead and remove it then.

-Aaron

On Jun 9, 2008, at 3:56 PM, Thiago Ize wrote:

I did that because I could not see any place where that variable was actually used (checked with grep). I think the better thing to do is to instead fix the CDTest to not use metersPerUnit (I have issues compiling that code, which is why I never tested to see if that compiled). If I missed something and the Volume class actually needs that (can't see how), then we should put it in. But I feel that a variable like that is better handled by the application/scene and not a volume class.

Thiago

James Bigler wrote:
" type="cite">
Someone recently ripped the metersPerUnit all out.  You should check
the logs to see who did it and why.

James

On Mon, Jun 9, 2008 at 1:00 PM,  
 
 "><
 > wrote:
  
Author: knolla
Date: Mon Jun  9 13:00:45 2008
New Revision: 2287

Modified:
  trunk/Model/Materials/Volume.h
  trunk/scenes/csafe/python/csafe_demo.py
  trunk/scenes/csafe/src/CDTest.h
  trunk/scenes/volumeTest.cc
Log:
Added metersPerUnit parameter to Volume constructor, to ensure compatibility with Carson's CDTest scene.

Modified: trunk/Model/Materials/Volume.h
==============================================================================
--- trunk/Model/Materials/Volume.h      (original)
+++ trunk/Model/Materials/Volume.h      Mon Jun  9 13:00:45 2008
@@ -169,7 +169,7 @@
    vector<mcT> cellVector_mc; // color hashes

    Volume(GridArray3<T>* data, RGBAColorMap* colorMap, const BBox& bounds,
-           double cellStepSize, int depth,
+           double cellStepSize, double metersPerUnit, int depth,
           double forceDataMin = -FLT_MAX, double forceDataMax = -FLT_MAX);
    virtual ~Volume();
    void setColorMap(RGBAColorMap* map) { _colorMap = map; }
@@ -203,6 +203,7 @@
      int _depth;
      int* _xsize,*_ysize,*_zsize;
      double* _ixsize, *_iysize, *_izsize;
+      float _metersPerUnit;
      Vector _cellSize;
      float _stepSize;
      float _dataMin;
@@ -213,8 +214,9 @@

  template<class T>
    Volume<T>::Volume(GridArray3<T>* data, RGBAColorMap* colorMap,
-                      const BBox& bounds, double cellStepSize,
-                      int depth, double forceDataMin, double forceDataMax)
+                      const BBox& bounds, double cellStepSize,
+                     double metersPerUnit, int depth,
+                     double forceDataMin, double forceDataMax)
      : _data(data), _colorMap(colorMap)
    {
      //slightly expand the bounds.
@@ -229,6 +231,7 @@

      //_stepSize = cellStepSize*_cellSize.length()/sqrt(3.0);
      _stepSize = cellStepSize;
+      _metersPerUnit = metersPerUnit;

      _maxDistance = diag.length();


Modified: trunk/scenes/csafe/python/csafe_demo.py
==============================================================================
--- trunk/scenes/csafe/python/csafe_demo.py     (original)
+++ trunk/scenes/csafe/python/csafe_demo.py     Mon Jun  9 13:00:45 2008
@@ -42,7 +42,7 @@
 import sys, os, time, traceback, types
 import wx
 import wx.lib.scrolledpanel as scrolled
-from wx.lib.wordwrap import wordwrap
+#from wx.lib.wordwrap import wordwrap
 from csafe import *


@@ -166,9 +166,7 @@
        info.Name = "Manta - CSAFE Demo"
        info.Version = "0.1"
        info.Copyright = "(C) 2008 Steven G Parker"
-        info.Description = wordwrap(
-            "A program for running and modifying particle and volume datasets. By: Steve Parker, James Bigler, Carson Brownlee. MIT License.",
-            350, wx.ClientDC(self))
+        info.Description = "A program for running and modifying particle and volume datasets. By: Steve Parker, James Bigler, Carson Brownlee. MIT License."
        info.WebSite = ("http://code.sci.utah.edu/Manta/index.php/CSAFE", "Manta Home Page")

        # Then we call wx.AboutBox giving it that info object

Modified: trunk/scenes/csafe/src/CDTest.h
==============================================================================
--- trunk/scenes/csafe/src/CDTest.h     (original)
+++ trunk/scenes/csafe/src/CDTest.h     Mon Jun  9 13:00:45 2008
@@ -346,7 +346,7 @@
            {
                cout << "Loading Nrrd file: " << *i << "...\n";
                Group* group = new Group();
-                Volume<float>* mat = new Volume<float>(loadNRRDToGrid<float>(*i), _volCMap, BBox(_minBound, _maxBound), 0.00125, 3, _forceDataMin, _forceDataMax);
+                Volume<float>* mat = new Volume<float>(loadNRRDToGrid<float>(*i), _volCMap, BBox(_minBound, _maxBound), 0.00125, 10, 3, _forceDataMin, _forceDataMax);
                Cube* vol = new Cube(mat, _minBound - Vector(0.001, 0.001, 0.001), _maxBound + Vector(0.001, 0.001, 0.001));
                group->add(vol);
                _volAnimation->push_back(group);

Modified: trunk/scenes/volumeTest.cc
==============================================================================
--- trunk/scenes/volumeTest.cc  (original)
+++ trunk/scenes/volumeTest.cc  Mon Jun  9 13:00:45 2008
@@ -229,7 +229,7 @@


 cMap->scaleAlphas(t_inc);
- Volume<float>* mat = new Volume<float>(loadNRRDToGrid<float>(volFile), cMap, BBox(minBound, maxBound), t_inc, depth, dataMin, dataMax);
+ Volume<float>* mat = new Volume<float>(loadNRRDToGrid<float>(volFile), cMap, BBox(minBound, maxBound), t_inc, 1.0, depth, dataMin, dataMax);
        //double min, max;
        //mat->getMinMax(&min, &max);
        //cmap2->setMinMax(min, max);


    
  





Archive powered by MHonArc 2.6.16.

Top of page