EBGeometry 1.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
STL< T > Class Template Reference

Class for storing contents of STL files. More...

#include <EBGeometry_STL.hpp>

Public Member Functions

 STL () noexcept
 Default constructor. Initializes empty member data holder.
 
 STL (const std::string a_id) noexcept
 Constructor. Initializes empty vertices and facets but sets the STL ID (usually the file name.
 
virtual ~STL () noexcept
 Destructor. Clears all data.
 
std::string & getID () noexcept
 Get the identifier for this object.
 
const std::string & getID () const noexcept
 Get the identifier for this object.
 
std::vector< Vec3T< T > > & getVertexCoordinates () noexcept
 Get the vertex coordinates.
 
const std::vector< Vec3T< T > > & getVertexCoordinates () const noexcept
 Get the vertex coordinates.
 
std::vector< std::vector< size_t > > & getFacets () noexcept
 Get the triangle facet indices.
 
const std::vector< std::vector< size_t > > & getFacets () const noexcept
 Get the triangle facet indices.
 
template<typename Meta >
std::shared_ptr< EBGeometry::DCEL::MeshT< T, Meta > > convertToDCEL () const noexcept
 Turn the STL mesh into a DCEL mesh.
 

Protected Attributes

std::string m_id
 STL object ID.
 
std::vector< Vec3T< T > > m_vertexCoordinates
 Vertex coordinates.
 
std::vector< std::vector< size_t > > m_facets
 Triangle facets.
 

Detailed Description

template<typename T>
class STL< T >

Class for storing contents of STL files.

This structure is simply used as conversion utility between STL files and various EBGeometry objects (triangle soups, DCEL meshes, etc).

Note
T is the precision used for storing the mesh.

Constructor & Destructor Documentation

◆ STL()

template<typename T >
STL< T >::STL ( const std::string  a_id)
noexcept

Constructor. Initializes empty vertices and facets but sets the STL ID (usually the file name.

Parameters
[in]a_idIdentifier for STL object

Member Function Documentation

◆ convertToDCEL()

template<typename T >
template<typename Meta >
std::shared_ptr< EBGeometry::DCEL::MeshT< T, Meta > > STL< T >::convertToDCEL ( ) const
noexcept

Turn the STL mesh into a DCEL mesh.

Note
This call does not populate any meta-data in the DCEL mesh structures.

◆ getFacets() [1/2]

template<typename T >
const std::vector< std::vector< size_t > > & STL< T >::getFacets ( ) const
noexcept

Get the triangle facet indices.

Returns
m_facets

◆ getFacets() [2/2]

template<typename T >
std::vector< std::vector< size_t > > & STL< T >::getFacets ( )
noexcept

Get the triangle facet indices.

Returns
m_facets

◆ getVertexCoordinates() [1/2]

template<typename T >
const std::vector< Vec3T< T > > & STL< T >::getVertexCoordinates ( ) const
noexcept

Get the vertex coordinates.

Returns
m_vertexCoordinates

◆ getVertexCoordinates() [2/2]

template<typename T >
std::vector< Vec3T< T > > & STL< T >::getVertexCoordinates ( )
noexcept

Get the vertex coordinates.

Returns
m_vertexCoordinates

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