Overlay
// 2D layer over the 3D scene. Overlay usage must be after a scene is finalized and before the scene is released.
class RVAPI Overlay
{
public:
// Get entities.
Entities GetEntities() const;
// Get image dims.
S2i GetImageDims(uint imageID) const;
// Get font height.
uint GetFontHeight(uint fontID) const;
// Get character width.
uint GetCharWidth(uint fontID, wchar c) const;
// Get character advance.
uint GetCharAdvance(uint fontID, wchar c) const;
// Get font ID.
uint GetFontID(wcstr name) const;
// Get image ID.
uint GetImageID(wcstr name) const;
// Get exit code.
int GetExitCode() const;
// Set exit code.
void SetExitCode(int exitCode);
// Set clip region. Resolve meta position using parent rectangle [pRect].
void SetClip(const MetaPos &metaPos, const B2i &pRect);
// Reset clip region to entire overlay.
void SetClip();
// Erase overlay.
void Erase();
// Manual forward update.
void Forward();
// Manual reverse udpate.
void Reverse();
// Internal.
void *operator () () const;
// Construct overlay. See Entities comments about [blockSize] and [incr].
Overlay(uint blockSize = 512, uint incr = 64);
// Destructor.
virtual ~Overlay();
protected:
// Forward callback.
virtual void OnForward() {}
// Reverse callback.
virtual void OnReverse() {}
private:
friend class OverlayBridge;
};