Пример #1
0
void ossimBumpShadeTileSource::initialize()
{
  ossimImageCombiner::initialize();
   m_tile = 0;
   
  computeLightDirection();
  
}
Пример #2
0
bool ossimBumpShadeTileSource::loadState(const ossimKeywordlist& kwl,
                                         const char* prefix)
{
   const char* elevationAngle = kwl.find(prefix, ossimKeywordNames::ELEVATION_ANGLE_KW);
   const char* azimuthAngle   = kwl.find(prefix, ossimKeywordNames::AZIMUTH_ANGLE_KW);
   
   
   if(elevationAngle)
   {
      m_lightSourceElevationAngle = ossimString(elevationAngle).toDouble();
   }

   if(azimuthAngle)
   {
      m_lightSourceAzimuthAngle = ossimString(azimuthAngle).toDouble();
   }

   const char* lookup = kwl.find(prefix, COLOR_RED_KW);
   if (lookup)
   {
      m_r = ossimString(lookup).toUInt8();
   }
   
   lookup = kwl.find(prefix, COLOR_GREEN_KW);
   if (lookup)
   {
      m_g = ossimString(lookup).toUInt8();
   }
   
   lookup = kwl.find(prefix, COLOR_BLUE_KW);
   if (lookup)
   {
      m_b = ossimString(lookup).toUInt8();
   }
    

   computeLightDirection();

   bool result = ossimImageSource::loadState(kwl, prefix);

   theInputListIsFixedFlag  = true;
   theOutputListIsFixedFlag = false;
   if(!getNumberOfInputs()) setNumberOfInputs(2);
   
   return result;
}
void ossimBumpShadeTileSource::initialize()
{
   ossimImageCombiner::initialize();

   ossimImageSource* normalSource = dynamic_cast<ossimImageSource*>( getInput(0) );
   if ( normalSource )
   {
      normalSource->initialize();
   }
   
   ossimImageSource* colorSource = dynamic_cast<ossimImageSource*>( getInput(1) );
   if ( colorSource )
   {
      colorSource->initialize();
   }
   
   m_tile = 0;
   
   computeLightDirection();
}