68 Vector4::MapType(off.data() + 3).normalize();
70 double fx, fy, cx, cy;
71 is >> fx >> fy >> cx >> cy;
78 os <<
_Kcam(0, 0) <<
" ";
79 os <<
_Kcam(1, 1) <<
" ";
80 os <<
_Kcam(0, 2) <<
" ";
81 os <<
_Kcam(1, 2) <<
" ";
93 _w2i.matrix().topLeftCorner<3, 4>() =
99CacheCameraDrawAction::CacheCameraDrawAction()
102 refreshPropertyPtrs(0);
105bool CacheCameraDrawAction::refreshPropertyPtrs(
106 HyperGraphElementAction::Parameters* params_) {
108 if (_previousParams) {
110 _typeName +
"::CAMERA_Z", .05f);
112 _typeName +
"::CAMERA_SIDE", .05f);
121HyperGraphElementAction* CacheCameraDrawAction::operator()(
122 HyperGraph::HyperGraphElement* element,
123 HyperGraphElementAction::Parameters* params) {
124 if (
typeid(*element).name() != _typeName)
return nullptr;
125 CacheCamera* that =
static_cast<CacheCamera*
>(element);
126 refreshPropertyPtrs(params);
127 if (!_previousParams)
return this;
129 if (_show && !_show->value())
return this;
131 glPushAttrib(GL_COLOR);
134 glMultMatrixd(that->camParams()->offset().cast<
double>().data());
135 glRotatef(180.0f, 0.0f, 1.0f, 0.0f);
Affine3 _w2i
world to image transform
virtual bool resolveDependencies()
virtual void updateImpl()
redefine this to do the update
const Isometry3 & w2n() const
virtual void updateImpl()
redefine this to do the update
virtual bool resolveDependencies()
ParameterVector _parameters
virtual bool refreshPropertyPtrs(HyperGraphElementAction::Parameters *params_)
const Matrix3 & Kcam() const
Matrix3 _Kcam_inverseOffsetR
void setKcam(double fx, double fy, double cx, double cy)
virtual bool read(std::istream &is)
read the data from a stream
void setOffset(const Isometry3 &offset_=Isometry3::Identity())
virtual bool write(std::ostream &os) const
write the data to a stream
const Isometry3 & inverseOffset() const
rotation of the inverse offset as 3x3 rotation matrix
void setOffset(const Isometry3 &offset_=Isometry3::Identity())
Isometry3 fromVectorQT(const Vector7 &v)
bool writeVector(std::ostream &os, const Eigen::DenseBase< Derived > &b)
bool readVector(std::istream &is, Eigen::DenseBase< Derived > &b)
Vector7 toVectorQT(const Isometry3 &t)
void drawPyramid(GLfloat length, GLfloat height)
Eigen::Transform< double, 3, Eigen::Isometry, Eigen::ColMajor > Isometry3
Property< float > FloatProperty
#define POSE_PARAMETER_COLOR