Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
tesseract_geometry::MeshTexture Class Reference

Represents a texture and UV coordinates extracted from a mesh file. More...

#include <mesh_material.h>

Collaboration diagram for tesseract_geometry::MeshTexture:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< MeshTexture >
 
using ConstPtr = std::shared_ptr< const MeshTexture >
 

Public Member Functions

 MeshTexture (tesseract_common::Resource::Ptr texture_image, std::shared_ptr< const tesseract_common::VectorVector2d > uvs)
 Construct a new MeshTexture. More...
 
tesseract_common::Resource::Ptr getTextureImage () const
 Get the texture image. More...
 
const std::shared_ptr< const tesseract_common::VectorVector2d > & getUVs ()
 Get the texture UV coordinates. More...
 

Private Attributes

std::shared_ptr< const tesseract_common::VectorVector2duvs_
 
tesseract_common::Resource::Ptr texture_image_
 

Detailed Description

Represents a texture and UV coordinates extracted from a mesh file.

Mesh files contain (or reference) image files that form textures on the surface of the mesh. UV coordinates specify how the image is applied to the mesh. The MeshTexture structure contains a resource to the image, and the UV coordinates. Currently only jpg and png image formats are supported.

UV coordinates specify the location of each vertex in the mesh on the texture. Each (u,v) coordinate is normalized to be between 0 and 1.

Member Typedef Documentation

◆ ConstPtr

◆ Ptr

Constructor & Destructor Documentation

◆ MeshTexture()

tesseract_geometry::MeshTexture::MeshTexture ( tesseract_common::Resource::Ptr  texture_image,
std::shared_ptr< const tesseract_common::VectorVector2d uvs 
)
inline

Construct a new MeshTexture.

Parameters
texture_imageResource representing the texture image (jpg or png)
uvsUV coordinates for texture on mesh

Member Function Documentation

◆ getTextureImage()

tesseract_common::Resource::Ptr tesseract_geometry::MeshTexture::getTextureImage ( ) const
inline

Get the texture image.

Must be jpg or png

Returns
Resource to the texture image

◆ getUVs()

const std::shared_ptr< const tesseract_common::VectorVector2d > & tesseract_geometry::MeshTexture::getUVs ( )
inline

Get the texture UV coordinates.

Returns
UV coordinate vector

Member Data Documentation

◆ texture_image_

tesseract_common::Resource::Ptr tesseract_geometry::MeshTexture::texture_image_
private

◆ uvs_

std::shared_ptr<const tesseract_common::VectorVector2d> tesseract_geometry::MeshTexture::uvs_
private

The documentation for this class was generated from the following file: