Public Member Functions | Private Member Functions | List of all members
StlParser Class Reference

#include <stl_parser.hpp>

Inheritance diagram for StlParser:
Inheritance graph
[legend]

Public Member Functions

int8_t read (std::vector< TriangleSupport > &tri_vec)
 
 StlParser (const std::string &file_path)
 
virtual ~StlParser ()
 
- Public Member Functions inherited from ParserBase
template<typename T >
int8_t createBVH (fcl::BVHModel< T > &bvh)
 
template<typename T >
int8_t createBVH (std::shared_ptr< fcl::BVHModel< T > > ptr_bvh)
 
const std::string getFilePath () const
 
 ParserBase (const std::string &file_path)
 
virtual ~ParserBase ()
 

Private Member Functions

double toDouble (char *facet, uint8_t start_idx)
 
fcl::Vec3f toVec3f (char *facet)
 

Additional Inherited Members

- Protected Attributes inherited from ParserBase
std::string file_path_
 

Detailed Description

Definition at line 23 of file stl_parser.hpp.

Constructor & Destructor Documentation

StlParser::StlParser ( const std::string &  file_path)
inline

Definition at line 32 of file stl_parser.hpp.

virtual StlParser::~StlParser ( )
inlinevirtual

Definition at line 38 of file stl_parser.hpp.

Member Function Documentation

int8_t StlParser::read ( std::vector< TriangleSupport > &  tri_vec)
virtual

Hard coded STL file parsing according to binary file specification in https://en.wikipedia.org/wiki/STL_%28file_format%29.

Implements ParserBase.

Definition at line 31 of file stl_parser.cpp.

double StlParser::toDouble ( char *  facet,
uint8_t  start_idx 
)
private

Conversion of a 32 bit binary value into double.

Parameters
facetCurrent face / triangle.
start_idxIndex in binary face description.
Returns
Double value.

Definition at line 112 of file stl_parser.cpp.

fcl::Vec3f StlParser::toVec3f ( char *  facet)
private

Converter method from position in file to a 3d vector.

Parameters
facetPointer to the current face / triangle in file.
Returns
An fcl::Vec3f containing the 3 vertices describing a triangle.

Definition at line 96 of file stl_parser.cpp.


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


cob_obstacle_distance
Author(s): Marco Bezzon
autogenerated on Thu Apr 8 2021 02:39:47