Visual Computing Library
Loading...
Searching...
No Matches
vcl::Edge< MeshType, Comps > Class Template Reference

The Edge class represents an Edge element of the vcl::Mesh class. More...

#include <vclib/mesh/elements/edge.h>

Inheritance diagram for vcl::Edge< MeshType, Comps >:

Public Types

using VertexType = VRefs::VertexType
 
- Public Types inherited from vcl::Element< ElemId::EDGE, MeshType, Comps... >
using ParentMeshType = MeshType
 
using Components = FilterTypesByCondition< comp::IsComponentPred, TypeWrapper< Comps... > >::type
 Components is an alias to a vcl::TypeWrapper that wraps all the types from which the Element inherits (Comps) that are Components (they satisfy the ComponentConcept).
 
- Public Types inherited from vcl::comp::ParentMeshPointer< MeshType >
using ParentMeshType = MeshType
 

Public Member Functions

 Edge ()=default
 Empty constructor.
 
void setVertices (VertexType *v0, VertexType *v1)
 Sets the vertices of the edge.
 
void setVertices (uint vi0, uint vi1)
 Sets the vertices of the edge.
 
- Public Member Functions inherited from vcl::Element< ElemId::EDGE, MeshType, Comps... >
uint index () const
 
autocomponent ()
 
const autocomponent () const
 
void importFrom (const ElType &v, bool importRefs=true)
 
void serialize (std::ostream &out) const
 
void deserialize (std::istream &in)
 
- Public Member Functions inherited from vcl::comp::ParentMeshPointer< MeshType >
 ParentMeshPointer (const ParentMeshPointer< MeshType > &)
 
 ParentMeshPointer (ParentMeshPointer< MeshType > &&)
 
ParentMeshPointeroperator= (const ParentMeshPointer< MeshType > &)
 
constexpr MeshType * parentMesh ()
 
constexpr const MeshType * parentMesh () const
 

Private Types

using VRefs = typename Edge::VertexReferences
 

Additional Inherited Members

- Static Public Attributes inherited from vcl::Element< ElemId::EDGE, MeshType, Comps... >
static const uint ELEMENT_ID
 
- Protected Member Functions inherited from vcl::comp::ParentMeshPointer< MeshType >
void setParentMesh (void *parentMesh)
 

Detailed Description

template<typename MeshType, typename... Comps>
class vcl::Edge< MeshType, Comps >

The Edge class represents an Edge element of the vcl::Mesh class.

Using the EdgeContainer class, it is possible to add a vector of Edge elements to a mesh, and manage them with the member functions exposed by the EdgeContainer. Each Edge element exposes all the member functions of its Component types.

Template Parameters
MeshTypeThe type of the parent mesh.
CompsThe types of the components of the element.

Constructor & Destructor Documentation

◆ Edge()

template<typename MeshType , typename... Comps>
vcl::Edge< MeshType, Comps >::Edge ( )
default

Empty constructor.

Calls automatically all the empty constructors of all the components available in the Edge (for all the components non-available, their empty constructor is called only when they become available).

Member Function Documentation

◆ setVertices() [1/2]

template<typename MeshType , typename... Comps>
void vcl::Edge< MeshType, Comps >::setVertices ( uint  vi0,
uint  vi1 
)
inline

Sets the vertices of the edge.

Parameters
[in]vi0the index first vertex of the edge.
[in]vi1the index second vertex of the edge.

◆ setVertices() [2/2]

template<typename MeshType , typename... Comps>
void vcl::Edge< MeshType, Comps >::setVertices ( VertexType *  v0,
VertexType *  v1 
)
inline

Sets the vertices of the edge.

Parameters
[in]v0the first vertex of the edge.
[in]v1the second vertex of the edge.

The documentation for this class was generated from the following file: