58 if (
typeid(*element).name() !=
_typeName)
return nullptr;
72VertexPointXYDrawAction::VertexPointXYDrawAction()
75bool VertexPointXYDrawAction::refreshPropertyPtrs(
76 HyperGraphElementAction::Parameters* params_) {
78 if (_previousParams) {
80 _typeName +
"::POINT_SIZE", 1.);
87HyperGraphElementAction* VertexPointXYDrawAction::operator()(
88 HyperGraph::HyperGraphElement* element,
89 HyperGraphElementAction::Parameters* params) {
90 if (
typeid(*element).name() != _typeName)
return nullptr;
91 initializeDrawActionsCache();
92 refreshPropertyPtrs(params);
93 if (!_previousParams)
return this;
95 if (_show && !_show->value())
return this;
96 VertexPointXY* that =
static_cast<VertexPointXY*
>(element);
99 glPushAttrib(GL_ENABLE_BIT | GL_POINT_BIT);
100 glDisable(GL_LIGHTING);
102 float ps = _pointSize ? _pointSize->value() : 1.0f;
103 glTranslatef((
float)that->estimate()(0), (
float)that->estimate()(1), 0.0f);
106 drawCache(that->cacheContainer(), params);
107 drawUserData(that->userData(), params);
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.
virtual HyperGraphElementAction * operator()(HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
VertexPointXYWriteGnuplotAction()
virtual bool write(std::ostream &os) const
write the vertex to a stream
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
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