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

Handles HRC files. More...

#include <VGearsHRCFile.h>

Inheritance diagram for VGears::HRCFile:
Collaboration diagram for VGears::HRCFile:

Classes

struct  Bone
 A bone in a skeleton. More...
 

Public Types

typedef std::vector< StringRSDNameList
 
typedef std::vector< BoneBoneList
 

Public Member Functions

 HRCFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL)
 Constructor. More...
 
virtual ~HRCFile ()
 Destructor. More...
 
virtual void SetSkeletonName (const String &name)
 Sets a name for the skelenton. More...
 
virtual const StringGetSkeletonName () const
 Retrieves the skeleton name. More...
 
virtual String GetSkeletonFileName () const
 Retrieves the skeleton file name. More...
 
virtual String GetMeshFileName () const
 Retrieves the file name of the mesh assigned to the skeleton. More...
 
virtual BoneListGetBones ()
 Retrieves the list of bones in the skeleton. More...
 
virtual const BoneListGetBones () const
 Retrieves the list of bones in the skeleton. More...
 
virtual Ogre::SkeletonPtr GetSkeleton () const
 Retrieves the skeleton. More...
 

Static Public Attributes

static const float DOWN_SCALER = 1.0f
 Scale down constant. More...
 
static const String RESOURCE_TYPE
 The type of resource. More...
 

Protected Member Functions

virtual void loadImpl () override final
 Loads the file. More...
 
virtual void unloadImpl () override final
 Unloads the file. More...
 
virtual size_t CalculateSize () const
 Calculates the size of the skeleton. More...
 
virtual size_t CalculateSize (const Bone &bone) const
 Calculates the size of a bone. More...
 

Private Attributes

String skeleton_name_
 The skeleton name. More...
 
BoneList bones_
 The bones in the skeleton. More...
 
HRCMeshLoadermesh_loader_
 The mesh loader. More...
 
HRCSkeletonLoaderskeleton_loader_
 The skeleton loader. More...
 
Ogre::SkeletonPtr skeleton_
 The skeleton. More...
 
Ogre::MeshPtr mesh_
 The mesh assigned to the skeleton. More...
 

Detailed Description

Handles HRC files.

HRC files describe bone hierarchy in an skeleton.

Member Typedef Documentation

◆ BoneList

typedef std::vector<Bone> VGears::HRCFile::BoneList

◆ RSDNameList

typedef std::vector<String> VGears::HRCFile::RSDNameList

Constructor & Destructor Documentation

◆ HRCFile()

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

◆ ~HRCFile()

VGears::HRCFile::~HRCFile ( )
virtual

Destructor.

Member Function Documentation

◆ CalculateSize() [1/2]

size_t VGears::HRCFile::CalculateSize ( void  ) const
protectedvirtual

Calculates the size of the skeleton.

Returns
The size of the skeleton.
Todo:
Units?

◆ CalculateSize() [2/2]

size_t VGears::HRCFile::CalculateSize ( const Bone bone) const
protectedvirtual

Calculates the size of a bone.

Parameters
[in]boneThe bone whose size to calculate.
Returns
The size of the bone.
Todo:
Units?

◆ GetBones() [1/2]

virtual BoneList & VGears::HRCFile::GetBones ( )
inlinevirtual

Retrieves the list of bones in the skeleton.

Returns
The list of bones.

◆ GetBones() [2/2]

virtual const BoneList & VGears::HRCFile::GetBones ( ) const
inlinevirtual

Retrieves the list of bones in the skeleton.

Returns
The list of bones.

◆ GetMeshFileName()

String VGears::HRCFile::GetMeshFileName ( void  ) const
virtual

Retrieves the file name of the mesh assigned to the skeleton.

Returns
The mesh file name.

◆ GetSkeleton()

Ogre::SkeletonPtr VGears::HRCFile::GetSkeleton ( void  ) const
virtual

Retrieves the skeleton.

Returns
The skeleton.

◆ GetSkeletonFileName()

String VGears::HRCFile::GetSkeletonFileName ( void  ) const
virtual

Retrieves the skeleton file name.

Returns
The skeleton file name.

◆ GetSkeletonName()

virtual const String & VGears::HRCFile::GetSkeletonName ( ) const
inlinevirtual

Retrieves the skeleton name.

Returns
The skeleton name.

◆ loadImpl()

void VGears::HRCFile::loadImpl ( void  )
finaloverrideprotectedvirtual

Loads the file.

◆ SetSkeletonName()

void VGears::HRCFile::SetSkeletonName ( const String name)
virtual

Sets a name for the skelenton.

Parameters
[in]nameThe name for the skeleton.

◆ unloadImpl()

void VGears::HRCFile::unloadImpl ( void  )
finaloverrideprotectedvirtual

Unloads the file.

Member Data Documentation

◆ bones_

BoneList VGears::HRCFile::bones_
private

The bones in the skeleton.

◆ DOWN_SCALER

const float VGears::HRCFile::DOWN_SCALER = 1.0f
static

Scale down constant.

◆ mesh_

Ogre::MeshPtr VGears::HRCFile::mesh_
private

The mesh assigned to the skeleton.

◆ mesh_loader_

HRCMeshLoader* VGears::HRCFile::mesh_loader_
private

The mesh loader.

◆ RESOURCE_TYPE

const String VGears::HRCFile::RESOURCE_TYPE
static

The type of resource.

◆ skeleton_

Ogre::SkeletonPtr VGears::HRCFile::skeleton_
private

The skeleton.

◆ skeleton_loader_

HRCSkeletonLoader* VGears::HRCFile::skeleton_loader_
private

The skeleton loader.

◆ skeleton_name_

String VGears::HRCFile::skeleton_name_
private

The skeleton name.


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