Animated Mesh
// GPU Animated mesh.
class RVAPI AnimMesh : public Geometry
{
public:
// Get frame count.
uint GetFrameCount() const;
// Check if animation is done.
bool operator ! () const;
// Start asynchronous animation.
uint Animate();
// Wait for animation.
void Wait();
// Begin asynchronous animation. Returns frame index.
void Start(float delay = 0);
// End asynchronous animation.
void Stop();
// Reverse animation.
void Reverse();
// Clear animation.
void Clear();
// Set animation with animation name, animation mode and whether to reverse animation playback.
void Set(wcstr name, AnimInt::Mode mode = AnimInt::Mode::CLAMP, bool reverse = false);
// Internal.
void *operator () () const { return (void *)wobj; }
// Construct animated mesh with host entity, animation name and mesh position.
AnimMesh(EntKey host, wcstr animName, const M4f &pos = M4fIdent());
// Destructor.
~AnimMesh() override;
private:
byte wobj[1664];
};