51 Vector4::MapType(off.data() + 3).normalize();
79CacheSE3OffsetDrawAction::CacheSE3OffsetDrawAction()
82 refreshPropertyPtrs(0);
85bool CacheSE3OffsetDrawAction::refreshPropertyPtrs(
86 HyperGraphElementAction::Parameters* params_) {
88 if (_previousParams) {
90 _typeName +
"::CUBE_SIDE", .05f);
97HyperGraphElementAction* CacheSE3OffsetDrawAction::operator()(
98 HyperGraph::HyperGraphElement* element,
99 HyperGraphElementAction::Parameters* params_) {
100 if (
typeid(*element).name() != _typeName)
return nullptr;
101 CacheSE3Offset* that =
static_cast<CacheSE3Offset*
>(element);
102 refreshPropertyPtrs(params_);
103 if (!_previousParams)
return this;
105 if (_show && !_show->value())
return this;
106 float cs = _cubeSide ? _cubeSide->value() : 1.0f;
107 glPushAttrib(GL_COLOR);
110 glMultMatrixd(that->offsetParam()->offset().cast<
double>().data());
const EstimateType & estimate() const
return the current estimate of the vertex
caching the offset related to a vertex
ParameterSE3Offset * _offsetParam
the parameter connected to the cache
virtual void updateImpl()
redefine this to do the update
void setOffsetParam(ParameterSE3Offset *offsetParam)
const ParameterSE3Offset * offsetParam() const
virtual bool resolveDependencies()
OptimizableGraph::Vertex * vertex()
ParameterVector _parameters
virtual bool refreshPropertyPtrs(HyperGraphElementAction::Parameters *params_)
virtual bool write(std::ostream &os) const
write the data to a stream
void setOffset(const Isometry3 &offset_=Isometry3::Identity())
const Isometry3 & offset() const
rotation of the offset as 3x3 rotation matrix
virtual bool read(std::istream &is)
read the data from a stream
3D pose Vertex, represented as an Isometry3
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 drawBox(GLfloat l, GLfloat w, GLfloat h)
Eigen::Transform< double, 3, Eigen::Isometry, Eigen::ColMajor > Isometry3
Property< float > FloatProperty
#define POSE_PARAMETER_COLOR