Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::components::Texcoord2D Struct Reference

Component: A 2D texture UV coordinate. More...

#include <rerun/components/texcoord2d.hpp>

Public Member Functions

 Texcoord2D (float u, float v)
 Construct Texcoord2D from u/v values.
 
float u () const
 
float v () const
 
 Texcoord2D (rerun::datatypes::Vec2D uv_)
 
Texcoord2Doperator= (rerun::datatypes::Vec2D uv_)
 
 Texcoord2D (std::array< float, 2 > xy_)
 
Texcoord2Doperator= (std::array< float, 2 > xy_)
 
 operator rerun::datatypes::Vec2D () const
 Cast to the underlying Vec2D datatype.
 

Public Attributes

rerun::datatypes::Vec2D uv
 

Detailed Description

Component: A 2D texture UV coordinate.

Texture coordinates specify a position on a 2D texture. A range from 0-1 covers the entire texture in the respective dimension. Unless configured otherwise, the texture repeats outside of this range. Rerun uses top-left as the origin for UV coordinates.

0 U 1 0 + ------— → | . V | . | . 1 ↓ . . . . . .

This is the same convention as in Vulkan/Metal/DX12/WebGPU, but (!) unlike OpenGL, which places the origin at the bottom-left.


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