49VertexPointXYZDrawAction::VertexPointXYZDrawAction()
52bool VertexPointXYZDrawAction::refreshPropertyPtrs(
53 HyperGraphElementAction::Parameters* params_) {
55 if (_previousParams) {
57 _typeName +
"::POINT_SIZE", 1.);
64HyperGraphElementAction* VertexPointXYZDrawAction::operator()(
65 HyperGraph::HyperGraphElement* element,
66 HyperGraphElementAction::Parameters* params) {
67 if (
typeid(*element).name() != _typeName)
return nullptr;
68 initializeDrawActionsCache();
69 refreshPropertyPtrs(params);
70 if (!_previousParams)
return this;
72 if (_show && !_show->value())
return this;
73 VertexPointXYZ* that =
static_cast<VertexPointXYZ*
>(element);
76 glPushAttrib(GL_ENABLE_BIT | GL_POINT_BIT);
77 glDisable(GL_LIGHTING);
79 float ps = _pointSize ? _pointSize->value() : 1.f;
80 glTranslatef((
float)that->estimate()(0), (
float)that->estimate()(1),
81 (
float)that->estimate()(2));
84 drawCache(that->cacheContainer(), params);
85 drawUserData(that->userData(), params);
97 if (
typeid(*element).name() !=
_typeName)
return nullptr;
106 << v->
estimate().z() <<
" " << std::endl;
const EstimateType & estimate() const
return the current estimate of the vertex
virtual bool refreshPropertyPtrs(HyperGraphElementAction::Parameters *params_)
Abstract action that operates on a graph entity.
VertexPointXYZWriteGnuplotAction()
virtual HyperGraphElementAction * operator()(HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
Vertex for a tracked point in space.
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
virtual bool write(std::ostream &os) const
write the vertex to a stream
bool writeVector(std::ostream &os, const Eigen::DenseBase< Derived > &b)
bool readVector(std::istream &is, Eigen::DenseBase< Derived > &b)
void drawPoint(float pointSize)
Property< float > FloatProperty
#define LANDMARK_VERTEX_COLOR