![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Core/Vector.h>
Class representing a vector, defined in a Frame
.
More...
Class representing a vector, defined in a Frame
.
See Transform for documentation on Frames
At compilation time, the validity of Vector operations is checked:
From
Frame of the Transform right multiplied must match our FrameAn example of Vector with Transform:
The following would not compile:
By default the Vector uses an Eigen::Vector4d
. A different Eigen
vector can also be used as supporting type, such as Eigen::Vector3d
for 2D coordinates.
From | Frame where the vector originates from |
EigenType | Underlying type of the Vector, should be an Eigen type |
Public Types | |
using | TypeFrom = decltype(From) |
Public Member Functions | |
Vector (EigenType v) | |
template<auto OtherFrom, typename OtherEigenType> | |
Vector (const Vector< OtherFrom, OtherEigenType > &other) | |
template<auto OtherFrom> | |
Vector (Vector< OtherFrom > &&other) | |
template<auto OtherFrom> | |
Vector< FrameFrom, EigenType > & | operator= (const Vector< OtherFrom, EigenType > &other) |
template<auto OtherFrom, typename OtherEigenType> | |
Vector< FrameFrom, EigenType > & | operator= (const Vector< OtherFrom, OtherEigenType > &other) |
template<auto OtherFrom> | |
auto | operator+ (const Vector< OtherFrom, EigenType > &other) const |
template<auto OtherFrom> | |
auto | operator- (const Vector< OtherFrom, EigenType > &other) const |
template<typename Operand, typename = typename std::enable_if<std::is_arithmetic<Operand>::value, Operand>::type> | |
auto | operator* (const Operand &other) const |
void | normalize () |
auto | normalized () const |
template<auto OtherFrom> | |
double | dot (const Vector< OtherFrom, EigenType > &other) const |
template<auto OtherFrom> | |
auto | cross (const Vector< OtherFrom, EigenType > &other) const |
EigenType & | vector () |
const EigenType & | vector () const |
operator EigenType () const | |
Static Public Attributes | |
static constexpr TypeFrom | FrameFrom = From |