Source: raytracer/texture.h
|
|
|
|
/* *************************************************************************
texture.h - description
-------------------
begin : Wed Oct 16 2002
copyright : (C) 2002 by Micha Riser
email : mriser@gmx.net
************************************************************************* */
/* *************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
************************************************************************* */
#ifndef TEXTURE_H
#define TEXTURE_H
#include "colour.h"
#include "finish.h"
#include "lightray.h"
class CameraRay;
/**Texture describes evaluated colour and finish properties at
*object surface.
*@author Micha Riser
*/
class Texture {
public: // Public attributes
Colour5* colour;
const Finish* finish;
public: // Constructors and destructor
Texture(Colour5 *c, const Finish *f): colour(c), finish(f) {}
~Texture() {
delete(colour);
}
private: // Private constructor
Texture(const Texture& t);
Texture& operator=(const Texture&);
public: // Public methods
void setColour(Colour5* c) {/* check for existing colour? */ if (c) colour = new Colour5(*c);}
void setFinish(const Finish* f) {finish = f;}
Colour3 enlightShadow(const CameraRay &cray) const;
Colour3 enlightLight(LightRay& lray, const CameraRay& cray) const;
};
#endif
| Generated by: micha@laptop on Thu Oct 24 20:25:24 2002, using kdoc 2.0a53. |