|
wavelength 1.0.0
|
Motion trail that draws a mesh or a text again at the transforms it recently occupied. More...
#include <rndblur.h>


Public Member Functions | |
| RndBlur (const char *pszName) | |
| Construct a trail without a subject, recording nothing, every frame, at full falloff. | |
| ~RndBlur () override | |
| Drop the references on the subjects. | |
| void * | operator new (size_t nSize) |
| Allocate a trail, billed to the class name. | |
| void | operator delete (void *pBlock) |
| Release a trail. | |
| void | ListDrawObjects (std::list< RndObject * > &objects) override |
| Add the objects of the mesh and of the text to a list. | |
| void | ListDrawables (std::list< RndDrawable * > &drawables) override |
| Add the trail when its subject draws at the current transform or a recorded one, then the children, to a list. | |
| int | DrawShowing () override |
| Draw the subject, then once per recorded transform with a falling alpha. | |
| void | DumpText (PrnStream &stream) override |
| Write a description of the trail and its base. | |
| void | Save (BinStream &stream) override |
| Write the version, the base, the subjects' names, the length, the rate, and the falloff. | |
| void | Replace (RndObject *pFrom, RndObject *pTo) override |
| Replace a subject with another object. | |
| const char * | ClassName () const override |
| Report the class name. | |
| void | Copy (const RndObject *pSource, int nFlags) override |
| Copy the subjects, the length, the rate, and the falloff, and discard the recorded transforms. | |
| void | Load (BinStream &stream) override |
| Read what Save() wrote. | |
| void | SetLength (int nLength) |
| Set how many transforms the trail records and discard the recorded ones. | |
| void | SetRate (int nRate) |
| Set how many frames pass between two recorded transforms and discard the recorded ones. | |
| float | GetFalloff () const |
| void | SetFalloff (float fFalloff) |
| RndMesh * | GetMesh () const |
| const std::list< Transform > & | GetXfms () const |
| std::list< Transform > & | GetXfms () |
| Public Member Functions inherited from RndDrawable | |
| RndDrawable () | |
| Construct a showing drawable without a highlight or children. | |
| ~RndDrawable () override | |
| Drop the references on the children. | |
| virtual void | SetShowing (int nShowing) |
| Set whether the drawable draws at all. | |
| virtual void | SetHighlight (int nHighlight) |
| Set whether the drawable draws with its highlight treatment. | |
| void | DumpText (PrnStream &stream) override |
| Write a description of the drawable. | |
| void | Save (BinStream &stream) override |
| Write the showing flag and the names of the children. | |
| void | Replace (RndObject *pFrom, RndObject *pTo) override |
| Replace a child with another object. | |
| void | Copy (const RndObject *pSource, int nFlags) override |
| Copy the showing flag, and the children when the flags request them. | |
| void | Load (BinStream &stream) override |
| Read what Save() wrote. | |
| RndDrawable * | Parent () |
| Find the drawable whose children include this one. | |
| void | Draw () |
| Draw the drawable and then its children, when it is showing. | |
| bool | AddDraw (RndDrawable *pDraw, RndDrawable *pBefore) |
| Add a child before another. | |
| void | RemoveDraw (RndDrawable *pDraw) |
| Remove a child. | |
| void | ClearDraws () |
| Remove every child. | |
| int | GetShowing () const |
| const std::list< RndDrawable * > & | GetDraws () const |
| Public Member Functions inherited from RndObject | |
| RndObject (const char *pszName) | |
| Construct an object and register it under a name. | |
| virtual | ~RndObject () |
| Notify every referrer, then erase the registration. | |
| void | SetName (const char *pszName) |
| Register the object under a different name. | |
| void | AddRef (RndObject *pReferrer) |
| Register an object as a store of a pointer to this one. | |
| void | RemoveRef (RndObject *pReferrer) |
| Drop the first registration AddRef() made for a referrer. | |
| const char * | GetName () const |
| const std::list< RndObject * > & | GetRefs () const |
| int | GetInternal () const |
| void | SetInternal (int nInternal) |
Static Public Member Functions | |
| static RndObject * | New (const char *pszName) |
| Create a trail. | |
| Static Public Member Functions inherited from RndDrawable | |
| static void | CollectChildren (std::list< RndObject * > &objects, RndDrawable *pDrawable) |
| Append every draw descendant of a drawable, depth first, each before its descendants. | |
Static Public Attributes | |
| static const char * | sClassName |
| The class name a .rnd file writes, Blur. | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
| static int | sLoadRev |
| The version Load() read last. | |
| Static Public Attributes inherited from RndDrawable | |
| static int | sRev |
| The format version Save() writes and Load() accepts. | |
| Static Public Attributes inherited from RndObject | |
| static constexpr int | kCopyChildLists = 0x200 |
| The bit of the Copy() flags that copies the child lists of the mix-ins. | |
Protected Member Functions | |
| void | ReleaseRefs () |
| Drop the references on the subjects. | |
| void | AcquireRefs () |
| Take a reference on the subjects and discard the recorded transforms. | |
| Protected Member Functions inherited from RndDrawable | |
| void | ReleaseDrawRefs () |
| Drop the reference on every child without emptying the list. | |
| void | AcquireDrawRefs () |
| Take a reference on every child. | |
Additional Inherited Members | |
| Protected Attributes inherited from RndDrawable | |
| int | mShowing |
| Protected Attributes inherited from RndObject | |
| std::list< RndObject * > | mRefs |
| String | mName |
Motion trail that draws a mesh or a text again at the transforms it recently occupied.
The RTTI includes the class name and records RndDrawable as the one base. A text subject takes precedence over a mesh subject, but a mesh subject supplies the material even when a text is set. The trail records a transform every mRate frames and retains the newest mLength of them.
|
explicit |
Construct a trail without a subject, recording nothing, every frame, at full falloff.
| pszName | The registry key. |
|
override |
Drop the references on the subjects.
|
inline |
Allocate a trail, billed to the class name.
| nSize | The object size the compiler supplies. |
|
inline |
Release a trail.
| pBlock | The block. |
|
overridevirtual |
Add the objects of the mesh and of the text to a list.
The children are not added.
| objects | The list to add to. |
Reimplemented from RndDrawable.
|
overridevirtual |
Add the trail when its subject draws at the current transform or a recorded one, then the children, to a list.
The subject is moved to each recorded transform in turn and put back afterwards.
| drawables | The list to add to. |
Reimplemented from RndDrawable.
|
overridevirtual |
Draw the subject, then once per recorded transform with a falling alpha.
The first step is drawn at the material alpha scaled by mFalloff, less the part of a step the countdown has used, and each later step loses an equal share. A recorded transform equal to the one before it, the first compared with the current world transform, is skipped. A mesh with depth testing draws its trail with RndMesh::kZModeZReadOnly. The subject's transforms, the material alpha, and the depth mode are restored afterwards. Every mRate frames the world transform goes to the front of mXfms, the oldest dropping once mLength are stored.
Reimplemented from RndDrawable.
|
overridevirtual |
Write a description of the trail and its base.
| stream | The stream to write to. |
Reimplemented from RndObject.
|
overridevirtual |
Write the version, the base, the subjects' names, the length, the rate, and the falloff.
| stream | The stream to write to. |
Implements RndObject.
Replace a subject with another object.
A replacement of another class, or null, clears the subject.
| pFrom | The object being replaced. |
| pTo | The replacement, or null. |
Implements RndObject.
|
inlineoverridevirtual |
Report the class name.
Implements RndObject.
|
overridevirtual |
Copy the subjects, the length, the rate, and the falloff, and discard the recorded transforms.
| pSource | The trail to copy from. |
| nFlags | The set of fields to copy. |
Implements RndObject.
|
overridevirtual |
| void RndBlur::SetLength | ( | int | nLength | ) |
Set how many transforms the trail records and discard the recorded ones.
A negative length is clamped to 0 and disables the trail. The name is inferred.
| nLength | The number of transforms. |
| void RndBlur::SetRate | ( | int | nRate | ) |
Set how many frames pass between two recorded transforms and discard the recorded ones.
A rate below 1 is clamped to 1. The name is inferred.
| nRate | The frame interval. |
|
inlinestatic |
Create a trail.
| pszName | The registry key. |
|
inline |
|
inline |
| fFalloff | The fraction of the material alpha of the first step. |
|
inline |
|
inline |
|
inline |
|
protected |
Drop the references on the subjects.
The name is inferred.
|
protected |
Take a reference on the subjects and discard the recorded transforms.
The name is inferred.
|
static |
The class name a .rnd file writes, Blur.
|
static |
|
static |
The version Load() read last.