#include <Vector3.hpp>
Inherits Vector< T >.
Public Member Functions | |
Vector3 (void) | |
Default constructor Create a 3 Vector. | |
Vector3 (const Vector3< T > &v) | |
Copy constructor Create a Vector by copying the input Vector. | |
Vector3 (const Vector3< T > *v) | |
Copy constructor Create a Vector by copying the input Vector. | |
Vector3 (const Vector2< T > &v, const T &d1) | |
Vector3 constructor. | |
Vector3 (const T &d1, const Vector2< T > &v) | |
Vector3 constructor. | |
Vector3 (const T &d1, const T &d2, const T &d3) | |
Create a 3 Vector Create a 3 Vector and use the value d1, d2, d3 to set the data of the Vector. | |
Vector3 (const T &d) | |
Create a 3 Vector Create a 3 Vector and use the value d to set the data of the Vector. | |
Vector3 (const T *a) | |
create a 3 Vector create a 3 Vector and set data by using the values array d | |
Vector3 (const Vector< T > &v) | |
Create a 3 Vector from a generic vector of size 3. | |
~Vector3 (void) | |
Destructor. | |
T & | x (void) |
Return x coordinate reference. | |
const T & | x (void) const |
Return x coordinate reference. | |
T & | y (void) |
Return y coordinate reference. | |
const T & | y (void) const |
Return y coordinate reference. | |
T & | z (void) |
Return z coordinate reference. | |
const T & | z (void) const |
Return z coordinate reference. | |
Vector3< T > & | normalize (void) |
Normalize the vector Divide each elements of this vector its norm. | |
Vector3< T > | getNormalized (void) const |
Normalize a copy of the vector. | |
T | operator* (const Vector3< T > &v) const |
Multiplies the Vector with a vector3 (dot product). | |
T | dot (const Vector3< T > &v) const |
Multiplies the Vector with a vector3 (dot product). | |
Vector3< T > & | operator= (const Vector3< T > &v) |
copy the value of the argument vector2 to this vector | |
Vector3< T > | operator+ (const Vector3< T > &v) const |
adds two vectors | |
Vector3< T > | operator- (const Vector3< T > &v) const |
subtracts two vectors | |
Vector3< T > | operator/ (const T &d) const |
Divides the Vector3 by a value. | |
Vector3< T > | operator* (const T &d) const |
Multiplies the Vector3 with a value. | |
Vector3< T > | operator- (void) const |
Compute opposite of the Vector. | |
Vector3< T > & | operator+= (const Vector3< T > &v) |
Adds the Vector3 with a Vector. | |
Vector3< T > & | operator-= (const Vector3< T > &v) |
Subtracts the Vector3 with a Vector. | |
Vector3< T > & | operator/= (const T &d) |
Divides the Vector3 with a value All values of the Vector3 are divided by d. | |
Vector3< T > & | operator*= (const T &d) |
Multiplies the Vector3 with a value. | |
Vector3< T > | operator^ (const Vector3< T > &v) const |
Cross product between 2 Vector3. | |
Vector3< T > | cross (const Vector3< T > &v) const |
Cross product between 2 Vector3. | |
size_t | size (void) const |
Returns the number of rows of the Vector. | |
void | fill (const T &d) |
Sets the value d on every entry of the vector. | |
void | setZero (void) |
Reset the vector entries to zero. |
Definition at line 37 of file Vector3.hpp.
kn::Vector3< T >::Vector3 | ( | void | ) | [inline] |
kn::Vector3< T >::Vector3 | ( | const Vector3< T > & | v | ) | [inline] |
Copy constructor Create a Vector by copying the input Vector.
v | the Vector to copy |
Definition at line 52 of file Vector3.hpp.
kn::Vector3< T >::Vector3 | ( | const Vector3< T > * | v | ) | [inline] |
Copy constructor Create a Vector by copying the input Vector.
v | the pointer to the Vector to copy |
MathException | pointer is null |
Definition at line 339 of file Vector3.hpp.
kn::Vector3< T >::Vector3 | ( | const Vector2< T > & | v, | |
const T & | d1 | |||
) | [inline] |
Vector3 constructor.
v | a vector2 | |
d1 | the third value of the vector3 |
Definition at line 73 of file Vector3.hpp.
kn::Vector3< T >::Vector3 | ( | const T & | d1, | |
const Vector2< T > & | v | |||
) | [inline] |
Vector3 constructor.
v | a vector2 | |
d1 | the first value of the vector3 |
Definition at line 84 of file Vector3.hpp.
kn::Vector3< T >::Vector3 | ( | const T & | d1, | |
const T & | d2, | |||
const T & | d3 | |||
) | [inline] |
kn::Vector3< T >::Vector3 | ( | const T & | d | ) | [inline] |
kn::Vector3< T >::Vector3 | ( | const T * | a | ) | [inline] |
create a 3 Vector create a 3 Vector and set data by using the values array d
a | pointer to an array of data |
MathException | d is null |
Definition at line 347 of file Vector3.hpp.
kn::Vector3< T >::Vector3 | ( | const Vector< T > & | v | ) | [inline] |
Create a 3 Vector from a generic vector of size 3.
v | a vector |
MathException | size of vector is different of 3 |
Definition at line 330 of file Vector3.hpp.
kn::Vector3< T >::~Vector3 | ( | void | ) | [inline] |
Vector3<T> kn::Vector3< T >::cross | ( | const Vector3< T > & | v | ) | const [inline] |
Cross product between 2 Vector3.
Definition at line 301 of file Vector3.hpp.
T kn::Vector3< T >::dot | ( | const Vector3< T > & | v | ) | const [inline] |
Multiplies the Vector with a vector3 (dot product).
v | the vector3 multiplied with this Vector |
Definition at line 210 of file Vector3.hpp.
void kn::Vector3< T >::fill | ( | const T & | d | ) | [inline] |
Sets the value d on every entry of the vector.
Reimplemented from kn::Vector< T >.
Definition at line 316 of file Vector3.hpp.
Vector3< T > kn::Vector3< T >::getNormalized | ( | void | ) | const [inline] |
Normalize a copy of the vector.
Reimplemented from kn::Vector< T >.
Definition at line 364 of file Vector3.hpp.
Vector3< T > & kn::Vector3< T >::normalize | ( | void | ) | [inline] |
Normalize the vector Divide each elements of this vector its norm.
Reimplemented from kn::Vector< T >.
Definition at line 355 of file Vector3.hpp.
Vector3<T> kn::Vector3< T >::operator* | ( | const T & | d | ) | const [inline] |
Multiplies the Vector3 with a value.
d | the value multiplied with this Vector |
Reimplemented from kn::Vector< T >.
Definition at line 249 of file Vector3.hpp.
T kn::Vector3< T >::operator* | ( | const Vector3< T > & | v | ) | const [inline] |
Multiplies the Vector with a vector3 (dot product).
v | the vector3 multiplied with this Vector |
Definition at line 371 of file Vector3.hpp.
Vector3< T > & kn::Vector3< T >::operator*= | ( | const T & | d | ) | [inline] |
Multiplies the Vector3 with a value.
d | the value multiplied with this Vector2 |
Reimplemented from kn::Vector< T >.
Definition at line 432 of file Vector3.hpp.
Vector3< T > kn::Vector3< T >::operator+ | ( | const Vector3< T > & | v | ) | const [inline] |
adds two vectors
v | the vector to be added |
Definition at line 388 of file Vector3.hpp.
Vector3< T > & kn::Vector3< T >::operator+= | ( | const Vector3< T > & | v | ) | [inline] |
Vector3<T> kn::Vector3< T >::operator- | ( | void | ) | const [inline] |
Compute opposite of the Vector.
Reimplemented from kn::Vector< T >.
Definition at line 257 of file Vector3.hpp.
Vector3< T > kn::Vector3< T >::operator- | ( | const Vector3< T > & | v | ) | const [inline] |
subtracts two vectors
v | the vector to be substracted |
Definition at line 398 of file Vector3.hpp.
Vector3< T > & kn::Vector3< T >::operator-= | ( | const Vector3< T > & | v | ) | [inline] |
Vector3<T> kn::Vector3< T >::operator/ | ( | const T & | d | ) | const [inline] |
Divides the Vector3 by a value.
d | the value dividing this Vector |
Reimplemented from kn::Vector< T >.
Definition at line 240 of file Vector3.hpp.
Vector3< T > & kn::Vector3< T >::operator/= | ( | const T & | d | ) | [inline] |
Divides the Vector3 with a value All values of the Vector3 are divided by d.
d | the value divided with this Vector2 |
Reimplemented from kn::Vector< T >.
Definition at line 423 of file Vector3.hpp.
Vector3< T > & kn::Vector3< T >::operator= | ( | const Vector3< T > & | v | ) | [inline] |
copy the value of the argument vector2 to this vector
v | the source vector |
Definition at line 378 of file Vector3.hpp.
Vector3< T > kn::Vector3< T >::operator^ | ( | const Vector3< T > & | v | ) | const [inline] |
Cross product between 2 Vector3.
Definition at line 440 of file Vector3.hpp.
void kn::Vector3< T >::setZero | ( | void | ) | [inline] |
Reset the vector entries to zero.
Reimplemented from kn::Vector< T >.
Definition at line 323 of file Vector3.hpp.
size_t kn::Vector3< T >::size | ( | void | ) | const [inline] |
Returns the number of rows of the Vector.
Reimplemented from kn::Vector< T >.
Definition at line 309 of file Vector3.hpp.
const T& kn::Vector3< T >::x | ( | void | ) | const [inline] |
Return x coordinate reference.
Definition at line 150 of file Vector3.hpp.
T& kn::Vector3< T >::x | ( | void | ) | [inline] |
Return x coordinate reference.
Definition at line 142 of file Vector3.hpp.
const T& kn::Vector3< T >::y | ( | void | ) | const [inline] |
Return y coordinate reference.
Definition at line 166 of file Vector3.hpp.
T& kn::Vector3< T >::y | ( | void | ) | [inline] |
Return y coordinate reference.
Definition at line 158 of file Vector3.hpp.
const T& kn::Vector3< T >::z | ( | void | ) | const [inline] |
Return z coordinate reference.
Definition at line 182 of file Vector3.hpp.
T& kn::Vector3< T >::z | ( | void | ) | [inline] |
Return z coordinate reference.
Definition at line 174 of file Vector3.hpp.