Zivid C++ API 2.19.0+b5c53d0f-1
Zivid::VectorXY Struct Reference

Vector with two coordinates as float. More...

#include <Zivid/Vector.h>

Public Types

using ValueType = float
 The type of the coordinate values.

Public Member Functions

 VectorXY ()=default
 Constructor.
constexpr VectorXY (float xCoord, float yCoord)
 Constructor.
ZIVID_UTILS_EXPORT float angleInDegrees () const
 Get the direction of this vector as an angle in degrees, in the range [0, 360)
ZIVID_UTILS_EXPORT float angleInRadians () const
 Get the direction of this vector as an angle in radians, in the range [0, 2*pi)
ZIVID_UTILS_EXPORT std::string toString () const
 Get string representation.
ZIVID_UTILS_EXPORT bool operator== (const VectorXY &rhs) const
 Check for equality.
ZIVID_UTILS_EXPORT bool operator!= (const VectorXY &rhs) const
 Check for inequality.

Public Attributes

ValueType x
 The x element of the vector.
ValueType y
 The y element of the vector.

Detailed Description

Vector with two coordinates as float.

Member Typedef Documentation

◆ ValueType

The type of the coordinate values.

Constructor & Destructor Documentation

◆ VectorXY() [1/2]

Zivid::VectorXY::VectorXY ( )
default

Constructor.

◆ VectorXY() [2/2]

Zivid::VectorXY::VectorXY ( float xCoord,
float yCoord )
inlineconstexpr

Constructor.

Member Function Documentation

◆ angleInDegrees()

ZIVID_UTILS_EXPORT float Zivid::VectorXY::angleInDegrees ( ) const

Get the direction of this vector as an angle in degrees, in the range [0, 360)

0 degrees points along the positive x-axis, and the angle increases towards the positive y-axis. Throws if the vector has zero length or is non-finite.

◆ angleInRadians()

ZIVID_UTILS_EXPORT float Zivid::VectorXY::angleInRadians ( ) const

Get the direction of this vector as an angle in radians, in the range [0, 2*pi)

0 radians points along the positive x-axis, and the angle increases towards the positive y-axis. Throws if the vector has zero length or is non-finite.

◆ operator!=()

ZIVID_UTILS_EXPORT bool Zivid::VectorXY::operator!= ( const VectorXY & rhs) const

Check for inequality.

◆ operator==()

ZIVID_UTILS_EXPORT bool Zivid::VectorXY::operator== ( const VectorXY & rhs) const

Check for equality.

◆ toString()

ZIVID_UTILS_EXPORT std::string Zivid::VectorXY::toString ( ) const

Get string representation.

Member Data Documentation

◆ x

ValueType Zivid::VectorXY::x

The x element of the vector.

◆ y

ValueType Zivid::VectorXY::y

The y element of the vector.


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