![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
Handles A files. More...
#include <VGearsAFile.h>
Classes | |
struct | Frame |
A frame in an animation. More... | |
Public Types | |
typedef std::vector< Ogre::Vector3 > | BoneRotationList |
typedef std::vector< Frame > | FrameList |
Public Member Functions | |
AFile (Ogre::ResourceManager *creator, const String &name, Ogre::ResourceHandle handle, const String &group, bool is_manual=false, Ogre::ManualResourceLoader *loader=NULL) | |
Constructor. More... | |
virtual | ~AFile () |
Destructor. More... | |
void | AddTo (Ogre::SkeletonPtr skeleton, const String &name) const |
Adds an animation to an skeleton. More... | |
FrameList & | GetFrames () |
Retrieves the list of frames in the file. More... | |
void | SetBoneCount (const uint32 bone_count) |
Sets the number of bones. More... | |
![]() | |
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 Ogre::Real | FRAME_DURATION |
Duration of a frame. 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... | |
size_t | CalculateSize () const |
Calculates the size of the file. More... | |
void | SetFrameRotation (Ogre::TransformKeyFrame *key_frame, const Ogre::Vector3 &rotation) const |
Sets the rotation for a frame. More... | |
![]() | |
virtual Ogre::DataStreamPtr | openResource () |
Opens the resource. More... | |
Private Attributes | |
uint32 | bone_count_ |
The number of bones. More... | |
FrameList | frames_ |
The list of frames. More... | |
Handles A files.
A files are files with skeleton animation data.
typedef std::vector<Ogre::Vector3> VGears::AFile::BoneRotationList |
typedef std::vector<Frame> VGears::AFile::FrameList |
VGears::AFile::AFile | ( | Ogre::ResourceManager * | creator, |
const String & | name, | ||
Ogre::ResourceHandle | handle, | ||
const String & | group, | ||
bool | is_manual = false , |
||
Ogre::ManualResourceLoader * | loader = NULL |
||
) |
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.
void VGears::AFile::AddTo | ( | Ogre::SkeletonPtr | skeleton, |
const String & | name | ||
) | const |
Adds an animation to an skeleton.
[in,out] | skeleton | Skeleton to add the animation to. |
[in] | name | Animation name. |
|
protected |
|
inline |
Retrieves the list of frames in the file.
|
finaloverrideprotectedvirtual |
Loads the file.
void VGears::AFile::SetBoneCount | ( | const uint32 | bone_count | ) |
Sets the number of bones.
[in] | bone_count | The number of bones. |
|
protected |
Sets the rotation for a frame.
[in] | key_frame | The frame. |
[in] | rotation | The rotation for the frame |
|
finaloverrideprotectedvirtual |
Unloads the file.
|
private |
The number of bones.
|
static |
Duration of a frame.
|
private |
The list of frames.
|
static |
The type of resource.