Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Removes from a Geometry the vertices with the same attributes. More...
#include <DoubleVertexRemover.hpp>
Public Member Functions | |
DoubleVertexRemover () | |
void | removeDoubles (Geometry *geom) |
const std::vector< u32 > & | mapNewToOld () const |
const std::vector< u32 > & | mapOldToNew () const |
Protected Attributes | |
std::vector< u32 > | mMapNewToOld |
std::vector< u32 > | 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 63 of file DoubleVertexRemover.hpp.
vl::DoubleVertexRemover::DoubleVertexRemover | ( | ) | [inline] |
Definition at line 68 of file DoubleVertexRemover.hpp.
void DoubleVertexRemover::removeDoubles | ( | Geometry * | geom ) |
Definition at line 232 of file DoubleVertexRemover.cpp.
References vl::Collection< T >::at(), vl::Collection< T >::clear(), vl::VertexAttribInfo::data(), vl::Log::debug(), vl::Geometry::drawCalls(), vl::Time::elapsed(), vl::ref< T >::get(), vl::IndexIterator::hasNext(), mMapNewToOld, mMapOldToNew, vl::Collection< T >::push_back(), vl::Geometry::regenerateVertices(), vl::Collection< T >::size(), vl::ArrayAbstract::size(), vl::Time::start(), vl::VA_Position, vl::Geometry::vertexArray(), vl::Geometry::vertexAttribArray(), and VL_CHECK.
Referenced by vl::loadMD2(), vl::makeIcosphere(), vl::makeTeapot(), vl::GeometryLoadCallback::operator()(), vl::PolygonSimplifier::simplify(), and vl::TriangleStripGenerator::stripfy().
const std::vector<u32>& vl::DoubleVertexRemover::mapNewToOld | ( | ) | const [inline] |
Definition at line 70 of file DoubleVertexRemover.hpp.
const std::vector<u32>& vl::DoubleVertexRemover::mapOldToNew | ( | ) | const [inline] |
Definition at line 71 of file DoubleVertexRemover.hpp.
Referenced by vl::loadMD2().
std::vector<u32> vl::DoubleVertexRemover::mMapNewToOld [protected] |
Definition at line 74 of file DoubleVertexRemover.hpp.
Referenced by removeDoubles().
std::vector<u32> vl::DoubleVertexRemover::mMapOldToNew [protected] |
Definition at line 75 of file DoubleVertexRemover.hpp.
Referenced by removeDoubles().