mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-22 13:44:44 +00:00
This commit deals with the problem that the keyframe timestamps are not standardized. Seconds, milliseconds and ticks are used depending on the import format. There is no metadata or property that specifies the format used, so the option is exposed to the user as part of the import options gui.
51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
#pragma once
|
|
#ifndef _MMATH_H_
|
|
#include "math/mMath.h"
|
|
#endif
|
|
#ifndef _TVECTOR_H_
|
|
#include "core/util/tVector.h"
|
|
#endif
|
|
#ifndef _TSSHAPE_H_
|
|
#include "ts/tsShape.h"
|
|
#endif
|
|
#ifndef _APPNODE_H_
|
|
#include "ts/loader/appNode.h"
|
|
#endif
|
|
#ifndef _APPMESH_H_
|
|
#include "ts/loader/appMesh.h"
|
|
#endif
|
|
#ifndef _APPSEQUENCE_H_
|
|
#include "ts/loader/appSequence.h"
|
|
#endif
|
|
|
|
#include <assimp/scene.h>
|
|
|
|
class AssimpAppSequence : public AppSequence
|
|
{
|
|
String mSequenceName;
|
|
F32 seqStart;
|
|
F32 seqEnd;
|
|
F32 mTimeMultiplier; // The factor needed to convert the sequence data timestamp to seconds
|
|
|
|
public:
|
|
|
|
AssimpAppSequence(aiAnimation *a);
|
|
~AssimpAppSequence();
|
|
|
|
aiAnimation *mAnim;
|
|
|
|
virtual void setActive(bool active);
|
|
|
|
virtual S32 getNumTriggers() const { return 0; }
|
|
virtual void getTrigger(S32 index, TSShape::Trigger& trigger) const { trigger.state = 0; }
|
|
|
|
virtual const char* getName() const { return mSequenceName.c_str(); }
|
|
|
|
F32 getStart() const { return seqStart; }
|
|
F32 getEnd() const { return seqEnd; }
|
|
void setEnd(F32 end) { seqEnd = end; }
|
|
|
|
virtual U32 getFlags() const;
|
|
virtual F32 getPriority() const;
|
|
virtual F32 getBlendRefTime() const;
|
|
}; |