Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1806 - trunk/Model/Backgrounds


Chronological Thread 
  • From: bigler@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1806 - trunk/Model/Backgrounds
  • Date: Fri, 2 Nov 2007 23:14:32 -0600 (MDT)

Author: bigler
Date: Fri Nov  2 23:14:30 2007
New Revision: 1806

Modified:
   trunk/Model/Backgrounds/EnvMapBackground.cc
   trunk/Model/Backgrounds/EnvMapBackground.h
Log:
Model/Backgrounds/EnvMapBackground.cc
Model/Backgrounds/EnvMapBackground.h

  Added a setRightUp function that computes the orthonormal basis from
  an up and right vector.


Modified: trunk/Model/Backgrounds/EnvMapBackground.cc
==============================================================================
--- trunk/Model/Backgrounds/EnvMapBackground.cc (original)
+++ trunk/Model/Backgrounds/EnvMapBackground.cc Fri Nov  2 23:14:30 2007
@@ -20,12 +20,17 @@
   : image(image),
     map_type(map_type) {
   // Initialize an orthonormal basis
-  U=right.normal();
-  V=Cross(up, U).normal();
-  W=Cross(U, V);
+  setRightUp(right, up);
 }
 
 EnvMapBackground::~EnvMapBackground(void) {
+}
+
+void EnvMapBackground::setRightUp(Vector right, Vector up)
+{
+  U=right.normal();
+  V=Cross(up, U).normal();
+  W=Cross(U, V);
 }
 
 void EnvMapBackground::preprocess(const PreprocessContext&) {

Modified: trunk/Model/Backgrounds/EnvMapBackground.h
==============================================================================
--- trunk/Model/Backgrounds/EnvMapBackground.h  (original)
+++ trunk/Model/Backgrounds/EnvMapBackground.h  Fri Nov  2 23:14:30 2007
@@ -29,6 +29,7 @@
     void OldBehaviorMapping(const RenderContext& context, RayPacket& rays) 
const;
     void DebevecMapping(const RenderContext& context, RayPacket& rays) const;
 
+    void setRightUp(Vector right, Vector up);
   private:
     Texture<Color>* image;
     MappingType map_type;




  • [Manta] r1806 - trunk/Model/Backgrounds, bigler, 11/03/2007

Archive powered by MHonArc 2.6.16.

Top of page