![]() |
KudanCV
|
#include <KudanCV.h>
Public Member Functions | |
| KudanVector3 () | |
| KudanVector3 (float x, float y, float z) | |
| void | zero () |
| KudanVector3 | add (KudanVector3 vec) |
| KudanVector3 | operator+ (KudanVector3 vec) |
| KudanVector3 | subtract (KudanVector3 vec) |
| KudanVector3 | operator- (KudanVector3 vec) |
| KudanVector3 | multiply (float scalar) |
| KudanVector3 | operator* (float scalar) |
| float | norm () |
| std::string | toString () |
Public Attributes | |
| float | x |
| float | y |
| float | z |
Simple representation of a 3D point or vector.
| KudanVector3::KudanVector3 | ( | ) |
Default constructor initialises the data to the zero vector (0,0,0)'
| KudanVector3::KudanVector3 | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Constructor for initialising the data to the given vector
| x,y,z | Coefficients of the vector |
| KudanVector3 KudanVector3::add | ( | KudanVector3 | vec | ) |
Add this to another 3x1 vector
| vec | The other vector |
| KudanVector3 KudanVector3::multiply | ( | float | scalar | ) |
Mutliply this vector X by a scalar s = Xs
| scalar | The value with which to multiply the elements of this vector |
| float KudanVector3::norm | ( | ) |
Return the L2 (Euclidean) norm of this vector
| KudanVector3 KudanVector3::operator* | ( | float | scalar | ) |
Overloaded multiplication operator - calls the multiply function
| scalar | The value with which to multiply the elements of this vector |
| KudanVector3 KudanVector3::operator+ | ( | KudanVector3 | vec | ) |
Overloaded addition operator - calls the add function
| vec | The vector to add to this |
| KudanVector3 KudanVector3::operator- | ( | KudanVector3 | vec | ) |
Overloaded subtaction operator - calls the subtract function
| vec | The vector to subtract from this |
| KudanVector3 KudanVector3::subtract | ( | KudanVector3 | vec | ) |
Subtract another vector from this
| vec | The vector to subtract from this |
| std::string KudanVector3::toString | ( | ) |
Returns a representation of this as a string (x,y,z)
| void KudanVector3::zero | ( | ) |
Set the all coefficients to zero
| float KudanVector3::x |
Public x, y, z coefficients of the vector