Commit 087dd50d authored by michael's avatar michael
Browse files

No commit message

No commit message
parent 7171e7cc
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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;
+3 −2
Original line number Diff line number Diff line
@@ -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);