FIFE  be64c707dea6b3250bd4355bf5c825d25920087d
FIFE::ObjectLoader Class Reference

#include <objectloader.h>

+ Inheritance diagram for FIFE::ObjectLoader:
+ Collaboration diagram for FIFE::ObjectLoader:

Public Member Functions

 ObjectLoader (Model *model, VFS *vfs, ImageManager *imageManager, AnimationManager *animationManager, const AnimationLoaderPtr &animationLoader=AnimationLoaderPtr(), const AtlasLoaderPtr &atlasLoader=AtlasLoaderPtr())
 
 ~ObjectLoader ()
 
virtual void setAnimationLoader (const AnimationLoaderPtr &animationLoader)
 
virtual AnimationLoaderPtr getAnimationLoader ()
 
virtual void setAtlasLoader (const AtlasLoaderPtr &atlasLoader)
 
virtual AtlasLoaderPtr getAtlasLoader ()
 
virtual bool isLoadable (const std::string &filename) const
 
virtual void load (const std::string &filename)
 
void loadImportFile (const std::string &file, const std::string &directory="")
 used to load an object, atlas or animation file if directory is provided then file is assumed relative to directory More...
 
void loadImportDirectory (const std::string &directory)
 used to load a directory of object, atlas or animation files recursively More...
 
- Public Member Functions inherited from FIFE::IObjectLoader
virtual ~IObjectLoader ()
 

Private Attributes

Modelm_model
 
VFSm_vfs
 
ImageManagerm_imageManager
 
AnimationManagerm_animationManager
 
AnimationLoaderPtr m_animationLoader
 
AtlasLoaderPtr m_atlasLoader
 

Detailed Description

Definition at line 47 of file objectloader.h.

Constructor & Destructor Documentation

◆ ObjectLoader()

FIFE::ObjectLoader::ObjectLoader ( Model model,
VFS vfs,
ImageManager imageManager,
AnimationManager animationManager,
const AnimationLoaderPtr animationLoader = AnimationLoaderPtr(),
const AtlasLoaderPtr atlasLoader = AtlasLoaderPtr() 
)

◆ ~ObjectLoader()

FIFE::ObjectLoader::~ObjectLoader ( )

Definition at line 72 of file objectloader.cpp.

Member Function Documentation

◆ getAnimationLoader()

AnimationLoaderPtr FIFE::ObjectLoader::getAnimationLoader ( )
virtual
See also
IObjectLoader::getAnimationLoader

Implements FIFE::IObjectLoader.

Definition at line 82 of file objectloader.cpp.

References m_animationLoader.

◆ getAtlasLoader()

AtlasLoaderPtr FIFE::ObjectLoader::getAtlasLoader ( )
virtual
See also
IObjectLoader::getAtlasLoader

Implements FIFE::IObjectLoader.

Definition at line 92 of file objectloader.cpp.

References m_atlasLoader.

◆ isLoadable()

bool FIFE::ObjectLoader::isLoadable ( const std::string &  filename) const
virtual
See also
IObjectLoader::isLoadable

Implements FIFE::IObjectLoader.

Definition at line 96 of file objectloader.cpp.

References FIFE::_log, FL_ERR, FIFE::RawData::getDataLength(), m_vfs, FIFE::VFS::open(), and FIFE::RawData::readString().

Referenced by loadImportFile().

+ Here is the caller graph for this function:

◆ load()

void FIFE::ObjectLoader::load ( const std::string &  filename)
virtual
See also
IObjectLoader::load

Implements FIFE::IObjectLoader.

Definition at line 176 of file objectloader.cpp.

References FIFE::_log, FIFE::ActionVisual::addAnimation(), FIFE::Animation::addFrame(), FIFE::Object::addMultiPartCoordinate(), FIFE::Object::addMultiPartId(), FIFE::ObjectVisual::addStaticImage(), FIFE::Object::addWalkableArea(), FIFE::Action::adoptAudio(), FIFE::ImageManager::create(), FIFE::AnimationManager::create(), FIFE::ObjectVisual::create(), FIFE::ActionVisual::create(), FIFE::Object::createAction(), FIFE::Model::createObject(), FIFE::ImageManager::exists(), FL_ERR, FIFE::RawData::getDataLength(), FIFE::Animation::getDirection(), FIFE::Animation::getDuration(), FIFE::IResource::getHandle(), FIFE::Model::getObject(), FIFE::GetParentPath(), FIFE::Model::getPather(), FIFE::AnimationManager::getPtr(), FIFE::ImageManager::getPtr(), FIFE::Action::getVisual(), FIFE::Object::getVisual(), FIFE::HasParentPath(), FIFE::IAnimationLoader::isLoadable(), FIFE::IAnimationLoader::load(), loadImportDirectory(), loadImportFile(), m_animationLoader, m_animationManager, m_imageManager, m_model, m_vfs, FIFE::VFS::open(), FIFE::RawData::readString(), FIFE::Animation::setActionFrame(), FIFE::Object::setArea(), FIFE::Object::setBlocking(), FIFE::Object::setCellStackPosition(), FIFE::ActionAudio::setConeInnerAngle(), FIFE::ActionAudio::setConeOuterAngle(), FIFE::ActionAudio::setConeOuterGain(), FIFE::Object::setCost(), FIFE::Object::setCostId(), FIFE::ActionAudio::setDirection(), FIFE::Action::setDuration(), FIFE::Object::setFilename(), FIFE::ActionAudio::setGain(), FIFE::ActionAudio::setGroupName(), FIFE::ActionAudio::setLooping(), FIFE::ActionAudio::setMaxDistance(), FIFE::ActionAudio::setMaxGain(), FIFE::ActionAudio::setMinGain(), FIFE::Object::setPather(), FIFE::ActionAudio::setPitch(), FIFE::ActionAudio::setReferenceDistance(), FIFE::ActionAudio::setRelativePositioning(), FIFE::Object::setRestrictedRotation(), FIFE::ActionAudio::setRolloff(), FIFE::Object::setRotationAnchor(), FIFE::ActionAudio::setSoundFileName(), FIFE::Object::setSpeed(), FIFE::Object::setStatic(), FIFE::ActionAudio::setVelocity(), FIFE::Image::setXShift(), FIFE::Image::setYShift(), FIFE::Object::setZStepRange(), and FIFE::Image::useSharedImage().

Referenced by loadImportFile().

+ Here is the caller graph for this function:

◆ loadImportDirectory()

void FIFE::ObjectLoader::loadImportDirectory ( const std::string &  directory)

used to load a directory of object, atlas or animation files recursively

Definition at line 693 of file objectloader.cpp.

References FIFE::VFS::listDirectories(), FIFE::VFS::listFiles(), loadImportFile(), and m_vfs.

Referenced by load().

+ Here is the caller graph for this function:

◆ loadImportFile()

void FIFE::ObjectLoader::loadImportFile ( const std::string &  file,
const std::string &  directory = "" 
)

used to load an object, atlas or animation file if directory is provided then file is assumed relative to directory

Definition at line 675 of file objectloader.cpp.

References FIFE::IAnimationLoader::isLoadable(), FIFE::IAtlasLoader::isLoadable(), isLoadable(), load(), FIFE::IAnimationLoader::loadMultiple(), FIFE::IAtlasLoader::loadMultiple(), m_animationLoader, and m_atlasLoader.

Referenced by load(), and loadImportDirectory().

+ Here is the caller graph for this function:

◆ setAnimationLoader()

void FIFE::ObjectLoader::setAnimationLoader ( const AnimationLoaderPtr animationLoader)
virtual
See also
IObjectLoader::setAnimationLoader

Implements FIFE::IObjectLoader.

Definition at line 76 of file objectloader.cpp.

References m_animationLoader.

◆ setAtlasLoader()

void FIFE::ObjectLoader::setAtlasLoader ( const AtlasLoaderPtr atlasLoader)
virtual
See also
IObjectLoader::setAtlasLoader

Implements FIFE::IObjectLoader.

Definition at line 86 of file objectloader.cpp.

References m_atlasLoader.

Member Data Documentation

◆ m_animationLoader

AnimationLoaderPtr FIFE::ObjectLoader::m_animationLoader
private

◆ m_animationManager

AnimationManager* FIFE::ObjectLoader::m_animationManager
private

Definition at line 96 of file objectloader.h.

Referenced by load(), and ObjectLoader().

◆ m_atlasLoader

AtlasLoaderPtr FIFE::ObjectLoader::m_atlasLoader
private

Definition at line 98 of file objectloader.h.

Referenced by getAtlasLoader(), loadImportFile(), ObjectLoader(), and setAtlasLoader().

◆ m_imageManager

ImageManager* FIFE::ObjectLoader::m_imageManager
private

Definition at line 95 of file objectloader.h.

Referenced by load(), and ObjectLoader().

◆ m_model

Model* FIFE::ObjectLoader::m_model
private

Definition at line 93 of file objectloader.h.

Referenced by load(), and ObjectLoader().

◆ m_vfs

VFS* FIFE::ObjectLoader::m_vfs
private

Definition at line 94 of file objectloader.h.

Referenced by isLoadable(), load(), loadImportDirectory(), and ObjectLoader().


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