Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1595 - in trunk: Model/Materials Model/Textures SwigInterface


Chronological Thread 
  • From: leenak@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1595 - in trunk: Model/Materials Model/Textures SwigInterface
  • Date: Tue, 31 Jul 2007 21:33:13 -0600 (MDT)

Author: leenak
Date: Tue Jul 31 21:33:12 2007
New Revision: 1595

Modified:
   trunk/Model/Materials/CMakeLists.txt
   trunk/Model/Materials/Lambertian.cc
   trunk/Model/Materials/Lambertian.h
   trunk/Model/Textures/CMakeLists.txt
   trunk/Model/Textures/MarbleTexture.h
   trunk/SwigInterface/manta.i
Log:
Tile Texture is added to Manta

Modified: trunk/Model/Materials/CMakeLists.txt
==============================================================================
--- trunk/Model/Materials/CMakeLists.txt        (original)
+++ trunk/Model/Materials/CMakeLists.txt        Tue Jul 31 21:33:12 2007
@@ -4,6 +4,8 @@
      Materials/AmbientOcclusion.cc
      Materials/Checker.h
      Materials/Checker.cc
+     Materials/Tile.h
+     Materials/Tile.cc
      Materials/CopyTextureMaterial.cc
      Materials/CopyTextureMaterial.h
      Materials/Dielectric.h

Modified: trunk/Model/Materials/Lambertian.cc
==============================================================================
--- trunk/Model/Materials/Lambertian.cc (original)
+++ trunk/Model/Materials/Lambertian.cc Tue Jul 31 21:33:12 2007
@@ -48,7 +48,14 @@
   : colortex(colortex)
 {
 }
-
+/*
+Lambertian::Lambertian(const Color& color, const Texture<Color>* colortex_)

+{
+colortex = new Constant<Color>(color);
+colortex = colortex+colortex_;
+}
+*/ 
 Lambertian::~Lambertian()
 {
 }

Modified: trunk/Model/Materials/Lambertian.h
==============================================================================
--- trunk/Model/Materials/Lambertian.h  (original)
+++ trunk/Model/Materials/Lambertian.h  Tue Jul 31 21:33:12 2007
@@ -41,12 +41,14 @@
   public:
     Lambertian(const Color& color);
     Lambertian(const Texture<Color>* colorfn);
-    Lambertian() {  };
+       //Lambertian(const Color& color, const Texture<Color>* colorfn);
+       Lambertian() {  };
     virtual ~Lambertian();
 
     virtual void shade(const RenderContext& context, RayPacket& rays) const;
   private:
     const Texture<Color>* colortex;
+       
   };
 }
 

Modified: trunk/Model/Textures/CMakeLists.txt
==============================================================================
--- trunk/Model/Textures/CMakeLists.txt (original)
+++ trunk/Model/Textures/CMakeLists.txt Tue Jul 31 21:33:12 2007
@@ -3,6 +3,8 @@
 SET( Manta_Textures_SRCS
      Textures/CheckerTexture.cc
      Textures/CheckerTexture.h
+     Textures/TileTexture.cc
+     Textures/TileTexture.h
      Textures/ColorMap.cc
      Textures/ColorMap.h
      Textures/Constant.cc

Modified: trunk/Model/Textures/MarbleTexture.h
==============================================================================
--- trunk/Model/Textures/MarbleTexture.h        (original)
+++ trunk/Model/Textures/MarbleTexture.h        Tue Jul 31 21:33:12 2007
@@ -80,7 +80,7 @@
     for( int i = rays.begin(); i < rays.end(); i++ ) {
       Vector T = rays.getTexCoords(i) * (scale * fscale);
       ColorComponent value = (Real)0.25 *
-        Cos( rays.getTexCoords(i).x() * scale + tscale *
+        Cos( rays.getTexCoords(i).z() * scale + tscale *
              (Real)Turbulence( T, octaves, lacunarity, gain ) );
       results.set(i, SCIRun::Interpolate( value1, value2, value ));
     }

Modified: trunk/SwigInterface/manta.i
==============================================================================
--- trunk/SwigInterface/manta.i (original)
+++ trunk/SwigInterface/manta.i Tue Jul 31 21:33:12 2007
@@ -177,12 +177,17 @@
 %{
 #include <Model/Textures/Constant.h>
 #include <Model/Textures/CheckerTexture.h>
+#include <Model/Textures/TileTexture.h>
 #include <Model/Textures/ImageTexture.h>
+#include <Model/Textures/MarbleTexture.h>
 %}
 
 %include <Model/Textures/Constant.h>
 %include <Model/Textures/CheckerTexture.h>
+%include <Model/Textures/TileTexture.h>
 %include <Model/Textures/ImageTexture.h>
+%include <Model/Textures/MarbleTexture.h>
+
 
 namespace Manta {
   // Textures.  If you add a new texture like FunkyTexture<MagicType>,
@@ -201,8 +206,13 @@
   %template(CheckerTexture_Color) CheckerTexture<Color>;
   %template(CheckerTexture_Real) CheckerTexture<Manta::Real>;
   %template(CheckerTexture_ColorComponent) 
CheckerTexture<Manta::ColorComponent>;
+  %template(TileTexture_Color) TileTexture<Color>;
+  %template(TileTexture_Real) TileTexture<Manta::Real>;
+  %template(TileTexture_ColorComponent) TileTexture<Manta::ColorComponent>;
   %template(Constant_Color) Constant<Color>;
   %template(ImageTexture_Color) ImageTexture<Manta::Color>;
+  %template(MarbleTexture_Color) MarbleTexture<Manta::Color>;
+  
 }
 
 /////////////////////////////////////////////////////




  • [MANTA] r1595 - in trunk: Model/Materials Model/Textures SwigInterface, leenak, 07/31/2007

Archive powered by MHonArc 2.6.16.

Top of page