Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Attributes | List of all members
bitpit::STLBase Class Reference

Base class for the STL writer and the STL reader. More...

Inheritance diagram for bitpit::STLBase:
Inheritance graph
[legend]

Public Types

enum  Format { FormatUnknown = -1 , FormatASCII , FormatBinary }
 

Public Member Functions

const std::string & getFilename () const
 
Format getFormat () const
 

Protected Types

typedef float BINARY_REAL32
 
typedef uint16_t BINARY_UINT16
 
typedef uint32_t BINARY_UINT32
 
typedef uint8_t BINARY_UINT8
 

Protected Member Functions

 STLBase (const std::string &filename)
 
 STLBase (const std::string &filename, Format format)
 
void setFilename (const std::string &filename)
 
void setFormat (Format format)
 

Static Protected Attributes

static const std::string ASCII_FACET_BEGIN = "facet"
 
static const std::string ASCII_FACET_END = "endfacet"
 
static const std::string ASCII_FILE_BEGIN = STLBase::ASCII_SOLID_BEGIN
 
static const std::string ASCII_FILE_END = STLBase::ASCII_SOLID_END
 
static const std::size_t ASCII_MINIMUM_SIZE = STLBase::ASCII_FILE_BEGIN.length() + STLBase::ASCII_FILE_END.length()
 
static const std::string ASCII_SOLID_BEGIN = "solid"
 
static const std::string ASCII_SOLID_END = "endsolid"
 
static const std::size_t BINARY_FACET_SIZE = 3 * sizeof(BINARY_REAL32) + 3 * 3 * sizeof(BINARY_REAL32) + sizeof(BINARY_UINT16)
 
static const std::size_t BINARY_HEADER_SIZE = 80 * sizeof(STLBase::BINARY_UINT8)
 
static const std::size_t BINARY_MINIMUM_SIZE = STLBase::BINARY_HEADER_SIZE + sizeof(STLBase::BINARY_UINT32)
 

Detailed Description

Base class for the STL writer and the STL reader.

Definition at line 39 of file STL.hpp.

Member Typedef Documentation

◆ BINARY_REAL32

typedef float bitpit::STLBase::BINARY_REAL32
protected

Definition at line 57 of file STL.hpp.

◆ BINARY_UINT16

typedef uint16_t bitpit::STLBase::BINARY_UINT16
protected

Definition at line 55 of file STL.hpp.

◆ BINARY_UINT32

typedef uint32_t bitpit::STLBase::BINARY_UINT32
protected

Definition at line 56 of file STL.hpp.

◆ BINARY_UINT8

typedef uint8_t bitpit::STLBase::BINARY_UINT8
protected

Definition at line 54 of file STL.hpp.

Member Enumeration Documentation

◆ Format

enum bitpit::STLBase::Format

Definition at line 42 of file STL.hpp.

Constructor & Destructor Documentation

◆ STLBase() [1/2]

bitpit::STLBase::STLBase ( const std::string & filename)
protected

Constructor.

Parameters
filenameis the name of the STL file

Definition at line 68 of file STL.cpp.

◆ STLBase() [2/2]

bitpit::STLBase::STLBase ( const std::string & filename,
Format format )
protected

Constructor.

Parameters
filenameis the name of the STL file
formatis the format of the STL file

Definition at line 80 of file STL.cpp.

Member Function Documentation

◆ getFilename()

const std::string & bitpit::STLBase::getFilename ( ) const

Get name of the STL file.

Returns
The name of the STL file.

Definition at line 91 of file STL.cpp.

◆ getFormat()

STLBase::Format bitpit::STLBase::getFormat ( ) const

Get format of the STL file.

Returns
The format of the STL file.

Definition at line 111 of file STL.cpp.

◆ setFilename()

void bitpit::STLBase::setFilename ( const std::string & filename)
protected

Set the name of the STL file.

Parameters
filenameis the name that will be set

Definition at line 101 of file STL.cpp.

◆ setFormat()

void bitpit::STLBase::setFormat ( STLBase::Format format)
protected

Set the format of the STL file.

Parameters
formatis the format that will be set

Definition at line 121 of file STL.cpp.

Member Data Documentation

◆ ASCII_FACET_BEGIN

const std::string bitpit::STLBase::ASCII_FACET_BEGIN = "facet"
staticprotected

Definition at line 65 of file STL.hpp.

◆ ASCII_FACET_END

const std::string bitpit::STLBase::ASCII_FACET_END = "endfacet"
staticprotected

Definition at line 66 of file STL.hpp.

◆ ASCII_FILE_BEGIN

const std::string bitpit::STLBase::ASCII_FILE_BEGIN = STLBase::ASCII_SOLID_BEGIN
staticprotected

Definition at line 67 of file STL.hpp.

◆ ASCII_FILE_END

const std::string bitpit::STLBase::ASCII_FILE_END = STLBase::ASCII_SOLID_END
staticprotected

Definition at line 68 of file STL.hpp.

◆ ASCII_MINIMUM_SIZE

const std::size_t bitpit::STLBase::ASCII_MINIMUM_SIZE = STLBase::ASCII_FILE_BEGIN.length() + STLBase::ASCII_FILE_END.length()
staticprotected

Definition at line 69 of file STL.hpp.

◆ ASCII_SOLID_BEGIN

const std::string bitpit::STLBase::ASCII_SOLID_BEGIN = "solid"
staticprotected

Definition at line 63 of file STL.hpp.

◆ ASCII_SOLID_END

const std::string bitpit::STLBase::ASCII_SOLID_END = "endsolid"
staticprotected

Definition at line 64 of file STL.hpp.

◆ BINARY_FACET_SIZE

const std::size_t bitpit::STLBase::BINARY_FACET_SIZE = 3 * sizeof(BINARY_REAL32) + 3 * 3 * sizeof(BINARY_REAL32) + sizeof(BINARY_UINT16)
staticprotected

Definition at line 61 of file STL.hpp.

◆ BINARY_HEADER_SIZE

const std::size_t bitpit::STLBase::BINARY_HEADER_SIZE = 80 * sizeof(STLBase::BINARY_UINT8)
staticprotected

Definition at line 59 of file STL.hpp.

◆ BINARY_MINIMUM_SIZE

const std::size_t bitpit::STLBase::BINARY_MINIMUM_SIZE = STLBase::BINARY_HEADER_SIZE + sizeof(STLBase::BINARY_UINT32)
staticprotected

Definition at line 60 of file STL.hpp.


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