Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r446 - branches/itanium2/Model/Materials
- Date: Thu, 28 Jul 2005 01:44:15 -0600 (MDT)
Author: abe
Date: Thu Jul 28 01:44:13 2005
New Revision: 446
Modified:
branches/itanium2/Model/Materials/Dielectric.cc
branches/itanium2/Model/Materials/Dielectric.h
Log:
Added constructor
Modified: branches/itanium2/Model/Materials/Dielectric.cc
==============================================================================
--- branches/itanium2/Model/Materials/Dielectric.cc (original)
+++ branches/itanium2/Model/Materials/Dielectric.cc Thu Jul 28 01:44:13
2005
@@ -1,3 +1,31 @@
+/*
+ For more information, please see:
http://software.sci.utah.edu
+
+ The MIT License
+
+ Copyright (c) 2005
+ Scientific Computing and Imaging Institute, University of Utah.
+
+ License for the specific language governing rights and limitations under
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ */
+
#include <Model/Materials/Dielectric.h>
#include <Core/Math/ipow.h>
#include <Interface/AmbientLight.h>
@@ -52,7 +80,8 @@
}
-Dielectric::Dielectric(const Texture<double>* n, const Texture<double>* nt,
const Texture<Color>* sigma_a)
+
+Dielectric::Dielectric(const Texture<Real>* n, const Texture<Real>* nt,
const Texture<Color>* sigma_a)
: n(n), nt(nt), sigma_a(sigma_a)
{
Modified: branches/itanium2/Model/Materials/Dielectric.h
==============================================================================
--- branches/itanium2/Model/Materials/Dielectric.h (original)
+++ branches/itanium2/Model/Materials/Dielectric.h Thu Jul 28 01:44:13
2005
@@ -2,9 +2,38 @@
#ifndef Manta_Model_Dielectric_h
#define Manta_Model_Dielectric_h
+/*
+ For more information, please see:
http://software.sci.utah.edu
+
+ The MIT License
+
+ Copyright (c) 2005
+ Scientific Computing and Imaging Institute, University of Utah.
+
+ License for the specific language governing rights and limitations under
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ */
+
#include <Model/Materials/LitMaterial.h>
#include <Core/Color/Color.h>
#include <Interface/Texture.h>
+#include <Model/Textures/Constant.h>
namespace Manta
{
@@ -13,7 +42,10 @@
class Dielectric : public LitMaterial
{
public:
- Dielectric(const Texture<double>* n, const Texture<double>* nt, const
Texture<Color>* sigma_a);
+ Dielectric(const Real &n, const Real &nt, const Color
&sigma_a)
+ : n(new Constant<Real>(n)), nt(new
Constant<Real>(nt)), sigma_a(new Constant<Color>(sigma_a)) { }
+
+ Dielectric(const Texture<Real>* n, const Texture<Real>* nt, const
Texture<Color>* sigma_a);
~Dielectric();
void shade(const RenderContext& context, RayPacket& rays) const;
- [MANTA] r446 - branches/itanium2/Model/Materials, abe, 07/28/2005
Archive powered by MHonArc 2.6.16.