Typedefs | Functions
ConvertMesh.cpp File Reference
#include <ros/ros.h>
#include <urdf_traverser/Types.h>
#include <urdf_traverser/UrdfTraverser.h>
#include <urdf_traverser/Functions.h>
#include <urdf2inventor/Helpers.h>
#include <urdf2inventor/IVHelpers.h>
#include <urdf2inventor/ConvertMesh.h>
#include <urdf2inventor/MeshConvertRecursionParams.h>
#include <urdf2inventor/AssimpImport.h>
#include <Inventor/nodes/SoGroup.h>
#include <Inventor/nodes/SoTransform.h>
#include <Inventor/nodes/SoSelection.h>
#include <Inventor/nodes/SoTexture2.h>
#include <Inventor/nodekits/SoNodeKit.h>
#include <Inventor/actions/SoWriteAction.h>
#include <Inventor/actions/SoSearchAction.h>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/importerdesc.h>
#include <assimp/postprocess.h>
Include dependency graph for ConvertMesh.cpp:

Go to the source code of this file.

Typedefs

typedef urdf_traverser::BoxPtr BoxPtr
typedef
urdf_traverser::CollisionPtr 
CollisionPtr
typedef urdf_traverser::CylinderPtr CylinderPtr
typedef urdf_traverser::GeometryPtr GeometryPtr
typedef urdf_traverser::MaterialPtr MaterialPtr
typedef urdf_traverser::MeshPtr MeshPtr
typedef urdf_traverser::SpherePtr SpherePtr
typedef urdf_traverser::VisualPtr VisualPtr

Functions

bool addGeometry (SoSeparator *addToNode, const std::string &linkName, double scale_factor, const GeometryPtr &geom, const int geomNum, const MaterialPtr &mat, const urdf_traverser::EigenTransform &geometryTransform, const urdf_traverser::EigenTransform &addMeshTransform, const bool scaleUrdfTransforms)
SoNode * convertMeshFile (const std::string &filename, double scale_factor, bool setExplicitMaterial=false, double r=0.5, double g=0.5, double b=0.5, double a=1)
bool convertMeshToIVString (urdf_traverser::LinkPtr &link, const float scale_factor, const urdf_traverser::EigenTransform &addVisualTransform, const bool useVisuals, const bool scaleUrdfTransforms, std::string &resultIV, std::set< std::string > &textureFiles)
int convertMeshToIVString (urdf_traverser::RecursionParamsPtr &p)
template bool urdf2inventor::convertMeshes< std::string > (urdf_traverser::UrdfTraverser &traverser, const std::string &fromLink, const urdf2inventor::MeshConvertRecursionParams< std::string >::Ptr &meshParams)

Typedef Documentation

Definition at line 68 of file ConvertMesh.cpp.

Definition at line 62 of file ConvertMesh.cpp.

Definition at line 67 of file ConvertMesh.cpp.

Definition at line 63 of file ConvertMesh.cpp.

Definition at line 64 of file ConvertMesh.cpp.

Definition at line 65 of file ConvertMesh.cpp.

Definition at line 66 of file ConvertMesh.cpp.

Definition at line 61 of file ConvertMesh.cpp.


Function Documentation

bool addGeometry ( SoSeparator *  addToNode,
const std::string &  linkName,
double  scale_factor,
const GeometryPtr geom,
const int  geomNum,
const MaterialPtr mat,
const urdf_traverser::EigenTransform geometryTransform,
const urdf_traverser::EigenTransform addMeshTransform,
const bool  scaleUrdfTransforms 
)

Make all texture paths relative to basePath. This assumes that when the IV file is written to file, all textures will be saved relative to the directory of the IV file.

Returns:
a list of all filenames (*absolute* paths) which were made relative to basePath.

Definition at line 220 of file ConvertMesh.cpp.

SoNode* convertMeshFile ( const std::string &  filename,
double  scale_factor,
bool  setExplicitMaterial = false,
double  r = 0.5,
double  g = 0.5,
double  b = 0.5,
double  a = 1 
)

Converts the mesh in this file to the inventor format.

Definition at line 74 of file ConvertMesh.cpp.

bool convertMeshToIVString ( urdf_traverser::LinkPtr link,
const float  scale_factor,
const urdf_traverser::EigenTransform addVisualTransform,
const bool  useVisuals,
const bool  scaleUrdfTransforms,
std::string &  resultIV,
std::set< std::string > &  textureFiles 
)

Helper function which gets all visuals from link, converts it to IV format and writes it to resultIV (after scaling meshes by scale_factor, and optionally also the transforms if scaleUrdfTransforms is true). It also returns all textureFiles (absolute paths to files) in use by the link.

Definition at line 423 of file ConvertMesh.cpp.

Callback function to be called during recursion incurred in convertMeshes(). Only supports string mesh formats with MeshConvertRecursionParams<std::string>.

Definition at line 459 of file ConvertMesh.cpp.

template bool urdf2inventor::convertMeshes< std::string > ( urdf_traverser::UrdfTraverser traverser,
const std::string &  fromLink,
const urdf2inventor::MeshConvertRecursionParams< std::string >::Ptr &  meshParams 
)


urdf2inventor
Author(s): Jennifer Buehler
autogenerated on Fri Mar 1 2019 03:38:11