Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r2061 - trunk/Image


Chronological Thread 
  • From: "Solomon Boulos" <boulos@cs.utah.edu>
  • To: manta@sci.utah.edu
  • Subject: [Manta] r2061 - trunk/Image
  • Date: Wed, 13 Feb 2008 16:19:44 -0700 (MST)

Author: boulos
Date: Wed Feb 13 16:19:43 2008
New Revision: 2061

Modified:
   trunk/Image/Pixel.h
Log:
Image/Pixel.h

 Adding BGRAfloatPixel.


Modified: trunk/Image/Pixel.h
==============================================================================
--- trunk/Image/Pixel.h (original)
+++ trunk/Image/Pixel.h Wed Feb 13 16:19:43 2008
@@ -152,7 +152,7 @@
     unsigned char g;
     unsigned char b;
   };
-  
+
   inline void convertToPixel(RGB8Pixel& p, const RGBColor& c) {
     float r = c.r();
     r = r<0.f?0.f:r;
@@ -216,6 +216,27 @@
   }
 
   inline void convertToRGBColor(RGBColor& c, const RGBAfloatPixel& p) {
+    c.setR(p.r);
+    c.setG(p.g);
+    c.setB(p.b);
+  }
+
+  class BGRAfloatPixel {
+  public:
+    float b;
+    float g;
+    float r;
+    float a;
+  };
+
+  inline void convertToPixel(BGRAfloatPixel& p, const RGBColor& c){
+    p.r = c.r();
+    p.g = c.g();
+    p.b = c.b();
+    p.a = 1;
+  }
+
+  inline void convertToRGBColor(RGBColor& c, const BGRAfloatPixel& p) {
     c.setR(p.r);
     c.setG(p.g);
     c.setB(p.b);




  • [Manta] r2061 - trunk/Image, Solomon Boulos, 02/13/2008

Archive powered by MHonArc 2.6.16.

Top of page