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

Handles walkmesh files. More...

#include <VGearsWalkmeshFile.h>

Inheritance diagram for VGears::WalkmeshFile:
Collaboration diagram for VGears::WalkmeshFile:

Public Types

typedef ::WalkmeshTriangle Triangle
 
typedef std::vector< TriangleTriangleList
 

Public Member Functions

 WalkmeshFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
 Constructor. More...
 
virtual ~WalkmeshFile ()
 Destructor. More...
 
virtual TriangleListGetTriangles ()
 Retrieves the list of triangles. 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 () 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

TriangleList triangles_
 

Detailed Description

Handles walkmesh files.

Member Typedef Documentation

◆ Triangle

◆ TriangleList

Constructor & Destructor Documentation

◆ WalkmeshFile()

VGears::WalkmeshFile::WalkmeshFile ( 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 creating 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.

◆ ~WalkmeshFile()

VGears::WalkmeshFile::~WalkmeshFile ( )
virtual

Destructor.

Member Function Documentation

◆ calculateSize()

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

Calculates the size of the palette.

Returns
The size of the palette.
Todo:
Units?

◆ GetTriangles()

WalkmeshFile::TriangleList & VGears::WalkmeshFile::GetTriangles ( )
virtual

Retrieves the list of triangles.

◆ loadImpl()

void VGears::WalkmeshFile::loadImpl ( void  )
overrideprotectedvirtual

Loads the file.

◆ unloadImpl()

void VGears::WalkmeshFile::unloadImpl ( void  )
overrideprotectedvirtual

Unloads the file.

Member Data Documentation

◆ RESOURCE_TYPE

const String VGears::WalkmeshFile::RESOURCE_TYPE
static

The type of resource.

◆ triangles_

TriangleList VGears::WalkmeshFile::triangles_
private

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