$darkmode
VCG Library
Public Types | Static Public Member Functions | List of all members
vcg::tri::UpdateTexture< ComputeMeshType > Class Template Reference

This class is used to update/generate texcoord position according to various critera. More...

#include <vcg/complex/algorithms/update/texture.h>

Public Types

typedef ComputeMeshType MeshType
 
typedef MeshType::ScalarType ScalarType
 
typedef MeshType::VertexType VertexType
 
typedef MeshType::VertexPointer VertexPointer
 
typedef MeshType::VertexIterator VertexIterator
 
typedef MeshType::FaceType FaceType
 
typedef MeshType::FacePointer FacePointer
 
typedef MeshType::FaceIterator FaceIterator
 
typedef vcg::Point2< ScalarType > UVCoordType
 

Static Public Member Functions

static void WedgeTexFromPlane (ComputeMeshType &m, const Point3< ScalarType > &uVec, const Point3< ScalarType > &vVec, bool aspectRatio, ScalarType sideGutter=0.0)
 
static void WedgeTexFromVertexTex (ComputeMeshType &m)
 
static void WedgeTexRemoveNull (ComputeMeshType &m, const std::string &texturename)
 
static int WedgeTexMergeClose (ComputeMeshType &m, ScalarType mergeThr=ScalarType(1.0/65536.0))
 Merge supposedly wrong texcoords It can happens that for rounding errors texcoords on different wedges but on the same vertex have different tex coords. This function merges them according a threshold. It requires initialized VF adjacency. the default for merging is if two textures dist less than one 16th of texel on a 4k texture...
 

Detailed Description

template<class ComputeMeshType>
class vcg::tri::UpdateTexture< ComputeMeshType >

This class is used to update/generate texcoord position according to various critera.

Member Function Documentation

◆ WedgeTexRemoveNull()

template<class ComputeMeshType >
static void vcg::tri::UpdateTexture< ComputeMeshType >::WedgeTexRemoveNull ( ComputeMeshType &  m,
const std::string &  texturename 
)
inlinestatic

Currently texture coords are kept for ALL the triangles of a mesh. The texture id is stored with each face. if a given face should not have tex coord it has the default -1 value for texture ID. This function will add an new fake texture, add that to the list of textures and change all the -1 id to that value.


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