MIRA
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
MeshFactory Class Reference

Singleton that allows to load arbitrary meshes from file in different formats. More...

#include <visualization/3d/MeshFactory.h>

Inheritance diagram for MeshFactory:
Inheritance graph
[legend]

Classes

struct  MeshFormatInfo
 Provides information for each format including a human readable description (e.g. More...
 

Public Types

typedef Base::Type Type
 

Public Member Functions

std::vector< MeshFormatInfogetSupportedFormats ()
 
Ogre::MeshPtr loadMesh (const std::string &filename)
 Loads a mesh from the specified file. More...
 

Static Public Member Functions

static Typeinstance ()
 Returns a reference to the singleton instance. More...
 
static bool isDestroyed ()
 Returns true, if the singleton was already destroyed. More...
 

Static Protected Member Functions

static TypemakeInstance ()
 
static void destroyInstance (void)
 

Detailed Description

Singleton that allows to load arbitrary meshes from file in different formats.

The supported file format depend on the available MeshLoader plugins. Each MeshLoader plugin can handle one or more different mesh file formats. There are three default MeshLoader plugins that can load:

In order to use the MeshFactory, manifest files for MeshLoader plugins must have been loaded. E.g. if the program does not instantiate a Framework, it needs to call loadManifests() (ManifestAgent.h) explicitly.

Member Typedef Documentation

◆ Type

typedef Base::Type Type
inherited

Member Function Documentation

◆ getSupportedFormats()

std::vector<MeshFormatInfo> getSupportedFormats ( )
Returns
Returns the supported mesh formats that can be loaded with all known plugins.

◆ loadMesh()

Ogre::MeshPtr loadMesh ( const std::string &  filename)

Loads a mesh from the specified file.

All supported mesh files formats can be queried using getSupportedFormats().

Exceptions
XIOIf the mesh can not be loaded or the format is not supported.

◆ instance()

static Type& instance ( )
inlinestaticinherited

Returns a reference to the singleton instance.

Exceptions
XSingletonIf the singleton was already destroyed (dead reference) or not yet created (when using ExplicitInstantiation).

◆ isDestroyed()

static bool isDestroyed ( )
inlinestaticinherited

Returns true, if the singleton was already destroyed.

Trying to access it will result in an exception.

◆ makeInstance()

static Type* makeInstance ( )
inlinestaticprotectedinherited

◆ destroyInstance()

static void destroyInstance ( void  )
inlinestaticprotectedinherited

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