Getting Started with EasyAR
Header:#include "easyar/matrix.hpp"
Inherits:Matrix

Description

Vec represents a cn x 1 vector.

Public Functions

Vec()
explicitVec(const _Tp* values)
Vec(_Tp v0)
Vec(_Tp v0, _Tp v1)
Vec(_Tp v0, _Tp v1, _Tp v2)
Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3)
const _Tp&operator[](int i) const
_Tp&operator[](int i)

Related Type-Defines

typedef Vec<float, 2>Vec2F
typedef Vec<float, 3>Vec3F
typedef Vec<float, 4>Vec4F
typedef Vec<int, 2>Vec2I
typedef Vec<int, 3>Vec3I
typedef Vec<int, 4>Vec4I

Vec()

Creates a Vec object. Its data is zero-initialized.

explicit Vec(const _Tp* values)

Creates a Vec object and copies all data from values into the vector.

Vec(_Tp v0)

Creates a Vec object, with its data equal to { v0 }.

Vec(_Tp v0, _Tp v1)

Creates a Vec object, with its data equal to { v0, v1 }.

Vec(_Tp v0, _Tp v1, _Tp v2)

Creates a Vec object, with its data equal to { v0, v1, v2 }.

Vec(_Tp v0, _Tp v1, _Tp v2, _Tp v3)

Creates a Vec object, with its data equal to { v0, v1, v2, v3 }.

const _Tp& operator[](int i) const

Gets the ith element of the vector.

_Tp& operator[](int i)

Gets the ith element of the vector.

typedef Vec<float, 2> Vec2F

2 x 1 vector of float data.

typedef Vec<float, 3> Vec3F

3 x 1 vector of float data.

typedef Vec<float, 4> Vec4F

4 x 1 vector of float data.

typedef Vec<int, 2> Vec2I

2 x 1 vector of int data.

typedef Vec<int, 3> Vec3I

3 x 1 vector of int data.

typedef Vec<int, 4> Vec4I

4 x 1 vector of int data.