TommyKaneko / Sketchup-API-C-Wrapper

A complete set of C++ Wrapper classes for SketchUp C API objects
MIT License
29 stars 8 forks source link

Filled out ModelStats methods #18

Closed jimfoltz closed 6 years ago

jimfoltz commented 6 years ago

I decided to use the plural of each type to return the count. You had started out using a prefix of num_, but in my mind that could be interpreted as a command to number the edges, which is why I avoided using it.

If you'd prefer, the methods could be named using a suffix _count so face_count() edge_count()

Let me know if you have a preference for naming these methods.

Example:

 CW::ModelStatistics stats = CW::ModelStatistics(model);
  std::cout << "Stats:\n";
  std::cout << "\tEdges:       " << stats.edges() << "\n";
  std::cout << "\tFaces:       " << stats.faces() << "\n";
  std::cout << "\tDefinitions: " << stats.definitions() << "\n";
  std::cout << "\tInstances:   " << stats.instances() << "\n";
  std::cout << "\tGroups:      " << stats.groups() << "\n";
  std::cout << "\tLayers:      " << stats.layers() << "\n";
  std::cout << "\tMaterials:   " << stats.materials() << "\n";
  std::cout << "\tImages:      " << stats.images() << "\n";