RobWorkProject  23.9.11-
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
Model3DLoader Class Referenceabstract

interface for classes that are able to load 3d models More...

#include <Model3DLoader.hpp>

Inherited by Loader3DS, LoaderAC3D, LoaderAssimp, LoaderOBJ, LoaderPCD, LoaderSTEP, LoaderSTL, and LoaderTRI.

Classes

class  Factory
 a factory for Model3DLoaders. This factory defines an extension point for Model3DLoaders. More...
 

Public Types

typedef rw::core::Ptr< Model3DLoaderPtr
 smart pointer type
 

Public Member Functions

virtual ~Model3DLoader ()
 destructor
 
virtual rw::geometry::Model3D::Ptr load (const std::string &filename)=0
 load a Model3D from file filename More...
 
virtual std::vector< std::string > getModelFormats ()=0
 get the list of supported 3D model formats (as extensions) More...
 
bool isSupported (std::string format)
 Check if the loader support a specific format. More...
 
void setDefaultName (std::string name)
 set a name that the loader can use, if it can't find anyother More...
 
void setDefaultMaterial (rw::geometry::Model3D::Material mat)
 set which material to use if the File dosen't include a material/ texturing it self More...
 

Protected Attributes

std::string _defaultName
 
rw::geometry::Model3D::Material _defaultMat
 

Detailed Description

interface for classes that are able to load 3d models

Member Function Documentation

◆ getModelFormats()

virtual std::vector<std::string> getModelFormats ( )
pure virtual

get the list of supported 3D model formats (as extensions)

Returns

Implemented in LoaderTRI, LoaderSTL, LoaderSTEP, LoaderPCD, LoaderOBJ, LoaderAssimp, LoaderAC3D, and Loader3DS.

◆ isSupported()

bool isSupported ( std::string  format)

Check if the loader support a specific format.

Parameters
format[in] the extension to check if is supported
Returns
true if format is supported

◆ load()

virtual rw::geometry::Model3D::Ptr load ( const std::string &  filename)
pure virtual

load a Model3D from file filename

Parameters
filename[in] name of file to load
Returns
a model3d if loaded successfully else NULL (or exception)

Implemented in LoaderTRI, LoaderSTL, LoaderSTEP, LoaderPCD, LoaderOBJ, LoaderAssimp, LoaderAC3D, and Loader3DS.

◆ setDefaultMaterial()

void setDefaultMaterial ( rw::geometry::Model3D::Material  mat)

set which material to use if the File dosen't include a material/ texturing it self

Parameters
mat

◆ setDefaultName()

void setDefaultName ( std::string  name)

set a name that the loader can use, if it can't find anyother

Parameters
name

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