Text archives Help
- From: sparker@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1958 - trunk/Model/Materials
- Date: Sun, 30 Dec 2007 23:56:15 -0700 (MST)
Author: sparker
Date: Sun Dec 30 23:56:13 2007
New Revision: 1958
Modified:
trunk/Model/Materials/Flat.h
trunk/Model/Materials/Lambertian.h
trunk/Model/Materials/Phong.h
Log:
Added accessor functions to material textures
Modified: trunk/Model/Materials/Flat.h
==============================================================================
--- trunk/Model/Materials/Flat.h (original)
+++ trunk/Model/Materials/Flat.h Sun Dec 30 23:56:13 2007
@@ -46,6 +46,7 @@
virtual void preprocess(const PreprocessContext&);
virtual void shade(const RenderContext& context, RayPacket& rays) const;
+ void setColor(const Texture<Color>* tex) {colortex = tex;}
private:
Texture<Color> const *colortex;
};
Modified: trunk/Model/Materials/Lambertian.h
==============================================================================
--- trunk/Model/Materials/Lambertian.h (original)
+++ trunk/Model/Materials/Lambertian.h Sun Dec 30 23:56:13 2007
@@ -50,6 +50,7 @@
RayPacket& rays, Packet<Color>& reflectance)
const;
void readwrite(ArchiveElement* archive);
+ void setDiffuse(const Texture<Color>* tex) { colortex = tex; }
private:
const Texture<Color>* colortex;
Modified: trunk/Model/Materials/Phong.h
==============================================================================
--- trunk/Model/Materials/Phong.h (original)
+++ trunk/Model/Materials/Phong.h Sun Dec 30 23:56:13 2007
@@ -23,6 +23,8 @@
virtual ~Phong();
virtual void shade(const RenderContext& context, RayPacket& rays) const;
+ void setDiffuse(Texture<Color>* tex) {diffusetex = tex;}
+ void setSpecular(Texture<Color>* tex, int sp) {speculartex = tex;
specpow = sp;}
private:
const Texture<Color>* diffusetex;
const Texture<Color>* speculartex;
- [Manta] r1958 - trunk/Model/Materials, sparker, 12/31/2007
Archive powered by MHonArc 2.6.16.