Kanzi  3.9.4
Kanzi Engine API
kanzi::Geometry::Vertex Struct Reference

Vertex for geometry. More...

#include <kanzi/core.ui/graphics2d/geometry.hpp>

Public Member Functions

Vector3 getPosition () const
 Gets the position. More...
 
Vector2 getTexcoord () const
 Gets the texcoord. More...
 
void setPosition (float x, float y)
 Sets the position component. More...
 
 Vertex ()=default
 Empty constructor. More...
 
 Vertex (float x, float y, float s, float t)
 Constructor. More...
 

Static Public Member Functions

static ptrdiff_t getPositionOffset ()
 Gets the offset for the position. More...
 
static ptrdiff_t getTexcoordOffset ()
 Gets the offset for the texture coordinate. More...
 

Public Attributes

Vector3 m_position
 Position data. More...
 
Vector2 m_texcoord
 Texcoord data. More...
 

Detailed Description

Vertex for geometry.

Constructor & Destructor Documentation

◆ Vertex() [1/2]

kanzi::Geometry::Vertex::Vertex ( )
explicitdefault

Empty constructor.

◆ Vertex() [2/2]

kanzi::Geometry::Vertex::Vertex ( float  x,
float  y,
float  s,
float  t 
)
inlineexplicit

Constructor.

Parameters
xX coordinate.
yY coordinate.
sS texture coordinate.
tT texture coordinate.

Member Function Documentation

◆ getPosition()

Vector3 kanzi::Geometry::Vertex::getPosition ( ) const
inline

Gets the position.

Returns
Position vector.

◆ setPosition()

void kanzi::Geometry::Vertex::setPosition ( float  x,
float  y 
)
inline

Sets the position component.

Z coordinate is initialized to 0.0f.

Parameters
xX coordinate.
yY coordinate.

◆ getTexcoord()

Vector2 kanzi::Geometry::Vertex::getTexcoord ( ) const
inline

Gets the texcoord.

Returns
Texcoord vector.

◆ getPositionOffset()

static ptrdiff_t kanzi::Geometry::Vertex::getPositionOffset ( )
inlinestatic

Gets the offset for the position.

Returns
Position offset.

◆ getTexcoordOffset()

static ptrdiff_t kanzi::Geometry::Vertex::getTexcoordOffset ( )
inlinestatic

Gets the offset for the texture coordinate.

Returns
Texture coordinate offset.

Member Data Documentation

◆ m_position

Vector3 kanzi::Geometry::Vertex::m_position

Position data.

◆ m_texcoord

Vector2 kanzi::Geometry::Vertex::m_texcoord

Texcoord data.


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