![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
Handles RDS files. More...
#include <VGearsRSDFile.h>
Public Types | |
typedef std::vector< String > | TextureNameList |
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 String & | GetPolygonName () const |
Retrieves the polygon name. More... | |
virtual const String & | GetMaterialName () const |
Retrieves the material name. More... | |
virtual const String & | GetGroupName () const |
Retrieves the group name. More... | |
virtual size_t | GetTextureNameCount () const |
Counts the texture names. More... | |
virtual TextureNameList & | GetTextureNames () |
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... | |
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.
typedef std::vector<Ogre::MaterialPtr> VGears::RSDFile::MaterialList |
typedef std::vector<String> VGears::RSDFile::TextureNameList |
VGears::RSDFile::RSDFile | ( | Ogre::ResourceManager * | creator, |
const String & | name, | ||
Ogre::ResourceHandle | handle, | ||
const String & | group, | ||
bool | is_manual = false , |
||
Ogre::ManualResourceLoader * | loader = nullptr |
||
) |
Constructor.
[in] | creator | Pointer to the ResourceManager that is creating this resource. |
[in] | name | The unique name of the resource. |
[in] | handle |
[in] | group | The name of the resource group to which this resource belong. |
[in] | is_manual | True if the resource is manually loaded, false otherwise. |
[in] | loader | Pointer 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. |
|
virtual |
Destructor.
|
protectedvirtual |
Adds a texture.
[in,out] | pass | Render pas options. |
[in] | index | Index of the texture to add |
|
protectedvirtual |
|
virtual |
Retrieves the group name.
|
virtual |
Retrieves the material base.
|
virtual |
Retrieves the material name.
|
virtual |
Retrieves the polygon name.
|
virtual |
Counts the texture names.
|
virtual |
Retrieves the list of texture names.
|
overrideprotectedvirtual |
Loads the file.
|
virtual |
Sets the group name.
[in] | group_name | The name for the group. |
|
virtual |
Sets the material type.
[in] | material_name | The material name. |
|
virtual |
Sets the name of the polygon.
[in] | polygon_name | The name for the polygon. |
|
overrideprotectedvirtual |
Unloads the file.
|
private |
The group name.
|
private |
The material type.
|
private |
The lsit of materials.
|
private |
The polygon names.
|
static |
The resource type.
|
private |
The texture name.