Kanzi  3.9.7
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

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

Empty constructor.

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

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

Gets the position.

Returns
Position vector.
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.
Vector2 kanzi::Geometry::Vertex::getTexcoord ( ) const
inline

Gets the texcoord.

Returns
Texcoord vector.
static ptrdiff_t kanzi::Geometry::Vertex::getPositionOffset ( )
inlinestatic

Gets the offset for the position.

Returns
Position offset.
static ptrdiff_t kanzi::Geometry::Vertex::getTexcoordOffset ( )
inlinestatic

Gets the offset for the texture coordinate.

Returns
Texture coordinate offset.

Member Data Documentation

Vector3 kanzi::Geometry::Vertex::m_position

Position data.

Vector2 kanzi::Geometry::Vertex::m_texcoord

Texcoord data.


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