Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Removes from a Geometry the vertices with the same attributes. More...
#include <DoubleVertexRemover.hpp>
Classes | |
| class | CompareVertex |
Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| DoubleVertexRemover () | |
| void | removeDoubles (Geometry *geom) |
| const std::vector< size_t > & | mapNewToOld () const |
| const std::vector< size_t > & | mapOldToNew () const |
Protected Attributes | |
| std::vector< size_t > | mMapNewToOld |
| std::vector< size_t > | mMapOldToNew |
Removes from a Geometry the vertices with the same attributes.
As a result also all the DrawArrays prensent in the Geometry are substituted with DrawElements.
Definition at line 62 of file DoubleVertexRemover.hpp.
| vl::DoubleVertexRemover::DoubleVertexRemover | ( | ) | [inline] |
Definition at line 126 of file DoubleVertexRemover.hpp.
| virtual const char* vl::DoubleVertexRemover::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::VertexMapper.
Definition at line 125 of file DoubleVertexRemover.hpp.
| void DoubleVertexRemover::removeDoubles | ( | Geometry * | geom ) |
Definition at line 156 of file DoubleVertexRemover.cpp.
References vl::Collection< T >::at(), vl::Collection< T >::clear(), vl::Geometry::drawCalls(), vl::ref< T >::get(), vl::IndexIterator::isEnd(), mMapNewToOld, mMapOldToNew, vl::Collection< T >::push_back(), vl::Geometry::regenerateVertices(), vl::Collection< T >::size(), vl::ArrayAbstract::size(), and vl::Geometry::vertexArray().
Referenced by vl::loadMD2(), vl::makeIcosphere(), vl::makeTeapot(), vl::GeometryLoadCallback::operator()(), vl::PolygonSimplifier::simplify(), and vl::TriangleStripGenerator::stripfy().
| const std::vector<size_t>& vl::DoubleVertexRemover::mapNewToOld | ( | ) | const [inline] |
Definition at line 128 of file DoubleVertexRemover.hpp.
| const std::vector<size_t>& vl::DoubleVertexRemover::mapOldToNew | ( | ) | const [inline] |
Definition at line 129 of file DoubleVertexRemover.hpp.
Referenced by vl::loadMD2().
std::vector<size_t> vl::DoubleVertexRemover::mMapNewToOld [protected] |
Definition at line 132 of file DoubleVertexRemover.hpp.
Referenced by removeDoubles().
std::vector<size_t> vl::DoubleVertexRemover::mMapOldToNew [protected] |
Definition at line 133 of file DoubleVertexRemover.hpp.
Referenced by removeDoubles().