#include <pose.h>
Definition at line 56 of file pose.h.
Definition at line 45 of file pose.cpp.
46 Rt_ = Matrix4d::Identity();
| bsfm::Pose::Pose |
( |
const Matrix3d & |
R, |
|
|
const Vector3d & |
t |
|
) |
| |
Definition at line 50 of file pose.cpp.
51 Rt_ = Matrix4d::Identity();
52 Rt_.block(0, 0, 3, 3) = R;
53 Rt_.col(3).head(3) = t;
Definition at line 57 of file pose.cpp.
58 Rt_ = Matrix4d::Identity();
59 Rt_.block(0, 0, 3, 4) = Rt;
| bsfm::Pose::Pose |
( |
const Pose & |
other | ) |
|
| bsfm::Pose::Pose |
( |
const Matrix4d & |
other | ) |
|
| Vector3d bsfm::Pose::AxisAngle |
( |
| ) |
|
Definition at line 162 of file pose.cpp.
164 const double angle = acos(0.5 * (
Rt_.trace() - 2.0));
165 Vector3d axis = Vector3d(
Rt_(2, 1) -
Rt_(1, 2),
167 Rt_(1, 0) -
Rt_(0, 1)) * 0.5 / sin(angle);
| void bsfm::Pose::Compose |
( |
const Pose & |
other | ) |
|
Definition at line 157 of file pose.cpp.
158 return Rt_.block(0, 0, 3, 4);
| Pose bsfm::Pose::Delta |
( |
const Pose & |
rhs | ) |
const |
| Matrix4d bsfm::Pose::FromAxisAngle |
( |
const Vector3d & |
aa | ) |
|
Definition at line 174 of file pose.cpp.
176 double angle = aa.norm();
177 Vector3d axis = aa / angle;
181 0.0, -axis(2), axis(1),
182 axis(2), 0.0, -axis(0),
183 -axis(1), axis(0), 0.0;
187 axis(0)*axis(0), axis(0)*axis(1), axis(0)*axis(2),
188 axis(0)*axis(1), axis(1)*axis(1), axis(1)*axis(2),
189 axis(0)*axis(2), axis(1)*axis(2), axis(2)*axis(2);
192 cos(angle) * Matrix3d::Identity() +
193 sin(angle) * cross + (1-cos(angle)) * tensor;
194 Rt_.block(0, 0, 3, 3) = R;
| Matrix4d & bsfm::Pose::Get |
( |
| ) |
|
| const Matrix4d & bsfm::Pose::Get |
( |
| ) |
const |
| Pose bsfm::Pose::Inverse |
( |
| ) |
const |
Definition at line 150 of file pose.cpp.
151 Matrix4d Rt_inverse =
Rt_.inverse();
152 Pose out(Rt_inverse);
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Pose()
| bool bsfm::Pose::IsApprox |
( |
const Pose & |
other | ) |
const |
Definition at line 139 of file pose.cpp.
140 return Rt_.isApprox(other.Rt_);
| double & bsfm::Pose::MutableX |
( |
| ) |
|
| double & bsfm::Pose::MutableY |
( |
| ) |
|
| double & bsfm::Pose::MutableZ |
( |
| ) |
|
| double & bsfm::Pose::operator() |
( |
int |
i, |
|
|
int |
j |
|
) |
| |
| const double & bsfm::Pose::operator() |
( |
int |
i, |
|
|
int |
j |
|
) |
| const |
| Pose bsfm::Pose::operator* |
( |
const Pose & |
other | ) |
const |
Definition at line 115 of file pose.cpp.
116 Matrix4d Rt_out =
Rt_ * other.Rt_;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Pose()
| void bsfm::Pose::Print |
( |
const std::string & |
prefix = std::string() | ) |
const |
Definition at line 248 of file pose.cpp.
249 if (!prefix.empty()) {
250 std::cout << prefix << std::endl;
252 std::cout <<
Rt_ << std::endl;
| Vector4d bsfm::Pose::Project |
( |
const Vector4d & |
pt3d | ) |
|
Definition at line 121 of file pose.cpp.
122 Vector4d proj =
Rt_ * pt3d;
| Vector2d bsfm::Pose::ProjectTo2D |
( |
const Vector3d & |
pt3d | ) |
|
Definition at line 127 of file pose.cpp.
128 Vector4d pt3d_h = Vector4d::Constant(1.0);
129 pt3d_h.head(3) = pt3d;
131 const Vector4d proj_h =
Rt_ * pt3d_h;
132 Vector2d proj = proj_h.head(2);
| Matrix3d bsfm::Pose::Rotation |
( |
| ) |
const |
Definition at line 91 of file pose.cpp.
92 return Rt_.block(0, 0, 3, 3);
| void bsfm::Pose::Set |
( |
const Matrix4d & |
transformation | ) |
|
| void bsfm::Pose::SetRotation |
( |
const Matrix3d & |
rotation | ) |
|
Definition at line 106 of file pose.cpp.
107 Rt_.block(0, 0, 3, 3) = rotation;
| void bsfm::Pose::SetTranslation |
( |
const Vector3d & |
translation | ) |
|
Definition at line 110 of file pose.cpp.
111 Rt_.block(0, 3, 3, 1) = translation;
| void bsfm::Pose::SetX |
( |
double |
x | ) |
|
| void bsfm::Pose::SetY |
( |
double |
y | ) |
|
| void bsfm::Pose::SetZ |
( |
double |
z | ) |
|
| void bsfm::Pose::TranslateX |
( |
double |
dx | ) |
|
| void bsfm::Pose::TranslateY |
( |
double |
dy | ) |
|
| void bsfm::Pose::TranslateZ |
( |
double |
dz | ) |
|
| Vector3d bsfm::Pose::Translation |
( |
| ) |
const |
Definition at line 96 of file pose.cpp.
97 return Rt_.block(0, 3, 3, 1);
| const double & bsfm::Pose::X |
( |
| ) |
const |
| const double & bsfm::Pose::Y |
( |
| ) |
const |
| const double & bsfm::Pose::Z |
( |
| ) |
const |
The documentation for this class was generated from the following files:
- /Users/eanelson/Git/berkeley_sfm/src/cpp/pose/pose.h
- /Users/eanelson/Git/berkeley_sfm/src/cpp/pose/pose.cpp