236 std::list<Vector3Key> mTranslateKeys;
238 std::list<Vector3Key> mScaleKeys;
241 std::list<Vector3Key> mRotateKeys;
246 std::list<TexKey> mTexKeys;
441 void AddObjectRefs();
449 void RemoveObjectRefs();
457 std::vector<Stage> mStages;
461 std::list<ColorKey> mDiffuseKeys;
463 std::list<ColorKey> mAmbientKeys;
465 std::list<ColorKey> mEmissiveKeys;
467 std::list<ColorKey> mSpecularKeys;
469 std::list<FloatKey> mAlphaKeys;
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Animatable()
Construct an animatable with no children, no filters, and a zero frame.
Sink that the engine formats its diagnostic and failure text into.
Definition dbg.h:33
One keyframe of the texture channel of a stage.
Definition matanim.h:97
bool operator<(const TexKey &other) const
Order two keys by frame, which is what std::list::sort() compares.
Definition matanim.h:108
float mFrame
Definition matanim.h:113
Tex * mValue
Definition matanim.h:112
Stage(const Stage &other)=default
Copy the four channels and the owner of another stage animation.
Stage()=default
Construct a stage animation with four empty channels.
void AddTexKey(Tex *pTex, float flFrame)
Add a texture key and sort the channel by frame.
void SetTexKeyFrame(int nIndex, float flFrame)
Move the texture key at a position to a new frame and sort the channel by frame.
Stage & operator=(const Stage &other)=default
Copy the four channels and the owner of another stage animation over this one.
void RemoveTexKey(int nIndex)
Remove the texture key at a position and sort the channel by frame.
~Stage()=default
Release the four channels.
void Dump(Dbg &sink)
Write the four channels and the owner to the engine text sink.
void Load(Stream &stream)
Load the stage animation.
void Save(Stream &stream)
Serialise the stage animation.
friend class MatAnim
Definition matanim.h:233
Animation of the colours and the texture stages of one material.
Definition matanim.h:49
void SetMat(Mat *pMat)
Change the material this animation drives.
@ kCopyShareKeys
Definition matanim.h:71
virtual ~MatAnim()
Drop every reference this animation holds and every reference held on it.
virtual void SetFrameSelf(float flFrame)
Apply the animation at a frame.
MatAnim(const HxStr &name)
Construct an animation with five empty channels, no stages, and no material.
virtual void Save(Stream &stream)
Serialise the animation.
virtual void Replace(Object *pFrom, Object *pTo)
Replace one object reference with another.
void SetNumStages(int nCount)
Resize the stage vector of the keys owner.
virtual void Load(Stream &stream)
Load the animation.
virtual void Copy(const Object *pSource, unsigned nFlags)
Copy another animation over this one.
virtual void DumpText(Dbg &sink)
Write the animation to the engine text sink.
static HxStr sClassName
Registered class name of Rnd::MatAnim, the string "MatAnim".
Definition matanim.h:59
virtual float FilteredFrameEnd()
Report the last frame this animation runs to.
@ kSerialVersion
Definition matanim.h:62
virtual const HxStr & ClassName() const
Report the registered class name, "MatAnim".
void SetKeysOwner(MatAnim *pOwner)
Change the animation whose channels this one reads.
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Base of every object the renderer can load, resolve by name, and serialise.
Definition object.h:43
Byte stream that every renderer object serialises itself through.
Definition stream.h:31
Texture, as a bitmap path plus the load state of its mip levels.
Definition tex.h:43
The rendering engine.
Definition animhelper.h:3
MatAnim * NewMatAnim(const HxStr &name)
Allocate and construct a material animation.
void RegisterMatAnimClass()
Register the "MatAnim" class with Rnd::Manager, created through Rnd::CreateRegisteredMatAnim().
Object * CreateRegisteredMatAnim(const HxStr &name)
Allocate and construct a material animation for the registered "MatAnim" class.