Commit a077825a authored by michael's avatar michael

ajout d'une classe mere abstraite pour faire dériver proprement lrpertColorTwoLayer

parent 37886e91
/**
* @brief LrPertColorComposed : les perturbations de couleur d'une optic.
* @file LrPertColorComposed.h
* @date Jeudi 14 Fevrier 2008
* @note
* @author Josselin Francois
* @author Michael Nauge
* @author Axel Richard
* @author Hervé Souchaud
* @author Emeric Verschuur
*
*
* Classe abstraite représentant une perturbation de couleur
* grace a une composition de perturbation de couleur
*
*/
#if defined HAVE_CONFIG_H
#include "config.h"
#endif
#include "LrPertColorComposed.h"
/*---------------------------------------------------------------------------*
* constructors and destructor *
*---------------------------------------------------------------------------*/
LrPertColorComposed::LrPertColorComposed()
{
}
LrPertColorComposed::LrPertColorComposed(const LrPertColorComposed &source)
:
LrPertColor(source),
m_listPertColors(source.m_listPertColors)
{
}
LrPertColorComposed::LrPertColorComposed(const LrPertColorList &pColorList)
:
LrPertColor(),
m_listPertColors(pColorList)
{
}
LrPertColorComposed::~LrPertColorComposed()
{
}
/*---------------------------------------------------------------------------*
* assignement operator(s) *
*---------------------------------------------------------------------------*/
LrPertColorComposed& LrPertColorComposed::operator = (const LrPertColorComposed &source)
{
if (this == &source)
return *this;
LrPertColor::operator =(source);
m_listPertColors = source.m_listPertColors;
return *this;
}
/*---------------------------------------------------------------------------*
* comparison operator(s) *
*---------------------------------------------------------------------------*/
bool operator == (const LrPertColorComposed &lhs, const LrPertColorComposed &rhs)
{
return
(LrPertColor&)lhs == (LrPertColor&)rhs &&
(lhs.m_listPertColors == rhs.m_listPertColors);
}
bool operator != (const LrPertColorComposed &lhs, const LrPertColorComposed &rhs)
{
return (! (lhs == rhs));
}
/**
* @brief LrPertColorComposed : les perturbations de couleur d'une optic.
* @file LrPertColorComposed.h
* @date Jeudi 14 Fevrier 2008
* @note
* @author Josselin Francois
* @author Michael Nauge
* @author Axel Richard
* @author Hervé Souchaud
* @author Emeric Verschuur
*
*
* Classe abstraite représentant une perturbation de couleur
* grace a une composition de perturbation de couleur
*
*/
#ifndef LRPERTCOLOR_COMPOSED_H
#define LRPERTCOLOR_COMPOSED_H
#include "LrPertColor.h"
#include <list>
/**
* @brief LrPertColorComposed : les perturbations de couleur d'une optic.
*
* Classe représentant une perturbation de couleur de base.
* grace a une composition de perturbation de couleur
*
*/
class LrPertColorComposed : public LrPertColor
{
public:
///@brief Liste d'de perturbation de couleur.
typedef std::list<LrPertColor *> LrPertColorList;
/**
* @brief LrPertColorComposed defaut
*/
LrPertColorComposed();
/**
* @brief LrPertColorComposed copy constructor
* @param source LrPertColorComposed object reference.
*/
LrPertColorComposed(const LrPertColorComposed &source);
/**
* @brief LrPertColorComposed personnal constructor
* @param color LrColor object reference.
*/
LrPertColorComposed(const LrPertColorList &pColorList);
/**
* @brief LrPertColorComposed clone.
* @return LrPertColor pointer object.
*/
virtual LrPertColorComposed * clone() const=0;
/**
* @brief LrPertColorComposed destructor
*/
virtual ~LrPertColorComposed();
/**
* @brief assignement operator(s)
*/
LrPertColorComposed & operator = (const LrPertColorComposed &source);
/**
* @brief comparison operator(s)
*/
friend bool operator == (const LrPertColorComposed &lhs, const LrPertColorComposed &rhs);
friend bool operator != (const LrPertColorComposed &lhs, const LrPertColorComposed &rhs);
/**
* @brief accessors
*/
virtual LrColor getColor(Real u, Real v, LrPoint &pointInter) const=0;;
protected:
///@brief Liste des entités
LrPertColorList m_listPertColors;
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment