Face Engine SDK  5.23.1
A face detection, recognition and tracking engine.
fsdk::Vector2< T > Struct Template Reference

Generic 2D vector. More...

#include <Vector2.h>

List of all members.

Public Member Functions

 Vector2 () noexcept
 Initializes a vector with zeroes.
 Vector2 (T x_) noexcept
 Initializes all elements with the same value.
 Vector2 (T x_, T y_) noexcept
 Initializes elements with given value.
template<typename Other >
 Vector2 (const Vector2< Other > &other) noexcept
 Copies another vector.
template<typename Other >
Vector2< T > & operator= (const Vector2< Other > &other) noexcept
 Copies another vector.
bool operator== (const Vector2 &other) const noexcept
 Checks if two vectors are equal.
bool operator!= (const Vector2 &other) const noexcept
 Checks if two vectors are not equal.
bool operator> (const Vector2 &other) const noexcept
 Checks if both coordinates are greater then respective coordinates of another vector.
bool operator>= (const Vector2 &other) const noexcept
 Checks if both coordinates are greater or equal to respective coordinates of another vector.
bool operator< (const Vector2 &other) const noexcept
 Checks if both coordinates are smaller then respective coordinates of another vector.
bool operator<= (const Vector2 &other) const noexcept
 Checks if both coordinates are smaller or equal to respective coordinates of another vector.
T & operator[] (int n) noexcept
 Indexes the vector.
const T & operator[] (int n) const noexcept
 Indexes the vector.
Vector2 operator- (void) const noexcept
 Negates all elements.
Vector2 operator+ (const Vector2 &rhs) const noexcept
 Adds (per-element) two vectors.
Vector2 operator- (const Vector2 &rhs) const noexcept
 Subtracts (per-element) two vectors.
Vector2 operator* (const Vector2 &rhs) const noexcept
 Multiplies (per-element) two vectors.
Vector2 operator/ (const Vector2 &rhs) const noexcept
 Divides (per-element) two vectors.
Vector2operator+= (const Vector2 &rhs) noexcept
 Adds (per-element) two vectors.
Vector2operator-= (const Vector2 &rhs) noexcept
 Subtracts (per-element) two vectors.
Vector2operator*= (const Vector2 &rhs) noexcept
 Multiplies (per-element) two vectors.
Vector2operator/= (const Vector2 &rhs) noexcept
 Divides (per-element) two vectors.
Vector2 operator+ (T rhs) const noexcept
 Adds (per-element) a constant to each element of the vector.
Vector2 operator- (T rhs) const noexcept
 Subtracts (per-element) a constant to each element of the vector.
Vector2 operator* (T rhs) const noexcept
 Multiplies (per-element) a constant to each element of the vector.
Vector2 operator/ (T rhs) const noexcept
 Divides (per-element) a constant to each element of the vector.
Vector2operator+= (T rhs) noexcept
 Adds (per-element) a constant to each element of the vector.
Vector2operator-= (T rhs) noexcept
 Subtracts (per-element) a constant to each element of the vector.
Vector2operator*= (T rhs) noexcept
 Multiplies (per-element) a constant to each element of the vector.
Vector2operator/= (T rhs) noexcept
 Divides (per-element) a constant to each element of the vector.

Public Attributes

x
 x coordinate.
y
 y coordinate.

Detailed Description

template<typename T>
struct fsdk::Vector2< T >

Generic 2D vector.

Template Parameters:
Tany POD numeric type.

Constructor & Destructor Documentation

template<typename T>
fsdk::Vector2< T >::Vector2 ( x_) [inline, explicit]

Initializes all elements with the same value.

Parameters:
[in]x_value to initialize with.
template<typename T>
fsdk::Vector2< T >::Vector2 ( x_,
y_ 
) [inline]

Initializes elements with given value.

Parameters:
[in]x_x coordinate value.
[in]y_y coordinate value.
template<typename T>
template<typename Other >
fsdk::Vector2< T >::Vector2 ( const Vector2< Other > &  other) [inline]

Copies another vector.

Parameters:
[in]otheranother vector.

Member Function Documentation

template<typename T>
bool fsdk::Vector2< T >::operator!= ( const Vector2< T > &  other) const [inline]

Checks if two vectors are not equal.

Parameters:
[in]othervector to check against.
Returns:
true if two vectors are not equal.
template<typename T>
Vector2 fsdk::Vector2< T >::operator* ( const Vector2< T > &  rhs) const [inline]

Multiplies (per-element) two vectors.

Parameters:
[in]rhsvector to multiply by.
Returns:
resulting vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator* ( rhs) const [inline]

Multiplies (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to multiply by.
Returns:
resulting vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator*= ( const Vector2< T > &  rhs) [inline]

Multiplies (per-element) two vectors.

Parameters:
[in]rhsvector to multiply by.
Returns:
modified vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator*= ( rhs) [inline]

Multiplies (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to multiply by.
Returns:
modified vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator+ ( const Vector2< T > &  rhs) const [inline]

Adds (per-element) two vectors.

Parameters:
[in]rhsvector to add.
Returns:
resulting vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator+ ( rhs) const [inline]

Adds (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to add.
Returns:
resulting vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator+= ( const Vector2< T > &  rhs) [inline]

Adds (per-element) two vectors.

Parameters:
[in]rhsvector to add.
Returns:
modified vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator+= ( rhs) [inline]

Adds (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to add.
Returns:
modified vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator- ( void  ) const [inline]

Negates all elements.

Returns:
resulting vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator- ( const Vector2< T > &  rhs) const [inline]

Subtracts (per-element) two vectors.

Parameters:
[in]rhsvector to subtract.
Returns:
resulting vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator- ( rhs) const [inline]

Subtracts (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to subtract.
Returns:
resulting vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator-= ( const Vector2< T > &  rhs) [inline]

Subtracts (per-element) two vectors.

Parameters:
[in]rhsvector to subtract.
Returns:
modified vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator-= ( rhs) [inline]

Subtracts (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to subtract.
Returns:
modified vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator/ ( const Vector2< T > &  rhs) const [inline]

Divides (per-element) two vectors.

Parameters:
[in]rhsvector to divide by.
Returns:
resulting vector.
template<typename T>
Vector2 fsdk::Vector2< T >::operator/ ( rhs) const [inline]

Divides (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to divide by.
Returns:
resulting vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator/= ( const Vector2< T > &  rhs) [inline]

Divides (per-element) two vectors.

Parameters:
[in]rhsvector to divide by.
Returns:
modified vector.
template<typename T>
Vector2& fsdk::Vector2< T >::operator/= ( rhs) [inline]

Divides (per-element) a constant to each element of the vector.

Parameters:
[in]rhsvalue to divide by.
Returns:
modified vector.
template<typename T>
bool fsdk::Vector2< T >::operator< ( const Vector2< T > &  other) const [inline]

Checks if both coordinates are smaller then respective coordinates of another vector.

Parameters:
[in]othervector to check against.
Returns:
true if smaller.
template<typename T>
bool fsdk::Vector2< T >::operator<= ( const Vector2< T > &  other) const [inline]

Checks if both coordinates are smaller or equal to respective coordinates of another vector.

Parameters:
[in]othervector to check against.
Returns:
true if smaller or equal.
template<typename T>
template<typename Other >
Vector2<T>& fsdk::Vector2< T >::operator= ( const Vector2< Other > &  other) [inline]

Copies another vector.

Parameters:
[in]otheranother vector.
Returns:
reference for call chaining.
template<typename T>
bool fsdk::Vector2< T >::operator== ( const Vector2< T > &  other) const [inline]

Checks if two vectors are equal.

Parameters:
[in]othervector to check against.
Returns:
true if two vectors are equal.
template<typename T>
bool fsdk::Vector2< T >::operator> ( const Vector2< T > &  other) const [inline]

Checks if both coordinates are greater then respective coordinates of another vector.

Parameters:
[in]othervector to check against.
Returns:
true if greater.
template<typename T>
bool fsdk::Vector2< T >::operator>= ( const Vector2< T > &  other) const [inline]

Checks if both coordinates are greater or equal to respective coordinates of another vector.

Parameters:
[in]othervector to check against.
Returns:
true if greater or equal.
template<typename T>
T& fsdk::Vector2< T >::operator[] ( int  n) [inline]

Indexes the vector.

Parameters:
[in]nelement index.
Returns:
element reference.
template<typename T>
const T& fsdk::Vector2< T >::operator[] ( int  n) const [inline]

Indexes the vector.

Parameters:
[in]nelement index.
Returns:
element const reference.

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines