Visualization Library 2.0.0
A 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(). More... | |
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. More... | |
void | setCreaseAngle (float a) |
The minimum angle (in degrees) considered to generate crease-edges. More... | |
bool | warnNonManifold () const |
void | setWarnNonManifold (bool warn_on) |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Protected Member Functions | |
void | addEdge (std::set< EdgeExtractor::Edge > &edges, const EdgeExtractor::Edge &e, const fvec3 &n) |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
Protected Attributes | |
std::vector< Edge > | mEdges |
float | mCreaseAngle |
bool | mWarnNonManifold |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
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.
|
inline |
Definition at line 136 of file EdgeExtractor.hpp.
|
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().
|
inline |
The minimum angle (in degrees) considered to generate crease-edges.
Definition at line 155 of file EdgeExtractor.hpp.
Referenced by extractEdges().
|
inline |
Definition at line 149 of file EdgeExtractor.hpp.
Referenced by vl::EdgeRenderer::declareActor(), extractEdges(), and generateEdgeGeometry().
|
inline |
Definition at line 150 of file EdgeExtractor.hpp.
void EdgeExtractor::extractEdges | ( | Geometry * | geom | ) |
Extracts the edges from the given Geometry and appends them to edges().
Definition at line 69 of file EdgeExtractor.cpp.
References vl::acos(), addEdge(), vl::clamp(), creaseAngle(), vl::cross(), 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(), vl::EdgeExtractor::Edge::setIsCrease(), vl::DrawCall::triangleIterator(), and vl::Geometry::vertexArray().
Referenced by vl::EdgeRenderer::declareActor(), and extractEdges().
bool EdgeExtractor::extractEdges | ( | Actor * | actor | ) |
Definition at line 165 of file EdgeExtractor.cpp.
References extractEdges(), vl::Actor::lod(), and NULL.
void EdgeExtractor::extractEdges | ( | ActorCollection * | actors | ) |
Definition at line 173 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 183 of file EdgeExtractor.cpp.
References extractEdges(), vl::SceneManager::extractVisibleActors(), vl::ref< T >::get(), and NULL.
void EdgeExtractor::extractEdges | ( | Rendering * | rendering | ) |
Definition at line 190 of file EdgeExtractor.cpp.
References extractEdges(), and vl::Rendering::sceneManagers().
Definition at line 129 of file EdgeExtractor.cpp.
References vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::at(), vl::Geometry::drawCalls(), edges(), vl::ref< T >::get(), vl::PT_LINES, vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::resize(), vl::Renderable::setBufferObjectEnabled(), vl::Geometry::setVertexArray(), and vl::Array< T_VectorType, T_Scalar, T_GL_Size, T_GL_Type >::size().
Referenced by vl::EdgeRenderer::declareActor().
|
inline |
Definition at line 152 of file EdgeExtractor.hpp.
|
inline |
The minimum angle (in degrees) considered to generate crease-edges.
Definition at line 157 of file EdgeExtractor.hpp.
Referenced by vl::EdgeRenderer::declareActor().
|
inline |
Definition at line 160 of file EdgeExtractor.hpp.
|
inline |
Definition at line 159 of file EdgeExtractor.hpp.
|
protected |
Definition at line 167 of file EdgeExtractor.hpp.
|
protected |
Definition at line 166 of file EdgeExtractor.hpp.
Referenced by extractEdges().
|
protected |
Definition at line 168 of file EdgeExtractor.hpp.
Referenced by addEdge().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:08.
© Copyright Michele Bosi. All rights reserved.