Torque3D/Engine/source/ts/assimp/assimpAppSequence.h

67 lines
1.5 KiB
C
Raw Permalink Normal View History

2019-02-08 16:25:43 -06:00
#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
#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
#ifdef new
#undef new
#endif
#endif
2019-02-08 16:25:43 -06:00
#include <assimp/scene.h>
#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
# define _new new(__FILE__, __LINE__)
# define new _new
#endif
2019-02-08 16:25:43 -06:00
class AssimpAppSequence : public AppSequence
{
String mSequenceName;
F32 seqStart;
F32 seqEnd;
F32 mTimeMultiplier; // The factor needed to convert the sequence data timestamp to seconds
void determineTimeMultiplier(aiAnimation* a);
void calculateSequenceEnd(aiAnimation* a);
2019-02-08 16:25:43 -06:00
public:
AssimpAppSequence(aiAnimation *a);
~AssimpAppSequence();
2019-02-08 16:25:43 -06:00
aiAnimation *mAnim;
void setActive(bool active) override;
2019-02-08 16:25:43 -06:00
S32 getNumTriggers() const override { return 0; }
void getTrigger(S32 index, TSShape::Trigger& trigger) const override { trigger.state = 0; }
2019-02-08 16:25:43 -06:00
const char* getName() const override { return mSequenceName.c_str(); }
2019-02-08 16:25:43 -06:00
F32 getStart() const override { return seqStart; }
F32 getEnd() const override { return seqEnd; }
void setEnd(F32 end) { seqEnd = end; }
2019-02-08 16:25:43 -06:00
U32 getFlags() const override;
F32 getPriority() const override;
F32 getBlendRefTime() const override;
};