A vectorization friendly 3D vector. More...
Public Types | |
typedef MatrixBase < AlignedVector3< _Scalar > > | Base |
Public Member Functions | |
template<typename Derived > | |
AlignedVector3 (const MatrixBase< Derived > &other) | |
AlignedVector3 (const AlignedVector3 &other) | |
AlignedVector3 (const Scalar &x, const Scalar &y, const Scalar &z) | |
const Scalar & | coeff (Index index) const |
const Scalar & | coeff (Index row, Index col) const |
Scalar & | coeffRef (Index index) |
Scalar & | coeffRef (Index row, Index col) |
Index | cols () const |
AlignedVector3 | cross (const AlignedVector3 &other) const |
Scalar | dot (const AlignedVector3 &other) const |
template<typename Derived > | |
bool | isApprox (const MatrixBase< Derived > &other, RealScalar eps=NumTraits< Scalar >::dummy_precision()) const |
Scalar | norm () const |
void | normalize () |
AlignedVector3 | normalized () |
AlignedVector3 | operator* (const Scalar &s) const |
AlignedVector3 & | operator*= (const Scalar &s) |
AlignedVector3 | operator+ (const AlignedVector3 &other) const |
AlignedVector3 & | operator+= (const AlignedVector3 &other) |
AlignedVector3 | operator- (const AlignedVector3 &other) const |
AlignedVector3 | operator-= (const AlignedVector3 &other) |
AlignedVector3 | operator/ (const Scalar &s) const |
AlignedVector3 & | operator/= (const Scalar &s) |
AlignedVector3 & | operator= (const AlignedVector3 &other) |
Index | rows () const |
Scalar | squaredNorm () const |
Scalar | sum () const |
Friends | |
AlignedVector3 | operator* (const Scalar &s, const AlignedVector3 &vec) |
A vectorization friendly 3D vector.
This class represents a 3D vector internally using a 4D vector such that vectorization can be seamlessly enabled. Of course, the same result can be achieved by directly using a 4D vector. This class makes this process simpler.