Helios++
Helios software for LiDAR simulations
WavefrontObjFileLoader Class Reference

OBJ file loader filter. More...

#include <WavefrontObjFileLoader.h>

Inheritance diagram for WavefrontObjFileLoader:
Collaboration diagram for WavefrontObjFileLoader:

Public Member Functions

 WavefrontObjFileLoader ()
 Constructor for OBJ file loader filter. More...
 
ScenePartrun ()
 
void loadObj (std::string const &pathString, bool yIsUp)
 Load an OBJ file.
 
- Public Member Functions inherited from AbstractGeometryFilter
 AbstractGeometryFilter (ScenePart *parts_)
 Base constructor for asset loading filters. More...
 
std::shared_ptr< MaterialgetMaterial (std::string materialName)
 Retrieve requested material by name. More...
 
std::vector< std::shared_ptr< Material > > parseMaterials ()
 Parse materials specified through "matfile", which can be concreted through "matname" parameter. It can also handle random materials when parameter "randomMaterials" is set. More...
 

Static Public Member Functions

static void buildPrimitiveVertex (Vertex &dstVert, Vertex &srcVert, int texIdx, int normalIdx, std::vector< dvec2 > const &texcoords, std::vector< dvec3 > const &normals)
 Build dstVertex considering data of srcVert. More...
 

Private Attributes

std::string filePathString = ""
 Path to the OBJ file.
 

Additional Inherited Members

- Public Attributes inherited from AbstractGeometryFilter
OGRSpatialReference * sourceCRS
 
std::map< std::string, ObjectT > params
 Available parameters.
 
std::map< std::string, Materialmaterials
 Available materials.
 
ScenePartprimsOut = nullptr
 ScenePart used to build the output. Not strictly necessary for any filter.
 

Detailed Description

OBJ file loader filter.

Constructor & Destructor Documentation

◆ WavefrontObjFileLoader()

WavefrontObjFileLoader::WavefrontObjFileLoader ( )
inline

Constructor for OBJ file loader filter.

See also
AbstractGeometryFilter::AbstractGeometryFilter(ScenePart*)

Member Function Documentation

◆ buildPrimitiveVertex()

void WavefrontObjFileLoader::buildPrimitiveVertex ( Vertex dstVert,
Vertex srcVert,
int  texIdx,
int  normalIdx,
std::vector< dvec2 > const &  texcoords,
std::vector< dvec3 > const &  normals 
)
static

Build dstVertex considering data of srcVert.

Parameters
dstVertVertex to be built. It belongs to a primitive.
srcVertVertex used to built. It comes from the set of vertices in obj file.
texIdxIndex of texture to be used
normalIdxIndex of normal to be used.
texcoordsVector of texture coordinates.
normalsVector of normals. It contains the normal for each vertex.

◆ run()

ScenePart * WavefrontObjFileLoader::run ( )
virtual

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