Tesseract
Motion Planning Environment
|
Represents a texture and UV coordinates extracted from a mesh file. More...
#include <mesh_material.h>
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::VectorVector2d > | uvs_ |
tesseract_common::Resource::Ptr | texture_image_ |
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.
using tesseract_geometry::MeshTexture::ConstPtr = std::shared_ptr<const MeshTexture> |
using tesseract_geometry::MeshTexture::Ptr = std::shared_ptr<MeshTexture> |
|
inline |
Construct a new MeshTexture.
texture_image | Resource representing the texture image (jpg or png) |
uvs | UV coordinates for texture on mesh |
|
inline |
Get the texture image.
Must be jpg or png
|
inline |
Get the texture UV coordinates.
|
private |
|
private |