Guest User

Untitled

a guest
Sep 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. /* Example of stand-alone plugin development
  2.    Distributed in the public domain.
  3. */
  4.  
  5. #include "ExampleDistribution.h"
  6. #include <iostream>
  7. #include <string>
  8. #include "kml/dom.h"  // The KML DOM header.
  9. #include "kml/base/file.h"
  10.  
  11. using namespace std;
  12.  
  13. // create a spiral
  14. FooDistribution::FooDistribution(int n, Rect* volume, Args* args) : Distribution(n,volume) {
  15.   rad = args->extract_switch("-foo-rad")?args->pop_number():0.1;
  16.   d = MIN(width,height)/n/2;
  17.   i=0;
  18.   cout << "3" << endl;
  19.  
  20.   cout << "1" << endl;
  21. std::string file_content;
  22. kmlbase::File::ReadFileToString("graffiti.kml", &file_content);
  23.   cout << "2" << endl;
  24.   cout << file_content << endl;
  25. }
  26.  
  27. BOOL FooDistribution::next_location(METERS *loc) {
  28. cout << "4" << endl;
  29.   loc[0] = cos(rad*i)*d*i;
  30.   loc[1] = sin(rad*i)*d*i;
  31.   loc[2] = 0;
  32.   i++; // increment for next point
  33. cout << "5" << endl;
  34.   return true; // yes, make the device
  35. }
Add Comment
Please, Sign In to add comment