Represents a texture and UV coordinates extracted from a mesh file. More...
#include <mesh_material.h>
Public Types | |
using | ConstPtr = std::shared_ptr< const MeshTexture > |
using | Ptr = std::shared_ptr< MeshTexture > |
Public Member Functions | |
std::shared_ptr< tesseract_common::Resource > | getTextureImage () const |
Get the texture image. More... | |
const std::shared_ptr< const tesseract_common::VectorVector2d > & | getUVs () |
Get the texture UV coordinates. More... | |
MeshTexture (std::shared_ptr< tesseract_common::Resource > texture_image, std::shared_ptr< const tesseract_common::VectorVector2d > uvs) | |
Construct a new MeshTexture. More... | |
Private Attributes | |
std::shared_ptr< tesseract_common::Resource > | texture_image_ |
std::shared_ptr< const tesseract_common::VectorVector2d > | uvs_ |
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.
Definition at line 137 of file mesh_material.h.
using tesseract_geometry::MeshTexture::ConstPtr = std::shared_ptr<const MeshTexture> |
Definition at line 141 of file mesh_material.h.
using tesseract_geometry::MeshTexture::Ptr = std::shared_ptr<MeshTexture> |
Definition at line 140 of file mesh_material.h.
tesseract_geometry::MeshTexture::MeshTexture | ( | std::shared_ptr< tesseract_common::Resource > | texture_image, |
std::shared_ptr< const tesseract_common::VectorVector2d > | uvs | ||
) |
Construct a new MeshTexture.
texture_image | Resource representing the texture image (jpg or png) |
uvs | UV coordinates for texture on mesh |
Definition at line 51 of file mesh_material.cpp.
std::shared_ptr< tesseract_common::Resource > tesseract_geometry::MeshTexture::getTextureImage | ( | ) | const |
Get the texture image.
Must be jpg or png
Definition at line 57 of file mesh_material.cpp.
const std::shared_ptr< const tesseract_common::VectorVector2d > & tesseract_geometry::MeshTexture::getUVs | ( | ) |
Get the texture UV coordinates.
Definition at line 59 of file mesh_material.cpp.
|
private |
Definition at line 172 of file mesh_material.h.
|
private |
Definition at line 169 of file mesh_material.h.