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

Handles 2D background files. More...

#include <VGearsBackground2DFile.h>

Inheritance diagram for VGears::Background2DFile:
Collaboration diagram for VGears::Background2DFile:

Public Types

typedef std::vector< TileTileList
 

Public Member Functions

 Background2DFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=nullptr)
 Constructor. More...
 
virtual ~Background2DFile ()
 Destructor. More...
 
virtual void SetTextureName (const String &texture_name)
 Sets the texture name. More...
 
virtual String GetTextureName () const
 Retrieves the texture name. More...
 
virtual void SetRange (const Ogre::Vector4 &range)
 Sets the background range. More...
 
virtual Ogre::Vector4 GetRange () const
 Retrieves the background range. More...
 
virtual void SetClip (const Ogre::Vector2 &clip)
 Sets the background clip. More...
 
virtual Ogre::Vector2 GetClip () const
 Retrieves the background clip. More...
 
virtual void SetPosition (const Ogre::Vector3 &position)
 Sets the background position. More...
 
virtual Ogre::Vector3 GetPosition () const
 Retrieves the background clip. More...
 
virtual void SetOrientation (const Ogre::Quaternion &orientation)
 Sets the background orientation. More...
 
virtual Ogre::Quaternion GetOrientation () const
 Retrieves the background orientation. More...
 
virtual void SetFov (const Ogre::Radian &fov)
 Sets the background field of view. More...
 
virtual Ogre::Radian GetFov () const
 Retrieves the background field of view. More...
 
virtual TileListGetTiles ()
 Retrieves the list of tiles. 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 override
 Calculates the size of the background. More...
 
- Protected Member Functions inherited from VGears::Resource
virtual Ogre::DataStreamPtr openResource ()
 Opens the resource. More...
 

Private Attributes

String texture_name_
 The texture name. More...
 
Ogre::Vector2 clip_
 The background clip. More...
 
Ogre::Vector4 range_
 The background range. More...
 
Ogre::Vector3 position_
 The background position. More...
 
Ogre::Quaternion orientation_
 The background orientation. More...
 
Ogre::Radian fov_
 The background field of view. More...
 
TileList tiles_
 The list of tiles. More...
 

Detailed Description

Handles 2D background files.

Todo:
What's the difference with VGearsBackgroundFile.h?

Member Typedef Documentation

◆ TileList

Constructor & Destructor Documentation

◆ Background2DFile()

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

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.

◆ ~Background2DFile()

VGears::Background2DFile::~Background2DFile ( )
virtual

Destructor.

Member Function Documentation

◆ calculateSize()

size_t VGears::Background2DFile::calculateSize ( void  ) const
overrideprotectedvirtual

Calculates the size of the background.

Returns
The size of the background.
Todo:
Units?

◆ GetClip()

Ogre::Vector2 VGears::Background2DFile::GetClip ( ) const
virtual

Retrieves the background clip.

Returns
4-dimensional vector with the background clip.
Todo:
What is this clip?

◆ GetFov()

Ogre::Radian VGears::Background2DFile::GetFov ( ) const
virtual

Retrieves the background field of view.

Returns
The field of view angle.

◆ GetOrientation()

Ogre::Quaternion VGears::Background2DFile::GetOrientation ( ) const
virtual

Retrieves the background orientation.

Returns
The background orientation quaternion.

◆ GetPosition()

Ogre::Vector3 VGears::Background2DFile::GetPosition ( ) const
virtual

Retrieves the background clip.

Returns
4-dimensional vector with the background clip.
Todo:
What is this clip?

◆ GetRange()

Ogre::Vector4 VGears::Background2DFile::GetRange ( ) const
virtual

Retrieves the background range.

Returns
4-dimensional vector with the background range.
Todo:
What is this range?

◆ GetTextureName()

String VGears::Background2DFile::GetTextureName ( ) const
virtual

Retrieves the texture name.

Returns
The texture name.

◆ GetTiles()

Background2DFile::TileList & VGears::Background2DFile::GetTiles ( )
virtual

Retrieves the list of tiles.

◆ loadImpl()

void VGears::Background2DFile::loadImpl ( void  )
overrideprotectedvirtual

Loads the file.

◆ SetClip()

void VGears::Background2DFile::SetClip ( const Ogre::Vector2 &  clip)
virtual

Sets the background clip.

Parameters
[in]clipClip vector.
Todo:
What is this clip?

◆ SetFov()

void VGears::Background2DFile::SetFov ( const Ogre::Radian &  fov)
virtual

Sets the background field of view.

Parameters
[in]fovField of view angle.

◆ SetOrientation()

void VGears::Background2DFile::SetOrientation ( const Ogre::Quaternion &  orientation)
virtual

Sets the background orientation.

Parameters
[in]orientationThe new orientation.

◆ SetPosition()

void VGears::Background2DFile::SetPosition ( const Ogre::Vector3 &  position)
virtual

Sets the background position.

Parameters
[in]positionPosition vector.

◆ SetRange()

void VGears::Background2DFile::SetRange ( const Ogre::Vector4 &  range)
virtual

Sets the background range.

Parameters
[in]rangeRange vector.
Todo:
What is this range?

◆ SetTextureName()

void VGears::Background2DFile::SetTextureName ( const String texture_name)
virtual

Sets the texture name.

Parameters
[in]texture_nameThe name of the texture.

◆ unloadImpl()

void VGears::Background2DFile::unloadImpl ( void  )
overrideprotectedvirtual

Unloads the file.

Member Data Documentation

◆ clip_

Ogre::Vector2 VGears::Background2DFile::clip_
private

The background clip.

◆ fov_

Ogre::Radian VGears::Background2DFile::fov_
private

The background field of view.

◆ orientation_

Ogre::Quaternion VGears::Background2DFile::orientation_
private

The background orientation.

◆ position_

Ogre::Vector3 VGears::Background2DFile::position_
private

The background position.

◆ range_

Ogre::Vector4 VGears::Background2DFile::range_
private

The background range.

◆ RESOURCE_TYPE

const String VGears::Background2DFile::RESOURCE_TYPE
static

The type of resource.

◆ texture_name_

String VGears::Background2DFile::texture_name_
private

The texture name.

◆ tiles_

TileList VGears::Background2DFile::tiles_
private

The list of tiles.


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