open_iA  2019.12
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Classes | Macros | Functions | Variables
iASTLLoader.cpp File Reference
#include "../include/iASTLLoader.h"
#include "../../iADreamCaster.h"
#include <io/iAFileUtils.h>
#include <vtksys/SystemTools.hxx>
#include <QString>
#include <fstream>
Include dependency graph for iASTLLoader.cpp:

Classes

struct  iATri
 Structure representing triangle of stl file. Just a container. Nothing special. Contains data about triangle's normal and 3 vetrices. More...
 

Macros

#define ASCII_FILE   1
 
#define BINARY_FILE   0
 

Functions

void computeBBox (std::vector< iAtriangle * > &, std::vector< iAVec3f * > &vertices, iAaabb &box, float &scale_coef, float *translate3f)
 
int readSTLFile (QString const &filename, std::vector< iAtriangle * > &stlMesh, std::vector< iAVec3f * > &vertices, iAaabb &box)
 Load mesh from stl file by its file name. More...
 

Variables

iADreamCasterdcast
 used just for logging, to call log() method More...
 

Macro Definition Documentation

◆ ASCII_FILE

#define ASCII_FILE   1

◆ BINARY_FILE

#define BINARY_FILE   0

Function Documentation

◆ computeBBox()

void computeBBox ( std::vector< iAtriangle * > &  ,
std::vector< iAVec3f * > &  vertices,
iAaabb box,
float &  scale_coef,
float *  translate3f 
)
inline

◆ readSTLFile()

int readSTLFile ( QString const &  filename,
std::vector< iAtriangle * > &  stlMesh,
std::vector< iAVec3f * > &  vertices,
iAaabb box 
)

Load mesh from stl file by its file name.

Parameters
filenamefile name of stl file
stlMeshthe triangles of the mesh
verticesthe vertices of the mesh
boxthe bounding box of the mesh
Returns
0 if reading succeeded, otherwise an error code

< loaded mesh's scale coefficient

< loaded mesh's axes offsets

< reader used to load mesh from stl file

Variable Documentation

◆ dcast

iADreamCaster* dcast

used just for logging, to call log() method