Visual Computing Library
|
The TexCoord class represents a component that stores a texture coordinate. More...
#include <vclib/mesh/components/tex_coord.h>
Public Types | |
using | TexCoordType = vcl::TexCoordIndexed< Scalar > |
Expose the type of the TexCoord. | |
Public Member Functions | |
TexCoord ()=default | |
Initilizes the Texture Coordinate to (0, 0). | |
const TexCoordType & | texCoord () const |
Returns a const reference of the tex coord of the element. | |
TexCoordType & | texCoord () |
Returns a reference of the tex coord of the element. | |
Protected Member Functions | |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
void | deserialize (std::istream &is) |
Private Types | |
using | Base = Component< TexCoord< Scalar, ParentElemType, OPT >, CompId::TEX_COORD, vcl::TexCoordIndexed< Scalar >, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT > |
The TexCoord class represents a component that stores a texture coordinate.
It exposes a vcl::TexCoordIndexed object, that stores a texture coordinate and an id of the texture to use.
For example, if you have a Vertex Element v
with the TexCoord component, you'll be able to access to this component member functions from v
:
Scalar | The scalar type of the texture coordinate values. |
ParentElemType | This template argument must be void if the component needs to be stored horizontally, or the type of the parent element that will contain this component if the component needs to be stored vertically. |
OPT | If true, the component will be optional. This argument is considered only if the component is stored vertically. |
|
inline |
Returns a reference of the tex coord of the element.
|
inline |
Returns a const reference of the tex coord of the element.