Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
tesseract_geometry Namespace Reference

Classes

class  Box
 
class  Capsule
 
class  Cone
 
class  ConvexMesh
 
class  Cylinder
 
class  Geometry
 
class  Mesh
 
class  MeshMaterial
 Represents material information extracted from a mesh file. More...
 
class  MeshTexture
 Represents a texture and UV coordinates extracted from a mesh file. More...
 
class  Octree
 
class  Plane
 
class  PolygonMesh
 
class  SDFMesh
 
class  Sphere
 

Typedefs

using Geometrys = std::vector< Geometry::Ptr >
 
using GeometrysConst = std::vector< Geometry::ConstPtr >
 

Enumerations

enum  GeometryType {
  UNINITIALIZED , SPHERE , CYLINDER , CAPSULE ,
  CONE , BOX , PLANE , MESH ,
  CONVEX_MESH , SDF_MESH , OCTREE , POLYGON_MESH
}
 

Functions

template<class T >
std::vector< std::shared_ptr< T > > extractMeshData (const aiScene *scene, const aiNode *node, const aiMatrix4x4 &parent_transform, const Eigen::Vector3d &scale, tesseract_common::Resource::Ptr resource, bool normals, bool vertex_colors, bool material_and_texture)
 
template<class T >
std::vector< std::shared_ptr< T > > createMeshFromAsset (const aiScene *scene, const Eigen::Vector3d &scale, tesseract_common::Resource::Ptr resource, bool normals, bool vertex_colors, bool material_and_texture)
 Create list of meshes from the assimp scene. More...
 
template<class T >
std::vector< std::shared_ptr< T > > createMeshFromPath (const std::string &path, Eigen::Vector3d scale=Eigen::Vector3d(1, 1, 1), bool triangulate=false, bool flatten=false, bool normals=false, bool vertex_colors=false, bool material_and_texture=false)
 Create a mesh using assimp from file path. More...
 
template<class T >
std::vector< std::shared_ptr< T > > createMeshFromResource (tesseract_common::Resource::Ptr resource, Eigen::Vector3d scale=Eigen::Vector3d(1, 1, 1), bool triangulate=false, bool flatten=false, bool normals=false, bool vertex_colors=false, bool material_and_texture=false)
 Create a mesh using assimp from resource. More...
 
template<typename T >
static std::vector< std::shared_ptr< T > > createMeshFromBytes (const std::string &url, const uint8_t *bytes, size_t bytes_len, Eigen::Vector3d scale=Eigen::Vector3d(1, 1, 1), bool triangulate=false, bool flatten=false, bool normals=false, bool vertex_colors=false, bool material_and_texture=false)
 Create a mesh from byte array. More...
 
bool isIdentical (const Geometry &geom1, const Geometry &geom2)
 Check if two Geometries are identical. More...
 

Variables

static const std::vector< std::string > GeometryTypeStrings
 

Typedef Documentation

◆ Geometrys

using tesseract_geometry::Geometrys = typedef std::vector<Geometry::Ptr>

◆ GeometrysConst

Enumeration Type Documentation

◆ GeometryType

Enumerator
UNINITIALIZED 
SPHERE 
CYLINDER 
CAPSULE 
CONE 
BOX 
PLANE 
MESH 
CONVEX_MESH 
SDF_MESH 
OCTREE 
POLYGON_MESH 

Function Documentation

◆ createMeshFromAsset()

template<class T >
std::vector< std::shared_ptr< T > > tesseract_geometry::createMeshFromAsset ( const aiScene *  scene,
const Eigen::Vector3d &  scale,
tesseract_common::Resource::Ptr  resource,
bool  normals,
bool  vertex_colors,
bool  material_and_texture 
)

Create list of meshes from the assimp scene.

Parameters
sceneThe assimp scene
scalePerform an axis scaling
resourceThe mesh resource that generated the scene
normalsIf true, loads mesh normals
vertex_colorsIf true, loads mesh vertex colors
material_and_textureIf true, loads mesh materials and textures
Returns
A list of tesseract meshes

◆ createMeshFromBytes()

template<typename T >
static std::vector< std::shared_ptr< T > > tesseract_geometry::createMeshFromBytes ( const std::string &  url,
const uint8_t *  bytes,
size_t  bytes_len,
Eigen::Vector3d  scale = Eigen::Vector3d(1, 1, 1),
bool  triangulate = false,
bool  flatten = false,
bool  normals = false,
bool  vertex_colors = false,
bool  material_and_texture = false 
)
static

Create a mesh from byte array.

Parameters
urlThe URL of source resource
bytesByte array
bytes_lenThe length of bytes
scalePerform an axis scaling
triangulateIf true the mesh will be triangulated. This should be done for visual meshes. In the case of collision meshes do not triangulate convex hull meshes.
flattenIf true all meshes will be condensed into a single mesh. This should only be used for visual meshes, do not flatten collision meshes.
normalsIf true, loads mesh normals
vertex_colorsIf true, loads mesh vertex colors
material_and_textureIf true, loads mesh materials and textures
Returns

◆ createMeshFromPath()

template<class T >
std::vector< std::shared_ptr< T > > tesseract_geometry::createMeshFromPath ( const std::string &  path,
Eigen::Vector3d  scale = Eigen::Vector3d(1, 1, 1),
bool  triangulate = false,
bool  flatten = false,
bool  normals = false,
bool  vertex_colors = false,
bool  material_and_texture = false 
)

Create a mesh using assimp from file path.

Parameters
pathThe file path to the mesh
scalePerform an axis scaling
triangulateIf true the mesh will be triangulated. This should be done for visual meshes. In the case of collision meshes do not triangulate convex hull meshes.
flattenIf true all meshes will be condensed into a single mesh. This should only be used for visual meshes, do not flatten collision meshes.
normalsIf true, loads mesh normals
vertex_colorsIf true, loads mesh vertex colors
material_and_textureIf true, loads mesh materials and textures
Returns

◆ createMeshFromResource()

template<class T >
std::vector< std::shared_ptr< T > > tesseract_geometry::createMeshFromResource ( tesseract_common::Resource::Ptr  resource,
Eigen::Vector3d  scale = Eigen::Vector3d(1, 1, 1),
bool  triangulate = false,
bool  flatten = false,
bool  normals = false,
bool  vertex_colors = false,
bool  material_and_texture = false 
)

Create a mesh using assimp from resource.

Parameters
resourceThe located resource
scalePerform an axis scaling
triangulateIf true the mesh will be triangulated. This should be done for visual meshes. In the case of collision meshes do not triangulate convex hull meshes.
flattenIf true all meshes will be condensed into a single mesh. This should only be used for visual meshes, do not flatten collision meshes.
normalsIf true, loads mesh normals
vertex_colorsIf true, loads mesh vertex colors
material_and_textureIf true, loads mesh materials and textures
Returns

◆ extractMeshData()

template<class T >
std::vector< std::shared_ptr< T > > tesseract_geometry::extractMeshData ( const aiScene *  scene,
const aiNode *  node,
const aiMatrix4x4 &  parent_transform,
const Eigen::Vector3d &  scale,
tesseract_common::Resource::Ptr  resource,
bool  normals,
bool  vertex_colors,
bool  material_and_texture 
)

The template type must have a constructor as follows Constructor(std::shared_ptr<tesseract_geometry::VectorVector3d> vertices, std::shared_ptr<std::vector<int>> faces, int face_count)

◆ isIdentical()

bool tesseract_geometry::isIdentical ( const Geometry geom1,
const Geometry geom2 
)

Check if two Geometries are identical.

Parameters
geom1First Geometry
geom2Second Geometry
Returns
True if identical, otherwise false

Variable Documentation

◆ GeometryTypeStrings

const std::vector<std::string> tesseract_geometry::GeometryTypeStrings
static
Initial value:
= { "UNINITIALIZED", "SPHERE", "CYLINDER", "CAPSULE",
"CONE", "BOX", "PLANE", "MESH",
"CONVEX_MESH", "SDF_MESH", "OCTREE", "POLYGON_MESH" }