parse_mesh_example.cpp
Go to the documentation of this file.
1 #include <console_bridge/console.h>
5 #include <iostream>
6 
7 using namespace tesseract_geometry;
8 
9 int main(int /*argc*/, char** /*argv*/)
10 {
11  // documentation:start:1: Create meshes
13  std::string mesh_file = "package://tesseract_support/meshes/sphere_p25m.dae";
14  std::vector<Mesh::Ptr> meshes = createMeshFromPath<Mesh>(locator.locateResource(mesh_file)->getFilePath());
15  // documentation:end:1: Create meshes
16 
17  // documentation:start:2: Print mesh information
18  CONSOLE_BRIDGE_logInform("Number of meshes: %f", meshes.size());
19  CONSOLE_BRIDGE_logInform("Mesh #1 Triangle Count: %f", meshes[0]->getFaceCount());
20  CONSOLE_BRIDGE_logInform("Mesh #1 Triangle Count: %f", meshes[0]->getVertexCount());
21  CONSOLE_BRIDGE_logInform("Mesh #2 Triangle Count: %f", meshes[1]->getFaceCount());
22  CONSOLE_BRIDGE_logInform("Mesh #2 Triangle Count: %f", meshes[1]->getVertexCount());
23  // documentation:end:2: Print mesh information
24 }
resource_locator.h
main
int main(int, char **)
Definition: parse_mesh_example.cpp:9
mesh.h
Tesseract Mesh Geometry.
mesh_parser.h
tesseract_common::GeneralResourceLocator::locateResource
std::shared_ptr< Resource > locateResource(const std::string &url) const override
tesseract_geometry
Definition: fwd.h:31
tesseract_common::GeneralResourceLocator


tesseract_geometry
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:46