36 #ifndef LVR2_TEXTURE_CLUSTER_TEXCOORD_MAPPING_H_ 37 #define LVR2_TEXTURE_CLUSTER_TEXCOORD_MAPPING_H_ 80 array<boost::optional<pair<ClusterHandle, TexCoords>>, 100>
m_mapping;
98 if (m_len == m_mapping.size())
100 cout <<
"Error: Overflow in ClusterTexCoordMapping" << endl;
104 m_mapping[m_len] = std::make_pair(handle, tex);
118 for (
size_t i = 0; i < m_len; i++)
120 if (m_mapping[i]->
first == clusterH)
122 return m_mapping[i]->second;
Mapping of clusters to texture coordinates for a single vertex.
size_t m_len
The number of stored pairs.
TexCoords(float u=0, float v=0)
Constructor.
array< boost::optional< pair< ClusterHandle, TexCoords > >, 100 > m_mapping
The mapping of cluster handles to texture coordinates.
ClusterTexCoordMapping()
Constructor.
Handle to access Cluster of the ClusterBiMap.
TexCoords getTexCoords(ClusterHandle clusterH) const
Returns the texture coordinates to a given cluster handle.
void push(ClusterHandle handle, TexCoords tex)
Adds an entry to the mapping.