## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iModelLoader Struct Reference
[Loading & Saving support]

Some loader plugins implement this as an easier way to load a factory from code. More...

`#include <imap/modelload.h>`

Inheritance diagram for iModelLoader:

[legend]
List of all members.

## Public Member Functions

virtual bool | IsRecognized (iDataBuffer *buffer)=0
| Test if the model is recognized by this model loader.
virtual bool | IsRecognized (const char *filename)=0
| Test if the model is recognized by this model loader.
virtual iMeshFactoryWrapper * | Load (const char *factname, iDataBuffer *buffer)=0
| Create a mesh factory and load the given model into it.
virtual iMeshFactoryWrapper * | Load (const char *factname, const char *filename)=0
| Create a mesh factory and load the given model into it.

## Detailed Description

Some loader plugins implement this as an easier way to load a factory from code.

Main creators of instances implementing this interface:

- gmesh3ds plugin (crystalspace.mesh.loader.factory.genmesh.3ds)
- spr3md2 plugin (crystalspace.mesh.loader.factory.sprite.3d.md2)

Main ways to get pointers to this interface:

- csLoadPlugin()

Definition at line 44 of file modelload.h.

## Member Function Documentation

virtual bool iModelLoader::IsRecognized | ( | iDataBuffer * | buffer | ) | `[pure virtual]`

| Test if the model is recognized by this model loader.

virtual bool iModelLoader::IsRecognized | ( | const char * | filename | ) | `[pure virtual]`

| Test if the model is recognized by this model loader.

virtual iMeshFactoryWrapper* iModelLoader::Load | ( | const char * | factname,
|  | iDataBuffer * | buffer
| ) | `[pure virtual]`

Create a mesh factory and load the given model into it.

Parameters:

  | factname | The name of the factory.
  | buffer | The buffer containing the file.

Returns:
  a mesh factory wrapper on success or otherwise 0. The error will be reported to the reporter.

virtual iMeshFactoryWrapper* iModelLoader::Load | ( | const char * | factname,
|  | const char * | filename
| ) | `[pure virtual]`

Create a mesh factory and load the given model into it.

Parameters:

  | factname | The name of the factory.
  | filename | The VFS name of the file.

Returns:
  a mesh factory wrapper on success or otherwise 0. The error will be reported to the reporter.

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

- imap/modelload.h