60 #ifndef ACG_TRISTRIPNODET_HH
61 #define ACG_TRISTRIPNODET_HH
67 #include <OpenMesh/Tools/Utils/StripifierT.hh>
68 #include "MeshNodeDeprecatedT.hh"
75 namespace SceneGraph {
93 typedef MeshNodeDeprecatedT<Mesh> Base;
94 typedef typename Base::FaceMode FaceMode;
100 std::string _name=
"<TriStripNodeDeprecatedT>" )
101 : Base(_mesh, _parent, _name),
116 std::vector<unsigned int>().swap(Base::indices_);
125 Base::update_topology();
132 virtual void draw_faces(FaceMode _mode)
134 if (Base::mesh_.is_trimesh() &&
135 _mode == Base::PER_VERTEX &&
138 typename MyStripifier::StripsIterator strip_it = strips_.
begin();
139 typename MyStripifier::StripsIterator strip_last = strips_.
end();
141 for (; strip_it!=strip_last; ++strip_it)
142 glDrawElements(GL_TRIANGLE_STRIP,
147 else Base::draw_faces(_mode);
151 MyStripifier strips_;
159 #endif // ACG_TRISTRIPNODET_HH defined
bool is_valid() const
are strips computed?
Namespace providing different geometric functions concerning angles.
~TriStripNodeDeprecatedT()
Destructor.
virtual void update_topology()
build face indices, delete strips
TriStripNodeDeprecatedT(Mesh &_mesh, BaseNode *_parent=0, std::string _name="<TriStripNodeDeprecatedT>")
Default constructor.
size_t stripify()
Compute triangle strips, returns number of strips.
void update_strips()
build triangle strips, delete face indices
StripsIterator begin() const
Access strips.
void clear()
delete all strips
StripsIterator end() const
Access strips.