57 if (
typeid(*element).name() !=
_typeName)
return nullptr;
70 *(params->
os) << std::endl;
75VertexSegment2DDrawAction::VertexSegment2DDrawAction()
78bool VertexSegment2DDrawAction::refreshPropertyPtrs(
79 HyperGraphElementAction::Parameters* params_) {
81 if (_previousParams) {
83 _typeName +
"::POINT_SIZE", 1.);
90HyperGraphElementAction* VertexSegment2DDrawAction::operator()(
91 HyperGraph::HyperGraphElement* element,
92 HyperGraphElementAction::Parameters* params_) {
93 if (
typeid(*element).name() != _typeName)
return nullptr;
95 refreshPropertyPtrs(params_);
96 if (!_previousParams)
return this;
98 if (_show && !_show->value())
return this;
100 VertexSegment2D* that =
static_cast<VertexSegment2D*
>(element);
101 glColor3f(0.8f, 0.5f, 0.3f);
103 glPointSize(_pointSize->value());
106 glVertex3f((
float)that->estimateP1().x(), (
float)that->estimateP1().y(), 0.f);
107 glVertex3f((
float)that->estimateP2().x(), (
float)that->estimateP2().y(), 0.f);
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.
VertexSegment2DWriteGnuplotAction()
virtual HyperGraphElementAction * operator()(HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
virtual bool write(std::ostream &os) const
write the vertex to a stream
Vector2 estimateP1() const
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
Vector2 estimateP2() const
bool writeVector(std::ostream &os, const Eigen::DenseBase< Derived > &b)
bool readVector(std::istream &is, Eigen::DenseBase< Derived > &b)
Property< float > FloatProperty