A vectorization friendly 3D vector. More...
Public Types | |
|
typedef MatrixBase < AlignedVector3< _Scalar > > | Base |
Public Member Functions | |
| AlignedVector3 (const Scalar &x, const Scalar &y, const Scalar &z) | |
| AlignedVector3 (const AlignedVector3 &other) | |
| template<typename Derived > | |
| AlignedVector3 (const MatrixBase< Derived > &other) | |
| const Scalar & | coeff (Index row, Index col) const |
| const Scalar & | coeff (Index index) const |
| Scalar & | coeffRef (Index row, Index col) |
| Scalar & | coeffRef (Index index) |
| 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) |
Additional Inherited Members | |
Static Public Member Functions inherited from DenseBase< Derived > | |
| static const ConstantReturnType | Constant (Index rows, Index cols, const Scalar &value) |
| static const ConstantReturnType | Constant (Index size, const Scalar &value) |
| static const ConstantReturnType | Constant (const Scalar &value) |
|
static const SequentialLinSpacedReturnType | LinSpaced (Sequential_t, Index size, const Scalar &low, const Scalar &high) |
|
static const RandomAccessLinSpacedReturnType | LinSpaced (Index size, const Scalar &low, const Scalar &high) |
|
static const SequentialLinSpacedReturnType | LinSpaced (Sequential_t, const Scalar &low, const Scalar &high) |
|
static const RandomAccessLinSpacedReturnType | LinSpaced (const Scalar &low, const Scalar &high) |
|
static const CwiseNullaryOp < CustomNullaryOp, Derived > | NullaryExpr (Index rows, Index cols, const CustomNullaryOp &func) |
|
static const CwiseNullaryOp < CustomNullaryOp, Derived > | NullaryExpr (Index size, const CustomNullaryOp &func) |
|
static const CwiseNullaryOp < CustomNullaryOp, Derived > | NullaryExpr (const CustomNullaryOp &func) |
| static const ConstantReturnType | Ones (Index rows, Index cols) |
| static const ConstantReturnType | Ones (Index size) |
| static const ConstantReturnType | Ones () |
|
static const CwiseNullaryOp < internal::scalar_random_op < Scalar >, Derived > | Random (Index rows, Index cols) |
|
static const CwiseNullaryOp < internal::scalar_random_op < Scalar >, Derived > | Random () |
|
static const CwiseNullaryOp < internal::scalar_random_op < Scalar >, Derived > | Random (Index size) |
| static const ConstantReturnType | Zero (Index rows, Index cols) |
| static const ConstantReturnType | Zero (Index size) |
| static const ConstantReturnType | Zero () |
Public Attributes inherited from DenseBase< Derived > | |
| CoeffReadCost | |
| ColsAtCompileTime | |
| Flags | |
| IsRowMajor | |
| IsVectorAtCompileTime | |
| MaxColsAtCompileTime | |
| MaxRowsAtCompileTime | |
| MaxSizeAtCompileTime | |
| RowsAtCompileTime | |
| SizeAtCompileTime | |
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.
1.8.2