Represents a 3D point on a unit sphere. More...
#include <Unit3.h>
Public Types | |
enum | { dimension = 2 } |
Private Attributes | |
boost::optional< Matrix32 > | B_ |
Cached basis. More... | |
boost::optional< Matrix62 > | H_B_ |
Cached basis derivative. More... | |
Vector3 | p_ |
The location of the point on the unit sphere. More... | |
Constructors | |
Unit3 () | |
Default constructor. More... | |
Unit3 (const Vector3 &p) | |
Construct from point. More... | |
Unit3 (double x, double y, double z) | |
Construct from x,y,z. More... | |
Unit3 (const Point2 &p, double f) | |
Unit3 (const Unit3 &u) | |
Copy constructor. More... | |
Unit3 & | operator= (const Unit3 &u) |
Copy assignment. More... | |
static GTSAM_EXPORT Unit3 | FromPoint3 (const Point3 &point, OptionalJacobian< 2, 3 > H=boost::none) |
Named constructor from Point3 with optional Jacobian. More... | |
static GTSAM_EXPORT Unit3 | Random (std::mt19937 &rng) |
Testable | |
std::ostream & | operator<< (std::ostream &os, const Unit3 &pair) |
GTSAM_EXPORT void | print (const std::string &s=std::string()) const |
The print fuction. More... | |
bool | equals (const Unit3 &s, double tol=1e-9) const |
The equals function with tolerance. More... | |
Other functionality | |
Point3 | operator* (double s, const Unit3 &d) |
Return scaled direction as Point3. More... | |
GTSAM_EXPORT const Matrix32 & | basis (OptionalJacobian< 6, 2 > H=boost::none) const |
GTSAM_EXPORT Matrix3 | skew () const |
Return skew-symmetric associated with 3D point on unit sphere. More... | |
GTSAM_EXPORT Point3 | point3 (OptionalJacobian< 3, 2 > H=boost::none) const |
Return unit-norm Point3. More... | |
GTSAM_EXPORT Vector3 | unitVector (OptionalJacobian< 3, 2 > H=boost::none) const |
Return unit-norm Vector. More... | |
GTSAM_EXPORT double | dot (const Unit3 &q, OptionalJacobian< 1, 2 > H1=boost::none, OptionalJacobian< 1, 2 > H2=boost::none) const |
Return dot product with q. More... | |
GTSAM_EXPORT Vector2 | error (const Unit3 &q, OptionalJacobian< 2, 2 > H_q=boost::none) const |
GTSAM_EXPORT Vector2 | errorVector (const Unit3 &q, OptionalJacobian< 2, 2 > H_p=boost::none, OptionalJacobian< 2, 2 > H_q=boost::none) const |
GTSAM_EXPORT double | distance (const Unit3 &q, OptionalJacobian< 1, 2 > H=boost::none) const |
Distance between two directions. More... | |
Unit3 | cross (const Unit3 &q) const |
Cross-product between two Unit3s. More... | |
Point3 | cross (const Point3 &q) const |
Cross-product w Point3. More... | |
Manifold | |
enum | CoordinatesMode { EXPMAP, RENORM } |
size_t | dim () const |
Dimensionality of tangent space = 2 DOF. More... | |
GTSAM_EXPORT Unit3 | retract (const Vector2 &v, OptionalJacobian< 2, 2 > H=boost::none) const |
The retract function. More... | |
GTSAM_EXPORT Vector2 | localCoordinates (const Unit3 &s) const |
The local coordinates function. More... | |
static size_t | Dim () |
Dimensionality of tangent space = 2 DOF. More... | |
Advanced Interface | |
class | boost::serialization::access |
template<class ARCHIVE > | |
void | serialize (ARCHIVE &ar, const unsigned int) |
|
inlineexplicit |
|
inline |
|
inlineexplicit |
|
inline |
const Matrix32 & gtsam::Unit3::basis | ( | OptionalJacobian< 6, 2 > | H = boost::none | ) | const |
|
inlinestatic |
|
inline |
double gtsam::Unit3::distance | ( | const Unit3 & | q, |
OptionalJacobian< 1, 2 > | H = boost::none |
||
) | const |
double gtsam::Unit3::dot | ( | const Unit3 & | q, |
OptionalJacobian< 1, 2 > | H1 = boost::none , |
||
OptionalJacobian< 1, 2 > | H2 = boost::none |
||
) | const |
|
inline |
Vector2 gtsam::Unit3::error | ( | const Unit3 & | q, |
OptionalJacobian< 2, 2 > | H_q = boost::none |
||
) | const |
Signed, vector-valued error between two directions
Vector2 gtsam::Unit3::errorVector | ( | const Unit3 & | q, |
OptionalJacobian< 2, 2 > | H_p = boost::none , |
||
OptionalJacobian< 2, 2 > | H_q = boost::none |
||
) | const |
|
static |
Point3 gtsam::Unit3::point3 | ( | OptionalJacobian< 3, 2 > | H = boost::none | ) | const |
void gtsam::Unit3::print | ( | const std::string & | s = std::string() | ) | const |
|
static |
Unit3 gtsam::Unit3::retract | ( | const Vector2 & | v, |
OptionalJacobian< 2, 2 > | H = boost::none |
||
) | const |
|
inlineprivate |
Matrix3 gtsam::Unit3::skew | ( | ) | const |
Vector3 gtsam::Unit3::unitVector | ( | OptionalJacobian< 3, 2 > | H = boost::none | ) | const |
|
friend |
|
friend |
|
mutableprivate |
|
mutableprivate |
|
private |