|
libcamera v0.3.0
Supporting cameras in Linux since 2019
|
Public Member Functions | |
| constexpr | Vector ()=default |
| Construct a zero vector. | |
| constexpr | Vector (const std::array< T, Rows > &data) |
| Construct vector from supplied data. | |
| int | readYaml (const libcamera::YamlObject &yaml) |
| Populate the vector with yaml data. | |
| const T & | operator[] (size_t i) const |
| Index to an element in the vector. | |
| T & | operator[] (size_t i) |
| Index to an element in the vector. | |
| constexpr T | x () const |
| Convenience function to access the first element of the vector. | |
| constexpr T | y () const |
| Convenience function to access the second element of the vector. | |
| constexpr T | z () const |
| Convenience function to access the third element of the vector. | |
| constexpr Vector< T, Rows > | operator- () const |
| Negate a Vector by negating both all of its coordinates. | |
| constexpr Vector< T, Rows > | operator- (const Vector< T, Rows > &other) const |
| Subtract one vector from another. | |
| constexpr Vector< T, Rows > | operator+ (const Vector< T, Rows > &other) const |
| Add two vectors together. | |
| constexpr T | operator* (const Vector< T, Rows > &other) const |
| Compute the dot product. | |
| constexpr Vector< T, Rows > | operator* (T factor) const |
| Multiply the vector by a scalar. | |
| constexpr Vector< T, Rows > | operator/ (T factor) const |
| Divide the vector by a scalar. | |
| constexpr double | length2 () const |
| Get the squared length of the vector. | |
| constexpr double | length () const |
| Get the length of the vector. | |
Vector class.
| T | Type of numerical values to be stored in the vector |
| Rows | Number of dimension of the vector (= number of elements) |
|
inlineconstexpr |
Construct vector from supplied data.
| data | Data from which to construct a vector |
The size of data must be equal to the dimension size Rows of the vector.
|
inlineconstexpr |
Get the length of the vector.
|
inlineconstexpr |
Get the squared length of the vector.
|
inlineconstexpr |
Compute the dot product.
| [in] | other | The other vector |
|
inlineconstexpr |
Multiply the vector by a scalar.
| [in] | factor | The factor |
|
inlineconstexpr |
Add two vectors together.
| [in] | other | The other vector |
|
inlineconstexpr |
Negate a Vector by negating both all of its coordinates.
|
inlineconstexpr |
Subtract one vector from another.
| [in] | other | The other vector |
|
inlineconstexpr |
Divide the vector by a scalar.
| [in] | factor | The factor |
|
inline |
Index to an element in the vector.
| i | Index of element to retrieve |
|
inline |
Index to an element in the vector.
| i | Index of element to retrieve |
|
inline |
Populate the vector with yaml data.
| yaml | Yaml data to populate the vector with |
Any existing data in the vector will be overwritten. The size of the data read from yaml must be equal to the dimension size Rows of the vector.
The yaml data is expected to be a list with elements of type T.
|
inlineconstexpr |
Convenience function to access the first element of the vector.
|
inlineconstexpr |
Convenience function to access the second element of the vector.
|
inlineconstexpr |
Convenience function to access the third element of the vector.