Class sym::Rot2#

template<typename ScalarType>
class Rot2#

Autogenerated C++ implementation of symforce.geo.rot2.Rot2.

Group of two-dimensional orthogonal matrices with determinant +1, representing rotations in 2D space. Backed by a complex number.

Public Types

using Scalar = ScalarType#
using Self = Rot2<Scalar>#
using DataVec = Eigen::Matrix<Scalar, 2, 1>#
using TangentVec = Eigen::Matrix<Scalar, 1, 1>#
using SelfJacobian = Eigen::Matrix<Scalar, 1, 1>#
using Vector2 = Eigen::Matrix<Scalar, 2, 1>#

Public Functions

inline explicit Rot2(const DataVec &data, const bool normalize = true)#

Construct from data vec

Parameters:

normalize – Project to the manifold on construction. This ensures numerical stability as this constructor is called after each codegen operation. Constructing from a normalized vector may be faster, e.g. with FromStorage.

inline Rot2()#
inline const DataVec &Data() const#
inline explicit Rot2(const Scalar angle)#
const Vector2 ComposeWithPoint(const Vector2 &right) const#

Left-multiplication. Either rotation concatenation or point transform.

const Eigen::Matrix<Scalar, 2, 2> ToRotationMatrix() const#

A matrix representation of this element in the Euclidean space that contains it.

inline void ToStorage(Scalar *const vec) const#
inline Self Inverse() const#
inline Self Compose(const Self &b) const#
inline Vector2 Compose(const Vector2 &point) const#
inline Self Between(const Self &b) const#
inline Self InverseWithJacobian(SelfJacobian *const res_D_a = nullptr) const#
inline Self ComposeWithJacobians(const Self &b, SelfJacobian *const res_D_a = nullptr, SelfJacobian *const res_D_b = nullptr) const#
inline Self BetweenWithJacobians(const Self &b, SelfJacobian *const res_D_a = nullptr, SelfJacobian *const res_D_b = nullptr) const#
template<typename Other>
inline auto operator*(const Other &b) const -> decltype(Compose(b))#
inline TangentVec ToTangent(const Scalar epsilon = kDefaultEpsilon<Scalar>) const#
inline Self Retract(const TangentVec &vec, const Scalar epsilon = kDefaultEpsilon<Scalar>) const#
inline TangentVec LocalCoordinates(const Self &b, const Scalar epsilon = kDefaultEpsilon<Scalar>) const#
inline Self Interpolate(const Self b, const Scalar alpha, const Scalar epsilon = kDefaultEpsilon<Scalar>) const#
inline bool IsApprox(const Self &b, const Scalar tol) const#
template<typename ToScalar>
inline Rot2<ToScalar> Cast() const#
inline bool operator==(const Rot2 &rhs) const#

Public Static Functions

static inline Rot2 RandomFromUniformSamples(const Scalar u1)#
template<typename Generator>
static inline Rot2 Random(Generator &gen)#
static const sym::Rot2<Scalar> FromAngle(const Scalar theta)#

Create a Rot2 from an angle theta in radians

This is equivalent to from_tangent([theta])

static inline constexpr int32_t StorageDim()#
static inline Rot2 FromStorage(const Scalar *const vec)#
static inline Self Identity()#
static inline constexpr int32_t TangentDim()#
static inline Self FromTangent(const TangentVec &vec, const Scalar epsilon = kDefaultEpsilon<Scalar>)#