Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1682 - trunk/Model/Textures


Chronological Thread 
  • From: bigler@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1682 - trunk/Model/Textures
  • Date: Mon, 27 Aug 2007 14:40:46 -0600 (MDT)

Author: bigler
Date: Mon Aug 27 14:40:46 2007
New Revision: 1682

Modified:
   trunk/Model/Textures/CloudTexture.h
Log:
Model/Textures/CloudTexture.h

  Fix warnings and indentations

  Remove all tabs.


Modified: trunk/Model/Textures/CloudTexture.h
==============================================================================
--- trunk/Model/Textures/CloudTexture.h (original)
+++ trunk/Model/Textures/CloudTexture.h Mon Aug 27 14:40:46 2007
@@ -24,18 +24,18 @@
   class RenderContext;
   template< typename ValueType >
   class CloudTexture : public Texture< ValueType > {
-    public:
+  public:
     CloudTexture( ValueType const &Skycolor, Real const cloud_cover, int 
const cloud_coordinate );
     virtual ~CloudTexture();
     virtual void mapValues(Packet<Color>& results,
                            const RenderContext&,
                            RayPacket& rays) const;
     Real cloud_coverage(Real value) const;
-    private:
+  private:
     CloudTexture(
-      CloudTexture const & );
+                 CloudTexture const & );
     CloudTexture& operator=(
-      CloudTexture const & );
+                            CloudTexture const & );
     
     ValueType skycolor;
     Real scale;
@@ -44,16 +44,16 @@
     int octaves;
     Real lacunarity;
     Real gain;
-    int cloud_coordinate;
     Real cloud_cover;
+    int cloud_coordinate;
   };
 
   template< class ValueType >
-               CloudTexture< ValueType >::CloudTexture(ValueType const 
&Skycolor, Real const cloud_cover, int const cloud_coordinate)      
-               : cloud_cover( cloud_cover ),
+  CloudTexture< ValueType >::CloudTexture(ValueType const &Skycolor, Real 
const cloud_cover, int const cloud_coordinate)      
+    : cloud_cover( cloud_cover ),
       cloud_coordinate(cloud_coordinate)
   {
-    skycolor=Color(RGBColor(1,1,1))-Skycolor;
+    skycolor=Color::white()-Skycolor;
     scale=0.1;
     fscale=1;
     tscale=1;
@@ -69,11 +69,11 @@
   
   template< class ValueType >
   void CloudTexture< ValueType >::mapValues(Packet<Color>& results,
-                                             const RenderContext& context,
-                                             RayPacket& rays) const
+                                            const RenderContext& context,
+                                            RayPacket& rays) const
   {
     enum cloud_dimension {
-                       x_coordinate ,
+      x_coordinate ,
       y_coordinate ,
       z_coordinate
     };
@@ -103,23 +103,23 @@
       value=value*(Real)0.5+(Real)0.5;
       value=value*density;
       value=value*(Real)0.5+(Real)0.5;
-      results.set(i, (SCIRun::Interpolate( skycolor, Color(RGBColor(0,0,0)), 
value))+Color(RGBColor(1,1,1)));
+      results.set(i, (SCIRun::Interpolate( skycolor, Color::white(), 
value))+Color::white());
     
     }
   }
 
   template< class ValueType >
   Real CloudTexture< ValueType >::cloud_coverage(Real value) const
-               {
-      Real total_cover=(cloud_cover*1.6215)+249.8;
-      Real c_value = total_cover-value;
-      if(c_value < 0)
+  {
+    Real total_cover=(cloud_cover*1.6215)+249.8;
+    Real c_value = total_cover-value;
+    if(c_value < 0)
       {
-       c_value=0;
+        c_value=0;
       }
-      Real density_value = 255 - ((c_value));
-      return density_value;
-    }
+    Real density_value = 255 - ((c_value));
+    return density_value;
+  }
 }
 
 #endif




  • [Manta] r1682 - trunk/Model/Textures, bigler, 08/27/2007

Archive powered by MHonArc 2.6.16.

Top of page