Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] RE: [RTRT] r267 - in branches/newPointVector: Core/Geometry Model /Cameras Model/Instances Model/MiscObjects Model/Primitives Model/TexCoor dMappers SCIRun/Core


Chronological Thread 
  • From: Rocky Rhodes <rhodes@sgi.com>
  • To: "'sparker@sci.utah.edu'" <sparker@sci.utah.edu>, "'manta@sci.utah.edu'" <manta@sci.utah.edu>
  • Subject: [MANTA] RE: [RTRT] r267 - in branches/newPointVector: Core/Geometry Model /Cameras Model/Instances Model/MiscObjects Model/Primitives Model/TexCoor dMappers SCIRun/Core
  • Date: Wed, 11 May 2005 08:38:54 -0700

I've been watching all of this activity on this branch, but am not aware of
the big picture.  What is the plan for the "newPointVector" branch?  Is it
to be reintegrated with the main trunk once it is considered sufficiently
robust?  When might that be?

I haven't looked at the new code at all.  What is different about the new
approach?

Hope the Mt. Dew and pizza are still flowing freely there!

        Rocky

> -----Original Message-----
> From: owner-rtrt@sci.utah.edu [mailto:owner-rtrt@sci.utah.edu] On Behalf
> Of sparker@sci.utah.edu
> Sent: Monday, May 09, 2005 10:24 PM
> To: rtrt@sci.utah.edu
> Subject: [RTRT] r267 - in branches/newPointVector: Core/Geometry
> Model/Cameras Model/Instances Model/MiscObjects Model/Primitives
> Model/TexCoordMappers SCIRun/Core
> 
> Author: sparker
> Date: Mon May  9 23:24:20 2005
> New Revision: 267
> 
> Modified:
>    branches/newPointVector/Core/Geometry/AffineTransform.cc
>    branches/newPointVector/Core/Geometry/AffineTransform.h
>    branches/newPointVector/Core/Geometry/PointVector.h
>    branches/newPointVector/Model/Cameras/PinholeCamera.cc
>    branches/newPointVector/Model/Instances/Instance.cc
>    branches/newPointVector/Model/Instances/Instance.h
>    branches/newPointVector/Model/Instances/InstanceRST.cc
>    branches/newPointVector/Model/Instances/InstanceRST.h
>    branches/newPointVector/Model/Instances/InstanceRT.cc
>    branches/newPointVector/Model/Instances/InstanceRT.h
>    branches/newPointVector/Model/Instances/InstanceST.h
>    branches/newPointVector/Model/Instances/InstanceT.h
>    branches/newPointVector/Model/MiscObjects/Difference.cc
>    branches/newPointVector/Model/MiscObjects/Intersection.cc
>    branches/newPointVector/Model/Primitives/Cone.cc
>    branches/newPointVector/Model/Primitives/Cone.h
>    branches/newPointVector/Model/Primitives/Cube.cc
>    branches/newPointVector/Model/Primitives/Cube.h
>    branches/newPointVector/Model/Primitives/Triangle.cc
>    branches/newPointVector/Model/Primitives/Triangle.h
>    branches/newPointVector/Model/TexCoordMappers/LinearMapper.cc
>    branches/newPointVector/Model/TexCoordMappers/LinearMapper.h
>    branches/newPointVector/Model/TexCoordMappers/SphericalMapper.cc
>    branches/newPointVector/Model/TexCoordMappers/SphericalMapper.h
>    branches/newPointVector/SCIRun/Core/CMakeLists.txt
> Log:
> Implement AffineTransform::invert
> Many updates to new point/vector/transform interfaces, still more to do
> 
> 
> Modified: branches/newPointVector/Core/Geometry/AffineTransform.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Core/Geometry/AffineTransform.cc
>       (original)
> +++ branches/newPointVector/Core/Geometry/AffineTransform.cc  Mon May
> 9 23:24:20 2005
> @@ -10,8 +10,8 @@
>    {
>      for(int row = 0; row < 3; row++){
>        for(int col = 0; col < 4; col++)
> -        data[row][col] = 0;
> -      data[row][row] = 1;
> +        mat[row][col] = 0;
> +      mat[row][row] = 1;
>      }
>    }
> 
> @@ -161,7 +161,27 @@
>    template<typename T>
>    void AffineTransformT<T>::invert()
>    {
> -    ...;
> +    T a = mat[0][0];
> +    T b = mat[0][1];
> +    T c = mat[0][2];
> +    T d = mat[1][0];
> +    T e = mat[1][1];
> +    T f = mat[1][2];
> +    T g = mat[2][0];
> +    T h = mat[2][1];
> +    T i = mat[2][2];
> +
> +    T denom = c*d*h-c*g*e-b*d*i+b*g*f+a*e*i-a*h*f;
> +    T inv_denom = 1./denom;
> +    mat[0][0] = (e*i-f*h)*inv_denom;
> +    mat[0][1] = (f*g-d*i)*inv_denom;
> +    mat[0][2] = (d*h-e*g)*inv_denom;
> +    mat[1][0] = (c*h-b*i)*inv_denom;
> +    mat[1][1] = (a*i-c*g)*inv_denom;
> +    mat[1][2] = (b*g-a*h)*inv_denom;
> +    mat[2][0] = (b*f-c*e)*inv_denom;
> +    mat[2][1] = (c*d-a*f)*inv_denom;
> +    mat[2][2] = (a*e-b*d)*inv_denom;
>    }
> 
>    template<typename T>
> 
> Modified: branches/newPointVector/Core/Geometry/AffineTransform.h
> ==========================================================================
> ====
> --- branches/newPointVector/Core/Geometry/AffineTransform.h   (original)
> +++ branches/newPointVector/Core/Geometry/AffineTransform.h   Mon May  9
> 23:24:20 2005
> @@ -61,13 +61,13 @@
>    private:
>      T mat[3][4];
> 
> -    void pre_multiply(T m[Dim][Dim+1]);
> +    void pre_multiply(T m[3][4]);
>    };
> 
> -  template<typename T, int Dim>
> +  template<typename T>
>      PointT<T, 3> operator*(const AffineTransformT<T>& trans,
>                             const PointT<T, 3>& point);
> -  template<typename T, int Dim>
> +  template<typename T>
>      VectorT<T, 3> operator*(const AffineTransformT<T>& trans,
>                           const VectorT<T, 3>& vec);
>  }
> 
> Modified: branches/newPointVector/Core/Geometry/PointVector.h
> ==========================================================================
> ====
> --- branches/newPointVector/Core/Geometry/PointVector.h       (original)
> +++ branches/newPointVector/Core/Geometry/PointVector.h       Mon May  9
> 23:24:20 2005
> @@ -5,6 +5,7 @@
>  #include <MantaTypes.h>
>  #include <Core/Math/MinMax.h>
>  #include <Core/Math/MiscMath.h>
> +#include <math.h>
> 
>  namespace Manta {
>    template<typename T, int Dim>
> @@ -120,6 +121,7 @@
>        return VectorT<T, Dim>(1./data[0], 1./data[1], 1./data[2]);
>      }
>      VectorT<T, Dim> absoluteValue() const {
> +      using SCIRun::Abs;
>        return VectorT<T, Dim>(Abs(data[0]), Abs(data[1]), Abs(data[2]));
>      }
> 
> @@ -203,9 +205,10 @@
>    };
> 
>    template<typename T, int Dim>
> -    inline VectorT<T, Dim>::VectorT<T, Dim>(const PointT<T, Dim>& copy)
> +    inline VectorT<T, Dim>::VectorT(const PointT<T, Dim>& copy)
>      {
> -      data[0] = copy.x(); data[1] = copy.y(); data[2] = copy.z();
> +      for(int i=0;i<Dim;i++)
> +        data[i] = copy[i];
>      }
> 
>    template<typename T, int Dim>
> 
> Modified: branches/newPointVector/Model/Cameras/PinholeCamera.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Cameras/PinholeCamera.cc    (original)
> +++ branches/newPointVector/Model/Cameras/PinholeCamera.cc    Mon May  9
> 23:24:20 2005
> @@ -8,6 +8,7 @@
>  #include <Core/Math/MiscMath.h>
>  #include <Core/Math/Trig.h>
>  #include <Core/Util/Assert.h>
> +#include <iostream>
> 
>  using namespace Manta;
>  using namespace std;
> @@ -129,25 +130,23 @@
> 
>  void PinholeCamera::transform(AffineTransform t, TransformCenter center)
>  {
> -  Vector cen;
> +  Point cen;
>    switch(center){
>    case Eye:
> -    cen = Vector(eye);
> +    cen = eye;
>      break;
>    case LookAt:
> -    cen = Vector(lookat);
> +    cen = lookat;
>      break;
>    case Origin:
> -    cen = Vector(0,0,0);
> +    cen = Point(0,0,0);
>      break;
>    }
> 
>    Vector lookdir(eye-lookat);
>    double length = lookdir.length();
>    AffineTransform frame;
> -  frame.initWithBasis(Point(0,0,0),
> -                      v.normal()*length, u.normal()*length, lookdir);
> -  frame.translate(cen);
> +  frame.initWithBasis(v.normal()*length, u.normal()*length, lookdir,
> cen);
> 
>    AffineTransform frame_inv = frame.inverse();
>    AffineTransform t2 = frame * t * frame_inv;
> 
> Modified: branches/newPointVector/Model/Instances/Instance.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/Instance.cc       (original)
> +++ branches/newPointVector/Model/Instances/Instance.cc       Mon May  9
> 23:24:20 2005
> @@ -9,13 +9,12 @@
> 
>  using namespace Manta;
> 
> -Instance::Instance(Object* instance, const Transform& transform)
> +Instance::Instance(Object* instance, const AffineTransform& transform)
>    : instance(instance), transform(transform)
>  {
>    // By default, use the texture coordinates and material of the child
> object
>    tex = this;
>    material = this;
> -  transform.compute_imat();
>  }
> 
>  Instance::~Instance()
> 
> Modified: branches/newPointVector/Model/Instances/Instance.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/Instance.h        (original)
> +++ branches/newPointVector/Model/Instances/Instance.h        Mon May  9
> 23:24:20 2005
> @@ -5,13 +5,13 @@
>  #include <Interface/Material.h>
>  #include <Interface/Primitive.h>
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Transform.h>
> +#include <Core/Geometry/AffineTransform.h>
> 
>  namespace Manta {
> 
>    class Instance : public Primitive, public Material, public
> TexCoordMapper {
>    public:
> -    Instance(Object* instance, const Transform& transform);
> +    Instance(Object* instance, const AffineTransform& transform);
>      virtual ~Instance();
> 
>      // Generic
> @@ -38,7 +38,7 @@
>      Object* instance;
>      Material* material;
>      const TexCoordMapper* tex;
> -    Transform transform;
> +    AffineTransform transform;
>    };
>  }
> 
> 
> Modified: branches/newPointVector/Model/Instances/InstanceRST.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/InstanceRST.cc    (original)
> +++ branches/newPointVector/Model/Instances/InstanceRST.cc    Mon May  9
> 23:24:20 2005
> @@ -9,7 +9,7 @@
> 
>  using namespace Manta;
> 
> -InstanceRST::InstanceRST(Object* instance, const Transform& transform)
> +InstanceRST::InstanceRST(Object* instance, const AffineTransform&
> transform)
>    : instance(instance), transform(transform)
>  {
>    // By default, use the texture coordinates and material of the child
> object
> 
> Modified: branches/newPointVector/Model/Instances/InstanceRST.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/InstanceRST.h     (original)
> +++ branches/newPointVector/Model/Instances/InstanceRST.h     Mon May  9
> 23:24:20 2005
> @@ -5,7 +5,7 @@
>  #include <Interface/Material.h>
>  #include <Interface/Primitive.h>
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Transform.h>
> +#include <Core/Geometry/AffineTransform.h>
> 
>  namespace Manta {
> 
> @@ -38,7 +38,7 @@
>      Object* instance;
>      Material* material;
>      const TexCoordMapper* tex;
> -    Transform transform;
> +    AffineTransform transform;
>      double scale;
>      double inv_scale;
>    };
> 
> Modified: branches/newPointVector/Model/Instances/InstanceRT.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/InstanceRT.cc     (original)
> +++ branches/newPointVector/Model/Instances/InstanceRT.cc     Mon May  9
> 23:24:20 2005
> @@ -9,7 +9,7 @@
> 
>  using namespace Manta;
> 
> -InstanceRT::InstanceRT(Object* instance, const Transform& transform)
> +InstanceRT::InstanceRT(Object* instance, const AffineTransform&
> transform)
>    : instance(instance), transform(transform)
>  {
>    // By default, use the texture coordinates and material of the child
> object
> 
> Modified: branches/newPointVector/Model/Instances/InstanceRT.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/InstanceRT.h      (original)
> +++ branches/newPointVector/Model/Instances/InstanceRT.h      Mon May  9
> 23:24:20 2005
> @@ -5,7 +5,7 @@
>  #include <Interface/Material.h>
>  #include <Interface/Primitive.h>
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Transform.h>
> +#include <Core/Geometry/AffineTransform.h>
> 
>  namespace Manta {
> 
> @@ -36,7 +36,7 @@
>      void overrideMaterial(Material* material);
>    private:
>      Object* instance;
> -    Transform transform;
> +    AffineTransform transform;
>      Material* material;
>      const TexCoordMapper* tex;
>    };
> 
> Modified: branches/newPointVector/Model/Instances/InstanceST.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/InstanceST.h      (original)
> +++ branches/newPointVector/Model/Instances/InstanceST.h      Mon May  9
> 23:24:20 2005
> @@ -5,7 +5,7 @@
>  #include <Interface/Material.h>
>  #include <Interface/Primitive.h>
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Point.h>
> +#include <Core/Geometry/PointVector.h>
> 
>  namespace Manta {
> 
> 
> Modified: branches/newPointVector/Model/Instances/InstanceT.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Instances/InstanceT.h       (original)
> +++ branches/newPointVector/Model/Instances/InstanceT.h       Mon May  9
> 23:24:20 2005
> @@ -5,7 +5,7 @@
>  #include <Interface/Material.h>
>  #include <Interface/Primitive.h>
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Point.h>
> +#include <Core/Geometry/PointVector.h>
> 
>  namespace Manta {
> 
> 
> Modified: branches/newPointVector/Model/MiscObjects/Difference.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/MiscObjects/Difference.cc   (original)
> +++ branches/newPointVector/Model/MiscObjects/Difference.cc   Mon May  9
> 23:24:20 2005
> @@ -4,6 +4,7 @@
>  #include <Core/Exceptions/InternalError.h>
> 
>  using namespace Manta;
> +using SCIRun::InternalError;
> 
>  Difference::Difference(Object* object1, Object* object2)
>    : object1(object1), object2(object2)
> 
> Modified: branches/newPointVector/Model/MiscObjects/Intersection.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/MiscObjects/Intersection.cc
>       (original)
> +++ branches/newPointVector/Model/MiscObjects/Intersection.cc Mon May
> 9 23:24:20 2005
> @@ -26,8 +26,8 @@
>    object1->computeBounds(context, ibox1);
>    BBox ibox2;
>    object2->computeBounds(context, ibox2);
> -  bbox.extend(Max(ibox1.min(), ibox2.min()));
> -  bbox.extend(Min(ibox1.max(), ibox2.max()));
> +  bbox.extend(Max(ibox1.getMin(), ibox2.getMin()));
> +  bbox.extend(Min(ibox1.getMax(), ibox2.getMax()));
>  }
> 
>  void Intersection::intersect(const RenderContext& context, RayPacket&
> rays) const
> 
> Modified: branches/newPointVector/Model/Primitives/Cone.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Primitives/Cone.cc  (original)
> +++ branches/newPointVector/Model/Primitives/Cone.cc  Mon May  9 23:24:20
> 2005
> @@ -1,3 +1,4 @@
> +
>  #include <Model/Primitives/Cone.h>
>  #include <Interface/RayPacket.h>
>  #include <Core/Geometry/BBox.h>
> @@ -6,7 +7,7 @@
>  using namespace Manta;
>  using namespace std;
> 
> -Cone::Cone(Material* mat, Point bottom, Point top, double Rb, double Rt)
> +Cone::Cone(Material* mat, const Point& bottom, const Point& top, double
> Rb, double Rt)
>    : PrimitiveCommon(mat, this), bottom(bottom), top(top), Rb(Rb), Rt(Rt)
>  {
>  }
> @@ -41,20 +42,19 @@
>      double sinA = lbt/hyp;
>      double cosA2 = cosA*cosA;
>      double sinA2 = sinA*sinA;
> -    Point P(xform.project(e0.ray.origin()));
> -    Point dP(P - Pa);
> +    Point P(xform * e0.ray.origin());
> +    Vector dP(P - Pa);
>      for(int i=0; i<rays.getSize(); i++) {
>        RayPacket::Element& e = rays.get(i);
> -      Vector V(xform.project(e.ray.direction()));
> +      Vector V(xform * e.ray.direction());
>        Vector tv = V;
>        double dist_scale = tv.normalize();
>        double a = (cosA2*Dot(V-Dot(V,Va)*Va, V-Dot(V,Va)*Va))-
>       (sinA2*Dot(V,Va)*Dot(V,Va));
> -      double b = 2*cosA2*Dot(V-Dot(V,Va)*Va,
> -                          dP.asVector()-Dot(dP.asVector(),Va)*Va)-
> -     2*sinA2*Dot(V,Va)*Dot(dP.asVector(),Va);
> -      double c = cosA2*Dot(dP.asVector()-Dot(dP.asVector(),Va)*Va,
> -                        dP.asVector()-Dot(dP.asVector(),Va)*Va)-
> +      double b = 2*cosA2*Dot(V-Dot(V,Va)*Va, dP-Dot(dP,Va)*Va)-
> +     2*sinA2*Dot(V,Va)*Dot(dP,Va);
> +      double c = cosA2*Dot(dP-Dot(dP,Va)*Va,
> +                        dP-Dot(dP,Va)*Va)-
>       sinA2*Dot(dP,Va)*Dot(dP,Va);
> 
>        double d = sqrt(b*b-4*a*c);
> @@ -97,18 +97,16 @@
>      double sinA2 = sinA*sinA;
>      for(int i=0; i<rays.getSize(); i++) {
>        RayPacket::Element& e = rays.get(i);
> -      Point P(xform.project(e.ray.origin()));
> -      Point dP(P - Pa);
> -      Vector V(xform.project(e.ray.direction()));
> +      Point P(xform * e.ray.origin());
> +      Vector dP(P - Pa);
> +      Vector V(xform * e.ray.direction());
>        Vector tv = V;
>        double dist_scale = tv.normalize();
>        double a = (cosA2*Dot(V-Dot(V,Va)*Va, V-Dot(V,Va)*Va))-
>       (sinA2*Dot(V,Va)*Dot(V,Va));
> -      double b = 2*cosA2*Dot(V-Dot(V,Va)*Va,
> -                          dP.asVector()-Dot(dP.asVector(),Va)*Va)-
> -     2*sinA2*Dot(V,Va)*Dot(dP.asVector(),Va);
> -      double c = cosA2*Dot(dP.asVector()-Dot(dP.asVector(),Va)*Va,
> -                        dP.asVector()-Dot(dP.asVector(),Va)*Va)-
> +      double b = 2*cosA2*Dot(V-Dot(V,Va)*Va, dP-Dot(dP,Va)*Va)-
> +     2*sinA2*Dot(V,Va)*Dot(dP,Va);
> +      double c = cosA2*Dot(dP-Dot(dP,Va)*Va, dP-Dot(dP,Va)*Va)-
>       sinA2*Dot(dP,Va)*Dot(dP,Va);
> 
>        double d = sqrt(b*b-4*a*c);
> 
> Modified: branches/newPointVector/Model/Primitives/Cone.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Primitives/Cone.h   (original)
> +++ branches/newPointVector/Model/Primitives/Cone.h   Mon May  9 23:24:20
> 2005
> @@ -4,15 +4,15 @@
> 
>  #include <Model/Primitives/PrimitiveCommon.h>
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Point.h>
> -#include <Core/Geometry/Transform.h>
> +#include <Core/Geometry/PointVector.h>
> +#include <Core/Geometry/AffineTransform.h>
> 
>  namespace Manta
>  {
> 
>    class Cone : public PrimitiveCommon, public TexCoordMapper {
>    public:
> -    Cone(Material* mat, Point bottom, Point top, double Rb, double Rt);
> +    Cone(Material* mat, const Point& bottom, const Point& top, double Rb,
> double Rt);
>      virtual ~Cone();
> 
>      virtual void computeBounds(const PreprocessContext& context,
> @@ -27,7 +27,7 @@
>    private:
>      Point bottom, top;
>      double Rb, Rt;
> -    Transform xform, ixform;
> +    AffineTransform xform, ixform;
>    };
>  }
> 
> 
> Modified: branches/newPointVector/Model/Primitives/Cube.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Primitives/Cube.cc  (original)
> +++ branches/newPointVector/Model/Primitives/Cube.cc  Mon May  9 23:24:20
> 2005
> @@ -2,11 +2,15 @@
>  #include <Interface/RayPacket.h>
>  #include <Core/Geometry/BBox.h>
>  #include <Core/Math/MiscMath.h>
> +#include <Core/Math/MinMax.h>
> 
>  using namespace Manta;
>  using namespace std;
> +using SCIRun::Abs;
> +using SCIRun::Max;
> +using SCIRun::Min;
> 
> -Cube::Cube(Material* mat, Point anch, double w, double h, double d)
> +Cube::Cube(Material* mat, const Point& anch, double w, double h, double
> d)
>    : PrimitiveCommon(mat), anchor(anch), w(w), h(h), d(d)
>  {
>    xmin = anchor.x(); xmax = xmin + w;
> @@ -52,8 +56,8 @@
>       t1 = t2;
>       t2 = temp;
>        }
> -      tnear = max(t1, tnear);
> -      tfar = min(t2, tfar);
> +      tnear = Max(t1, tnear);
> +      tfar = Min(t2, tfar);
> 
>        t1 = (zmin - zo) * e.inverseDirection.z();
>        t2 = (zmax - zo) * e.inverseDirection.z();
> @@ -93,8 +97,8 @@
>       t1 = t2;
>       t2 = temp;
>        }
> -      tnear = max(t1, tnear);
> -      tfar = min(t2, tfar);
> +      tnear = Max(t1, tnear);
> +      tfar = Min(t2, tfar);
> 
>        t1 = (zmin - zo) * e.inverseDirection.z();
>        t2 = (zmax - zo) * e.inverseDirection.z();
> 
> Modified: branches/newPointVector/Model/Primitives/Cube.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Primitives/Cube.h   (original)
> +++ branches/newPointVector/Model/Primitives/Cube.h   Mon May  9 23:24:20
> 2005
> @@ -3,14 +3,14 @@
>  #define Manta_Model_Cube_h
> 
>  #include <Model/Primitives/PrimitiveCommon.h>
> -#include <Core/Geometry/Point.h>
> +#include <Core/Geometry/PointVector.h>
> 
>  namespace Manta
>  {
> 
>    class Cube : public PrimitiveCommon {
>    public:
> -    Cube(Material* mat, Point anch, double w, double h, double d);
> +    Cube(Material* mat, const Point& anch, double w, double h, double d);
>      ~Cube();
> 
>      virtual void computeBounds(const PreprocessContext& context,
> 
> Modified: branches/newPointVector/Model/Primitives/Triangle.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Primitives/Triangle.cc      (original)
> +++ branches/newPointVector/Model/Primitives/Triangle.cc      Mon May  9
> 23:24:20 2005
> @@ -8,7 +8,7 @@
>  using namespace Manta;
>  using namespace std;
> 
> -Triangle::Triangle(Material* mat, Point _a, Point _b, Point _c)
> +Triangle::Triangle(Material* mat, const Point& _a, const Point& _b, const
> Point& _c)
>    : PrimitiveCommon(mat), a(_a), b(_b), c(_c)
>  {
>    Vector v1(b-a);
> 
> Modified: branches/newPointVector/Model/Primitives/Triangle.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/Primitives/Triangle.h       (original)
> +++ branches/newPointVector/Model/Primitives/Triangle.h       Mon May  9
> 23:24:20 2005
> @@ -3,15 +3,14 @@
>  #define Manta_Model_Triangle_h
> 
>  #include <Model/Primitives/PrimitiveCommon.h>
> -#include <Core/Geometry/Point.h>
> -#include <Core/Geometry/Vector.h>
> -#include <Interface/Ray.h>
> +#include <Core/Geometry/PointVector.h>
> +#include <Core/Geometry/Ray.h>
> 
>  namespace Manta
>  {
>    class Triangle : public PrimitiveCommon {
>    public:
> -    Triangle(Material* mat, Point _a, Point _b, Point _c);
> +    Triangle(Material* mat, const Point& _a, const Point& _b, const
> Point& _c);
>      ~Triangle();
> 
>      bool isbad() const
> 
> Modified: branches/newPointVector/Model/TexCoordMappers/LinearMapper.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/TexCoordMappers/LinearMapper.cc
>       (original)
> +++ branches/newPointVector/Model/TexCoordMappers/LinearMapper.cc     Mon
May
> 9 23:24:20 2005
> @@ -8,7 +8,7 @@
>  LinearMapper::LinearMapper(const Point& origin, const Vector& v1,
>                          const Vector& v2, const Vector& v3)
>  {
> -  transform.load_basis(origin, v1, v2, v3);
> +  transform.load_basis(v1, v2, v3, origin);
>  }
> 
>  LinearMapper::~LinearMapper()
> 
> Modified: branches/newPointVector/Model/TexCoordMappers/LinearMapper.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/TexCoordMappers/LinearMapper.h
>       (original)
> +++ branches/newPointVector/Model/TexCoordMappers/LinearMapper.h      Mon
May
> 9 23:24:20 2005
> @@ -3,9 +3,8 @@
>  #define Manta_Model_LinearMapper_h
> 
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Point.h>
> -#include <Core/Geometry/Vector.h>
> -#include <Core/Geometry/Transform.h>
> +#include <Core/Geometry/PointVector.h>
> +#include <Core/Geometry/AffineTransform.h>
> 
>  namespace Manta {
> 
> @@ -13,7 +12,7 @@
>    public:
>      LinearMapper(const Point& origin, const Vector& v1,
>                const Vector& v2, const Vector& v3);
> -    LinearMapper(const Transform& transform);
> +    LinearMapper(const AffineTransform& transform);
>      virtual ~LinearMapper();
> 
>      virtual void computeTexCoords2(const RenderContext& context,
> @@ -24,7 +23,7 @@
>      LinearMapper(const LinearMapper&);
>      LinearMapper& operator=(const LinearMapper&);
> 
> -    Transform transform;
> +    AffineTransform transform;
>    };
>  }
> 
> 
> Modified: branches/newPointVector/Model/TexCoordMappers/SphericalMapper.cc
> ==========================================================================
> ====
> --- branches/newPointVector/Model/TexCoordMappers/SphericalMapper.cc
>       (original)
> +++ branches/newPointVector/Model/TexCoordMappers/SphericalMapper.cc
>       Mon May  9 23:24:20 2005
> @@ -4,6 +4,7 @@
>  #include <Core/Math/MiscMath.h>
> 
>  using namespace Manta;
> +using SCIRun::Clamp;
> 
>  SphericalMapper::SphericalMapper(const Point& center, double radius)
>    : center(center), radius(radius)
> 
> Modified: branches/newPointVector/Model/TexCoordMappers/SphericalMapper.h
> ==========================================================================
> ====
> --- branches/newPointVector/Model/TexCoordMappers/SphericalMapper.h
>       (original)
> +++ branches/newPointVector/Model/TexCoordMappers/SphericalMapper.h
>       Mon May  9 23:24:20 2005
> @@ -3,7 +3,7 @@
>  #define Manta_Model_SphericalMapper_h
> 
>  #include <Interface/TexCoordMapper.h>
> -#include <Core/Geometry/Point.h>
> +#include <Core/Geometry/PointVector.h>
> 
>  namespace Manta {
> 
> 
> Modified: branches/newPointVector/SCIRun/Core/CMakeLists.txt
> ==========================================================================
> ====
> --- branches/newPointVector/SCIRun/Core/CMakeLists.txt        (original)
> +++ branches/newPointVector/SCIRun/Core/CMakeLists.txt        Mon May  9
> 23:24:20 2005
> @@ -13,12 +13,6 @@
>       )
> 
>  SET (SCIRUN_SOURCES ${SCIRUN_SOURCES}
> -     Geometry/BBox.cc
> -     Geometry/Plane.cc
> -     Geometry/Transform.cc
> -     )
> -
> -SET (SCIRUN_SOURCES ${SCIRUN_SOURCES}
>       Malloc/Allocator.cc
>       Malloc/AllocOS.cc
>       Malloc/malloc.cc





Archive powered by MHonArc 2.6.16.

Top of page