Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The EdgeExtractor class extracts the edges from one or more Geometry objects. More...
#include <EdgeExtractor.hpp>
Classes | |
class | Edge |
A single edge as extracted from the EdgeExtractor class. More... | |
Public Member Functions | |
EdgeExtractor () | |
void | extractEdges (Geometry *geom) |
Extracts the edges from the given Geometry and appends them to edges(). | |
bool | extractEdges (Actor *actor) |
void | extractEdges (ActorCollection *actors) |
void | extractEdges (SceneManager *scenemanager) |
void | extractEdges (Rendering *rendering) |
ref< Geometry > | generateEdgeGeometry () const |
const std::vector< Edge > & | edges () const |
std::vector< Edge > & | edges () |
void | reset () |
float | creaseAngle () const |
The minimum angle (in degrees) considered to generate crease-edges. | |
void | setCreaseAngle (float a) |
The minimum angle (in degrees) considered to generate crease-edges. | |
bool | warnNonManifold () const |
void | setWarnNonManifold (bool warn_on) |
Protected Member Functions | |
void | addEdge (std::set< EdgeExtractor::Edge > &edges, const EdgeExtractor::Edge &e, const fvec3 &n) |
Protected Attributes | |
std::vector< Edge > | mEdges |
float | mCreaseAngle |
bool | mWarnNonManifold |
The EdgeExtractor class extracts the edges from one or more Geometry objects.
The edges are always extracted from the triangles or quads that are part of a vl::Geometry and can be of three types: silhouette edges, crease edges and boundary edges.
Definition at line 73 of file EdgeExtractor.hpp.
vl::EdgeExtractor::EdgeExtractor | ( | ) | [inline] |
Definition at line 136 of file EdgeExtractor.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
void EdgeExtractor::extractEdges | ( | Geometry * | geom ) |
Extracts the edges from the given Geometry and appends them to edges().
Definition at line 67 of file EdgeExtractor.cpp.
References vl::acos(), addEdge(), vl::Collection< T >::at(), vl::clamp(), creaseAngle(), vl::cross(), vl::VertexAttribInfo::data(), vl::dot(), vl::Geometry::drawCalls(), edges(), vl::Log::error(), vl::fPi, vl::ArrayAbstract::getAsVec3(), vl::TriangleIterator::hasNext(), vl::Vector3< T_Scalar >::isNull(), mEdges, vl::EdgeExtractor::Edge::normal1(), vl::EdgeExtractor::Edge::normal2(), vl::Vector3< T_Scalar >::normalize(), NULL, vl::EdgeExtractor::Edge::setIsCrease(), vl::Collection< T >::size(), vl::DrawCall::triangleIterator(), vl::VA_Position, vl::Geometry::vertexArray(), and vl::Geometry::vertexAttribArray().
Referenced by vl::EdgeRenderer::declareActor(), and extractEdges().
bool EdgeExtractor::extractEdges | ( | Actor * | actor ) |
Definition at line 163 of file EdgeExtractor.cpp.
References extractEdges(), vl::Actor::lod(), and NULL.
void EdgeExtractor::extractEdges | ( | ActorCollection * | actors ) |
Definition at line 171 of file EdgeExtractor.cpp.
References vl::Collection< T >::at(), extractEdges(), vl::Actor::lod(), and vl::Collection< T >::size().
void EdgeExtractor::extractEdges | ( | SceneManager * | scenemanager ) |
Definition at line 181 of file EdgeExtractor.cpp.
References vl::SceneManager::extractActors(), extractEdges(), and vl::ref< T >::get().
void EdgeExtractor::extractEdges | ( | Rendering * | rendering ) |
Definition at line 188 of file EdgeExtractor.cpp.
References vl::Collection< T >::at(), extractEdges(), vl::Rendering::sceneManagers(), and vl::Collection< T >::size().
Definition at line 127 of file EdgeExtractor.cpp.
References edges(), vl::ref< T >::get(), and vl::PT_LINES.
Referenced by vl::EdgeRenderer::declareActor().
const std::vector<Edge>& vl::EdgeExtractor::edges | ( | ) | const [inline] |
Definition at line 149 of file EdgeExtractor.hpp.
Referenced by vl::EdgeRenderer::declareActor(), extractEdges(), and generateEdgeGeometry().
std::vector<Edge>& vl::EdgeExtractor::edges | ( | ) | [inline] |
Definition at line 150 of file EdgeExtractor.hpp.
void vl::EdgeExtractor::reset | ( | ) | [inline] |
Definition at line 152 of file EdgeExtractor.hpp.
float vl::EdgeExtractor::creaseAngle | ( | ) | const [inline] |
The minimum angle (in degrees) considered to generate crease-edges.
Definition at line 155 of file EdgeExtractor.hpp.
Referenced by extractEdges().
void vl::EdgeExtractor::setCreaseAngle | ( | float | a ) | [inline] |
The minimum angle (in degrees) considered to generate crease-edges.
Definition at line 157 of file EdgeExtractor.hpp.
Referenced by vl::EdgeRenderer::declareActor().
bool vl::EdgeExtractor::warnNonManifold | ( | ) | const [inline] |
Definition at line 159 of file EdgeExtractor.hpp.
void vl::EdgeExtractor::setWarnNonManifold | ( | bool | warn_on ) | [inline] |
Definition at line 160 of file EdgeExtractor.hpp.
void EdgeExtractor::addEdge | ( | std::set< EdgeExtractor::Edge > & | edges, |
const EdgeExtractor::Edge & | e, | ||
const fvec3 & | n | ||
) | [protected] |
Definition at line 43 of file EdgeExtractor.cpp.
References vl::Log::error(), vl::Vector3< T_Scalar >::isNull(), mWarnNonManifold, vl::EdgeExtractor::Edge::setNormal1(), vl::EdgeExtractor::Edge::setNormal2(), and VL_CHECK.
Referenced by extractEdges().
std::vector<Edge> vl::EdgeExtractor::mEdges [protected] |
Definition at line 166 of file EdgeExtractor.hpp.
Referenced by extractEdges().
float vl::EdgeExtractor::mCreaseAngle [protected] |
Definition at line 167 of file EdgeExtractor.hpp.
bool vl::EdgeExtractor::mWarnNonManifold [protected] |
Definition at line 168 of file EdgeExtractor.hpp.
Referenced by addEdge().