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

Handles RDS files. More...

#include <VGearsRSDFile.h>

Inheritance diagram for VGears::RSDFile:
Collaboration diagram for VGears::RSDFile:

Public Types

typedef std::vector< StringTextureNameList
 
typedef std::vector< Ogre::MaterialPtr > MaterialList
 

Public Member Functions

 RSDFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=nullptr)
 Constructor. More...
 
virtual ~RSDFile ()
 Destructor. More...
 
virtual void SetPolygonName (const String &polygon_name)
 Sets the name of the polygon. More...
 
virtual void SetMaterialName (const String &material_name)
 Sets the material type. More...
 
virtual void SetGroupName (const String &group_name)
 Sets the group name. More...
 
virtual const StringGetPolygonName () const
 Retrieves the polygon name. More...
 
virtual const StringGetMaterialName () const
 Retrieves the material name. More...
 
virtual const StringGetGroupName () const
 Retrieves the group name. More...
 
virtual size_t GetTextureNameCount () const
 Counts the texture names. More...
 
virtual TextureNameListGetTextureNames ()
 Retrieves the list of texture names. More...
 
virtual String GetMaterialBaseName () const
 Retrieves the material base. More...
 

Static Public Attributes

static const String RESOURCE_TYPE
 The resource type. 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...
 
virtual void AddTexture (Ogre::Pass *pass, const size_t index) const
 Adds a texture. More...
 

Private Attributes

String polygon_name_
 The polygon names. More...
 
String material_name_
 The material type. More...
 
String group_name_
 The group name. More...
 
TextureNameList texture_names_
 The texture name. More...
 
MaterialList materials_
 The lsit of materials. More...
 

Detailed Description

Handles RDS files.

RSD files are product of the original PlayStation Psy-Q 3D development libraries. They are often exported by 3D modelers when converting from an LWO or DXF file to something more understandable by the PSX. They are in ascii, making it easy to edit by hand. When a 3D editor does an export, four text files are actually created, .rsd, .ply, .mat, and .grp. These can then be "compiled" into a binary .rsd file for the PSX. In the PC version of Final Fantasy 7, the text .rsd files are used while the other files were "compiled" into Polygon(.p) format.

Member Typedef Documentation

◆ MaterialList

typedef std::vector<Ogre::MaterialPtr> VGears::RSDFile::MaterialList

◆ TextureNameList

Constructor & Destructor Documentation

◆ RSDFile()

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

◆ ~RSDFile()

VGears::RSDFile::~RSDFile ( )
virtual

Destructor.

Member Function Documentation

◆ AddTexture()

void VGears::RSDFile::AddTexture ( Ogre::Pass *  pass,
const size_t  index 
) const
protectedvirtual

Adds a texture.

Parameters
[in,out]passRender pas options.
[in]indexIndex of the texture to add

◆ calculateSize()

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

Calculates the size of the palette.

Returns
The size of the palette.
Todo:
Units?

◆ GetGroupName()

const String & VGears::RSDFile::GetGroupName ( ) const
virtual

Retrieves the group name.

Returns
The group name.

◆ GetMaterialBaseName()

String VGears::RSDFile::GetMaterialBaseName ( ) const
virtual

Retrieves the material base.

Returns
The material base name.

◆ GetMaterialName()

const String & VGears::RSDFile::GetMaterialName ( ) const
virtual

Retrieves the material name.

Returns
The matyerial name.

◆ GetPolygonName()

const String & VGears::RSDFile::GetPolygonName ( ) const
virtual

Retrieves the polygon name.

Returns
The polygon name.

◆ GetTextureNameCount()

size_t VGears::RSDFile::GetTextureNameCount ( ) const
virtual

Counts the texture names.

Returns
The number of texture names.

◆ GetTextureNames()

RSDFile::TextureNameList & VGears::RSDFile::GetTextureNames ( )
virtual

Retrieves the list of texture names.

Returns
The list of texture names.

◆ loadImpl()

void VGears::RSDFile::loadImpl ( void  )
overrideprotectedvirtual

Loads the file.

◆ SetGroupName()

void VGears::RSDFile::SetGroupName ( const String group_name)
virtual

Sets the group name.

Parameters
[in]group_nameThe name for the group.

◆ SetMaterialName()

void VGears::RSDFile::SetMaterialName ( const String material_name)
virtual

Sets the material type.

Parameters
[in]material_nameThe material name.

◆ SetPolygonName()

void VGears::RSDFile::SetPolygonName ( const String polygon_name)
virtual

Sets the name of the polygon.

Parameters
[in]polygon_nameThe name for the polygon.

◆ unloadImpl()

void VGears::RSDFile::unloadImpl ( void  )
overrideprotectedvirtual

Unloads the file.

Member Data Documentation

◆ group_name_

String VGears::RSDFile::group_name_
private

The group name.

◆ material_name_

String VGears::RSDFile::material_name_
private

The material type.

◆ materials_

MaterialList VGears::RSDFile::materials_
private

The lsit of materials.

◆ polygon_name_

String VGears::RSDFile::polygon_name_
private

The polygon names.

◆ RESOURCE_TYPE

const Ogre::String VGears::RSDFile::RESOURCE_TYPE
static

The resource type.

◆ texture_names_

TextureNameList VGears::RSDFile::texture_names_
private

The texture name.


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