Commit 087dd50d authored by michael's avatar michael

--no commit message

--no commit message
parent 7171e7cc
......@@ -99,12 +99,15 @@ bool operator != (const LrPertColorTexture &lhs, const LrPertColorTexture &rhs)
*---------------------------------------------------------------------------*/
LrColor LrPertColorTexture::getColor(Real u, Real v, LrPoint &point) const
{
//int numC=1+((m_ImageTexture.getWidth()/2)*(u+1));
//int numL=1+((m_ImageTexture.getHeight()/2)*(v+1));
//u et v compris entre 0 et 1
int numC=1+((int)((m_ImageTexture.getWidth()-1)*u));
int numL=1+((int)((m_ImageTexture.getHeight()-1)*v));
//int numC=1+((int)((m_ImageTexture.getWidth()-1)*u));
//int numL=1+((int)((m_ImageTexture.getHeight()-1)*v));
int numC=1+((int)((m_ImageTexture.getWidth()-1)*(1-u)));
int numL=1+((int)((m_ImageTexture.getHeight()-1)*(1-v)));
return m_ImageTexture.getPixel(numL,numC);
//return LrColor::YELLOW;
......
......@@ -31,8 +31,9 @@ LrPertColorTwoLayers::LrPertColorTwoLayers( LrPertColor *pertColorHaute,
LrPertColorComposed(),
m_coef(coef)
{
m_listPertColors.push_back(pertColorHaute);
m_listPertColors.push_back(pertColorBasse);
m_listPertColors.push_back(pertColorHaute);
}
......@@ -96,7 +97,7 @@ LrColor LrPertColorTwoLayers::getColor(Real u, Real v, LrPoint &pointInter)const
LrPertColorList::const_iterator itB;
itH=m_listPertColors.begin();
itB=m_listPertColors.end();
itB=itH++;
LrColor CoucheHaute=(*itH)->getColor(u,v, pointInter);
LrColor CoucheBasse=(*itB)->getColor(u,v, pointInter);
......
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