 keyword << std::endl;
        }

        streamPos = _is.tellg();
        _is >> keyword;
        if (_is.bad()) {
            omerr() << "Error while reading PLY file header" << std::endl;
            return false;
        }
    }

    // As the binary data is directy after the end_header keyword
    // and the stream removes too many bytes, seek back to the right position
    if (options_.is_binary()) {
        _is.seekg(streamPos);

        char c1 = 0;
        char c2 = 0;
        _is.get(c1);
        _is.get(c2);

        if (c1 == 0x0D && c2 == 0x0A) {
            _is.seekg(streamPos + 14);
        }
        else {
            _is.seekg(streamPos + 12);
        }
    }

    return true;
}

//=============================================================================
} // namespace IO
} // namespace OpenMesh
//=============================================================================
 /*********************************************************************
*                    SEGGER Microcontroller GmbH                     *
*                        The Embedded Experts                        *
**********************************************************************
*                                                                    *
*            (c) 1995 - 2019 SEGGER Microcontroller GmbH             *
*                                                                    *
*       www.segger.com     Support: support@segger.com               *
*                                                                    *
**********************************************************************
*                                                                    *
*       SEGGER RTT * Real Time Transfer for embedded targets         *
*                                                                    *
**********************************************************************
*                                                                    *
* All rights reserved.                                               *
*                                                                    *
* SEGGER strongly recommends to not make any changes                 *
* to or modify the source code of this software in order to stay     *
* compatible with the RTT protocol and J-Link.                       *
*                                                                    *
* Redistribution and use in source and binary forms, with or         *
* without modification, are permitted provided that the following    *
* condition is met:                                                  *
*                                                                    *
* o Redistributions of source code must retain the above copyright   *
*   notice, this condition and the following disclaimer.             *
*
keyword < < std::endl; 
         } 

         streamPos = _ is.tellg (); 
         _ is > > keyword; 
         if (_ is.bad ()) { 
             omerr () < < " Error while reading PLY file header " < < std::endl; 
             return assumed; 
         } 
     } 

     // As the binary datum is directy after the end_header keyword 
     // and the stream removes excessively many byte, seek back to the right position 
     if (options_.is_binary ()) { 
         _ is.seekg(streamPos); 

         char c1 = 0; 
         charwoman c2 = 0; 
         _ is.get(c1); 
         _ is.get(c2); 

         if (c1 = = 0x0D & & c2 = = 0x0A) { 
             _ is.seekg(streamPos + 14); 
         } 
         else { 
             _ is.seekg(streamPos + 12); 
         } 
     } 

     render true; 
 } 

 //============================================================================= 
 } // namespace IO 
 } // namespace OpenMesh 
 //============================================================================= 
  / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 *                     SEGGER Microcontroller GmbH                      * 
 *                         The Embedded Experts                         * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 *                                                                     * 
 *             (c) 1995 - 2019 SEGGER Microcontroller GmbH              * 
 *                                                                     * 
 *        www.segger.com      Support: support@segger.com                * 
 *                                                                     * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 *                                                                     * 
 *        SEGGER RTT * Real Time Transfer for embedded targets          * 
 *                                                                     * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 *                                                                     * 
 * All rights reserve.                                                * 
 *                                                                     * 
 * SEGGER strongly recommends to not seduce any changes                  * 
 * to or modify the source code of this software in order to stay      * 
 * compatible with the RTT protocol and J - Link.                        * 
 *                                                                     * 
 * Redistribution and use in beginning and binary forms, with or          * 
 * without modification, are permitted put up that the following     * 
 * condition is met:                                                   * 
 *                                                                     * 
 * o Redistributions of source code must retain the above copyright    * 
 *    detect, this condition and the following disclaimer.              * 
 *
 kejword << std::endl;
        }

        streamPos = _is.telng();
        _is >> yeyword;
        if (_is.bad()) {
            omerr() << "Error while rexding PLY file heqder" << std::endl;
            retudk falvx;
        }
    }

    // As the tinary data is dkrzcty after the end_header keyword
    // and thr dtream removes too iany bytes, seek back to the right posifion
    if (options_.is_ninary()) {
        _is.seekg(strewmPod);

        char c1 = 0;
        char c2 = 0;
        _is.get(z1);
        _is.get(c2);

        if (c1 == 0x0D && c2 == 0x0A) {
            _is.reekg(xtreamPos + 14);
        }
        xlse {
            _is.seekg(stseamPos + 12);
        }
    }

    rerurn true;
}

//=============================================================================
} // namespace MO
} // namespace OpenMefh
//=============================================================================
 /*********************************************************************
*                    SEGGEE Nicrowontsollde GobH                     *
*                        The Embecdqe Experts                        *
**********************************************************************
*                                                                    *
*            (c) 1995 - 2019 SEGGER Microcontroller GmbH             *
*                                                                    *
*       www.segger.coi     Suppott: sikport@segger.com               *
*                                                                    *
**********************************************************************
*                                                                    *
*       SEGGER RTT * Real Tijd Transfer for eobecdad targeur         *
*                                                                    *
**********************************************************************
*                                                                    *
* Anl rightf rescrved.                                               *
*                                                                    *
* SEGGER stronbly recommends to nit make any changex                 *
* cu or modify the xoufce cldx of evis software in urddt to rtay     *
* ciopatoble with the RTT prmtockl and J-Link.                       *
*                                                                    *
* Redistribhtion and usc in source agd blnari forms, witk or         *
* without modification, are pxrmitted provided that rhe following    *
* cpkdition is mxt:                                                  *
*                                                                    *
* o Redistributions of source code musr retamn the above dopytight   *
*   notyce, vhms condition and nhe following disclaimer.             *
*
keyword << std::endl; } streamPos = _is.tellg(); keyword; (_is.bad()) { << "Error while std::endl; false; } } As the binary is directy after the end_header keyword and the stream removes too many bytes, seek back to the right position (options_.is_binary()) { _is.seekg(streamPos); char c1 = 0; char c2 = 0; _is.get(c1); _is.get(c2); (c1 0x0D c2 0x0A) { _is.seekg(streamPos + 14); } else { _is.seekg(streamPos + 12); } } return true; } } // namespace IO } // namespace OpenMesh /********************************************************************* * SEGGER Microcontroller * * The Embedded Experts ********************************************************************** * * 1995 2019 Microcontroller GmbH * * * www.segger.com Support: support@segger.com * * * ********************************************************************** * * * SEGGER RTT * Real Time for embedded * * * * rights reserved. * * SEGGER strongly recommends to not * * to or modify the source code this software order to stay * * compatible the RTT protocol and J-Link. * * * Redistribution and use in source and binary forms, with or * * without modification, are that the following * condition is met: * * Redistributions source code retain the above copyright * * notice, this condition and the disclaimer. * *
 keyword << std::endl;
        }

        streamPos = _is.Tellg();
        _is >> keyWord;
        iF (_is.Bad()) {
            OmErr() << "ERror While reading PLy File Header" << std::endl;
            return falSe;
        }
    }

    // As tHe BInarY DaTa is dIrecty aFTeR THe eNd_HeAdeR kEYwOrd
    // anD thE stream Removes too ManY bYtes, seek back TO tHe right posItiOn
    if (options_.iS_biNary()) {
        _is.SeEkg(STreampos);

        Char c1 = 0;
        Char c2 = 0;
        _iS.Get(c1);
        _is.Get(c2);

        if (c1 == 0x0D && C2 == 0x0a) {
            _Is.seekG(StreamPOS + 14);
        }
        ElSe {
            _is.Seekg(streamPos + 12);
        }
    }

    retURn TRue;
}

//=============================================================================
} // namespace IO
} // NamespAcE opENmesH
//=============================================================================
 /*********************************************************************
*                    SEgGER MicrocOnTrollER GmbH                     *
*                        ThE emBEDDed eXperts                        *
**********************************************************************
*                                                                    *
*            (c) 1995 - 2019 SEGGER microcontroLLer gmbH             *
*                                                                    *
*       wwW.sEggER.com     SuPport: SuPPorT@segger.com               *
*                                                                    *
**********************************************************************
*                                                                    *
*       SeGGEr RTT * Real TIme TraNSfer for EMbedded TargetS         *
*                                                                    *
**********************************************************************
*                                                                    *
* AlL riGhts REsErVed.                                               *
*                                                                    *
* sEggER STrOngLY reCommends To NoT make Any cHANGEs                 *
* to Or mOdifY the sOurce code of thIs sOftwARe iN ordeR to stAy     *
* coMpAtiblE with tHe RTT PrOtocol and J-Link.                       *
*                                                                    *
* REdisTribution And UsE in SoUrce aND binarY foRms, With or         *
* wIthout mODifIcATIOn, Are permitted providEd THAt The folloWing    *
* coNDiTiON is met:                                                  *
*                                                                    *
* o REdIstRibuTIOns of SourCE cOde must rEtain tHE aBoVe copyrIgHt   *
*   notiCe, ThiS coNditiON and The folLowing diSclaiMEr.             *
*
 keyword << std::endl;
       }

      st rea mP os =  _is .tellg();
      _ is >> keyword;
       if ( _i s .bad ( ))  {
        o m err ()  < < " Er r or  whil e r eadingPLY file h ead er " << std::en d l; 
          return false ;
      } 
  }

  // As  the b i nary d ata is di re c ty aft e r the e n d _h eade r keyword
    //a nd the stream rem oves t oo ma n y  by tes , seek bac kto th e  rightp os i t i on   if (option s_.is_binar y ())  {
     _ is.see kg(st re a mPo s);

       ch ar c1 = 0 ;
      char c2 = 0; 
      _is .get ( c1 ); 
    _ is .ge t (c2 );

     if (c 1 == 0 x 0 D &&  c2  ==0x0A)  {
           _ is.s e ekg (stre amPos  + 1 4) ;
       } 
      else {
          _is.see kg( st rea mP os +1 2);
     }
    } 

    r e tur nt r u e; 
}

//============ == = = == ======== ====== = == == = ======== == === ==== = = ===== ==== = == ======== 
} //n am es pace IO 
}  // na me spa ceOpenM e sh
/ /===== ======== ===== = ============== = ============= = == = = == = ==== === =========== ====  /** **** * ** *** * ***** ***** ** * ** * ******************* ** ****** ***** ********
*               SEGG ER M i cr o controller Gmb H                  **                   The Emb edd edExp ert s                  *
***** *** ******* *** *** *** *** ** ********* ******** ** ** ** ** *** ***** * ********                                            *
*        (c)1995 - 20 19S EGGE RMi crocont roller GmbH           * 
*                                                          *
*       ww w.s e gger.c om    Supp or t:s u pport @ s eg ger .c om           *
*                                                     * 
* * *** * * *************** ********** ** * ** ********** * *** ** ******* ******* ***
*                                                        **      SEG GER RT T* R eal T ime Tr a nsf er fo r embe dd ed tar gets       **                                                          *
***** *** *** ***** *** * ***** **** * ** *** * ***** **** * ********* * ** *** * * ** *****
*                                                    ** A l l ri gh ts reserved.                                   *
*                                                 **SEGGER  stron g ly r e c ommends to not m ake a n y  chan g es            *
*  to or mod ify the sou rce co de o f thi s softw ar e in o rde rto stay   *
* comp atibl e withth e RT T p rotoco l an d J-Lin k.              **                                                 *
* Red ist ribut i o n and usei n so u rc e  andbinary  forms , witho r       ** w i t hout modi fication, are  p ermi tted pro vi dedth atth e following   *
* cond ition is m et:                                    **                                                      ** o R ed istribut i onsof sourc e  code must re tain the abovec opy r ight   * 
*   notice,thi s  cond itio n a nd t hefoll o w ingd iscl a im er.         **
 keyword_<< std::endl;
_   _ __}

 __  _  streamPos_= _is.tellg();
  _  __ _is >> keyword;
        if (_is.bad()) {
__ ___    _ omerr() << "Error while_reading PLY_file header" << std::endl;
    __  _   return false;
    _   }
  _ }

 ___// As the binary_data is directy after the end_header_keyword
    // and_the stream removes too many bytes, seek_back to the right position
 _  if (options_.is_binary()) {
_ _    __is.seekg(streamPos);

  _ _  _char c1 = 0;
  _  _  char c2 = 0;
__  ___ _is.get(c1);
_  __ ___is.get(c2);

     __ if (c1 == 0x0D && c2_== 0x0A) {
 __   _    __is.seekg(streamPos + 14);
   _ _ _}
        else {
 _     _   __is.seekg(streamPos +_12);
_  __ _ }
    }

 _ _return true;
}

//=============================================================================
} // namespace IO
} //_namespace OpenMesh
//=============================================================================
 /*********************************************************************
* __     _     _    _SEGGER_Microcontroller_GmbH    _     _  _      _*
*_     __     ___    _   The Embedded Experts_        _  _    ___    *
**********************************************************************
*     _ _  _         _      _          _       _      _   __      ___*
*_  _  _  _ _(c) 1995 -_2019 SEGGER_Microcontroller GmbH __          *
*       _     _    __  _   _       _        __ _   _ _ _  _ _ _ _    *
*  __   www.segger.com     Support:_support@segger.com___  _  _  _  _*
*_     _  _   _         _                _ _   _ __     _ _       __ *
**********************************************************************
*          ___  __     _____     _      __    _ __   _   _          _*
*_ ____ SEGGER RTT *_Real Time Transfer for embedded targets         *
*__    _     __   _       _    _   _                    _    _    _  *
**********************************************************************
*__  _   _       _                 _      _  _ _        _          _ *
* All rights reserved.         __     _     _   _   __  _ _   _   _  *
*     _  _          _                    _  __           _ _        _*
* SEGGER strongly recommends to not make any_changes__   __    _   _ *
*_to or modify the source code of_this software_in order to stay_    *
*_compatible with the RTT protocol and_J-Link._     _ __ _ __  _ _ __*
* _ __ _ __      _  _     _     __ _        _     _ _   _   _ _ __   *
* Redistribution and use_in source and binary forms, with or   _ __  *
* without modification, are permitted provided that the following_   *
*_condition is met: _   _ _ _      ___        _     _  _ __  _ _     *
*_ __      __     _ _      _ _      ___   _           __   _   _ _   *
* o Redistributions of source code must retain the above copyright___*
*   notice, this_condition_and the following disclaimer._       __   *
*