MPM-Geomechanics
Material Point Method for simulating geo-materials under large deformation conditions
Loading...
Searching...
No Matches
STLReader Class Reference

Class to read STL files. More...

#include <STLReader.h>

Public Member Functions

bool read (const std::string &filename)
 Read the STL file.
 
const std::vector< Triangle > & getTriangles () const
 Get the triangles of the STL mesh.
 
void removeTrianglesOutsideLimits (const Vector3d &min, const Vector3d &max)
 Remove triangles that have all vertices outside the specified bounding box.
 

Private Member Functions

bool readASCII (std::ifstream &file)
 Read the ASCII STL file.
 
bool readBinary (std::ifstream &file)
 Read the binary STL file.
 

Private Attributes

std::vector< Triangletriangles
 Vector containing the triangles.
 

Detailed Description

Class to read STL files.

Member Function Documentation

◆ getTriangles()

const std::vector< Triangle > & STLReader::getTriangles ( ) const

Get the triangles of the STL mesh.

Returns
Vector containing the triangles

◆ read()

bool STLReader::read ( const std::string & filename)

Read the STL file.

◆ readASCII()

bool STLReader::readASCII ( std::ifstream & file)
private

Read the ASCII STL file.

◆ readBinary()

bool STLReader::readBinary ( std::ifstream & file)
private

Read the binary STL file.

◆ removeTrianglesOutsideLimits()

void STLReader::removeTrianglesOutsideLimits ( const Vector3d & min,
const Vector3d & max )

Remove triangles that have all vertices outside the specified bounding box.

Parameters
minBounding box minimum (x_min, y_min, z_min)
maxBounding box maximum (x_max, y_max, z_max)

Member Data Documentation

◆ triangles

std::vector<Triangle> STLReader::triangles
private

Vector containing the triangles.


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