V-Gears 0
Free Final Fantasy VII engine.
VGears::ModelListFile Class Reference

Handles model list files. More...

#include <FF7ModelListFile.h>

Inheritance diagram for VGears::ModelListFile:
Collaboration diagram for VGears::ModelListFile:

Classes

struct  AnimationDescription
 An animation description. More...
 
struct  ModelDescription
 A model. More...
 

Public Types

enum  ModelType { PLAYER = 0 , NPC = 1 , UNKNOWN }
 Types of models. More...
 
typedef std::vector< AnimationDescriptionAnimationList
 
typedef std::vector< ModelDescriptionModelList
 

Public Member Functions

 ModelListFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
 Constructor. More...
 
virtual ~ModelListFile ()
 Destructor. More...
 
virtual uint16 GetScale () const
 Retrieves the scale for the models. More...
 
virtual void SetScale (uint16 scale)
 Sets the scale for the models. More...
 
virtual ModelListGetModels ()
 Retrieves the model list. More...
 
- Public Member Functions inherited from VGears::Resource
 Resource (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool manual, Ogre::ManualResourceLoader *loader)
 Constructor. More...
 
virtual ~Resource ()=default
 Destructor. More...
 

Static Public Attributes

static const String RESOURCE_TYPE
 The type of resource. More...
 

Protected Member Functions

virtual void loadImpl () override
 Loads the file. More...
 
virtual void unloadImpl () override
 Unloads the file. More...
 
virtual size_t calculateSize (void) const
 Calculates the size of the palette. More...
 
- Protected Member Functions inherited from VGears::Resource
virtual Ogre::DataStreamPtr openResource ()
 Opens the resource. More...
 

Private Attributes

uint16 scale_
 The models scale. More...
 
ModelList models_
 The list of models. More...
 

Detailed Description

Handles model list files.

Member Typedef Documentation

◆ AnimationList

◆ ModelList

Member Enumeration Documentation

◆ ModelType

Types of models.

Enumerator
PLAYER 

Playable character.

NPC 

Non playable character.

UNKNOWN 

Unknown character type.

Constructor & Destructor Documentation

◆ ModelListFile()

VGears::ModelListFile::ModelListFile ( Ogre::ResourceManager *  creator,
const String name,
Ogre::ResourceHandle  handle,
const String group,
bool  is_manual = false,
Ogre::ManualResourceLoader *  loader = NULL 
)

Constructor.

Parameters
[in]creatorPointer to the ResourceManager that is this resource.
[in]nameThe unique name of the resource.
[in]handle
Todo:
Understand and document.
Parameters
[in]groupThe name of the resource group to which this resource belong.
[in]is_manualTrue if the resource is manually loaded, false otherwise.
[in]loaderPointer to a ManualResourceLoader implementation which will be called when the Resource wishes to load (should be supplied if is_manual is set to true). It can be null, but the Resource will never be able to reload if anything ever causes it to unload. Therefore provision of a proper ManualResourceLoader instance is strongly recommended.

◆ ~ModelListFile()

VGears::ModelListFile::~ModelListFile ( )
virtual

Destructor.

Member Function Documentation

◆ calculateSize()

size_t VGears::ModelListFile::calculateSize ( void  ) const
protectedvirtual

Calculates the size of the palette.

Returns
The size of the palette.
Todo:
Units?

◆ GetModels()

ModelListFile::ModelList & VGears::ModelListFile::GetModels ( )
virtual

Retrieves the model list.

◆ GetScale()

uint16 VGears::ModelListFile::GetScale ( ) const
virtual

Retrieves the scale for the models.

Returns
The scale.

◆ loadImpl()

void VGears::ModelListFile::loadImpl ( )
overrideprotectedvirtual

Loads the file.

◆ SetScale()

void VGears::ModelListFile::SetScale ( uint16  scale)
virtual

Sets the scale for the models.

Parameters
[in]scaleThe scale.

◆ unloadImpl()

void VGears::ModelListFile::unloadImpl ( )
overrideprotectedvirtual

Unloads the file.

Member Data Documentation

◆ models_

ModelList VGears::ModelListFile::models_
private

The list of models.

◆ RESOURCE_TYPE

const String VGears::ModelListFile::RESOURCE_TYPE
static

The type of resource.

◆ scale_

uint16 VGears::ModelListFile::scale_
private

The models scale.

Todo:
Each model has it's own scale. Is this some kind of global scale? If so, is it to be applied over each model scale, or instead of it?

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