23#ifndef VCL_MESH_COMPONENTS_TEX_COORD_H
24#define VCL_MESH_COMPONENTS_TEX_COORD_H
26#include "bases/component.h"
28#include <vclib/concepts/mesh/components/tex_coord.h>
29#include <vclib/space/core/tex_coord_indexed.h>
57template<
typename Scalar,
typename ParentElemType =
void,
bool OPT = false>
60 TexCoord<Scalar, ParentElemType, OPT>,
62 vcl::TexCoordIndexed<Scalar>,
64 !std::is_same_v<ParentElemType, void>,
67 using Base = Component<
72 !std::is_same_v<ParentElemType, void>,
104 template<
typename Element>
105 void importFrom(
const Element& e,
bool =
true)
108 if (isTexCoordAvailableOn(e)) {
114 void serialize(std::ostream& os)
const {
texCoord().serialize(os); }
116 void deserialize(std::istream& is) {
texCoord().deserialize(is); }
134bool isTexCoordAvailableOn(
const ElementConcept
auto& element)
136 return isComponentAvailableOn<CompId::TEX_COORD>(element);
153template<
typename ElementType =
void,
bool OPT = false>
168template<
typename ElementType =
void,
bool OPT = false>
The Element class.
Definition element.h:57
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
The TexCoord class represents a component that stores a texture coordinate.
Definition tex_coord.h:66
TexCoordType & texCoord()
Returns a reference of the tex coord of the element.
Definition tex_coord.h:100
const TexCoordType & texCoord() const
Returns a const reference of the tex coord of the element.
Definition tex_coord.h:94
TexCoord()=default
Initilizes the Texture Coordinate to (0, 0).
HasTexCoord concept is satisfied only if a Element class provides the types and member functions spec...
Definition tex_coord.h:47