|
Visual Computing Library
devel
|
The TexCoord class represents a 2-dimensional texture coordinate containing two scalar values. More...
#include <vclib/space/core/tex_coord.h>

Public Types | |
| using | ScalarType = Scalar |
Public Member Functions | |
| template<typename S > | |
| auto | cast () const |
| void | deserialize (std::istream &is) |
| Scalar & | operator() (uint i) |
| const Scalar & | operator() (uint i) const |
| auto | operator<=> (const TexCoord &t1) const =default |
| Scalar & | operator[] (uint i) |
| const Scalar & | operator[] (uint i) const |
| void | serialize (std::ostream &os) const |
| void | set (Scalar u, Scalar v) |
| void | setU (Scalar s) |
| void | setV (Scalar s) |
| TexCoord (const Point2< Scalar > &p) | |
| TexCoord (const Scalar &s1, const Scalar &s2) | |
| Scalar & | u () |
| Scalar | u () const |
| Scalar & | v () |
| Scalar | v () const |
Private Attributes | |
| Point2< Scalar > | mCoord |
The TexCoord class represents a 2-dimensional texture coordinate containing two scalar values.
The TexCoord class template represents a 2-dimensional texture coordinate containing two scalar values. The scalar type of the texture coordinates is a template parameter of the class.
The class is a specialization of the Point2 class template, where the two components of the texture coordinate are named u and v. The class adds setter member functions for setting the u and v components of the texture coordinate, with an additional assert that the values are in the range [0, 1].
| Scalar | The scalar type of the texture coordinate components. |