Skip to content
Snippets Groups Projects
Commit 48af5740 authored by Mark Olesen's avatar Mark Olesen
Browse files

new management for sampledSurface(s)

        //- Does the surface need an update?
        virtual bool needsUpdate() const = 0;

        //- Mark the surface as needing an update.
        //  May also free up unneeded data.
        //  Return false if surface was already marked as expired.
        virtual bool expire() = 0;

        //- Update the surface as required.
        //  Do nothing (and return false) if no update was required
        virtual bool update() = 0;

    The constructors for the derived classes should generally start in a
    'expired' condition (ie, needsUpdate() == true) and rely on a subsequent
    call to the update() method to complete the initialization. Delaying the
    final construction as late as possible allows the construction of
    surfaces that may depend on intermediate calculation results (eg,
    iso-surfaces) and also avoids the unnecessary reconstruction of surfaces
    between sampling intervals.

    It is the responsibility of the caller to ensure that the surface
    update() is called before the surface is used.  The update() method
    implementation should do nothing when the surface is already up-to-date.
parent dcc82bf7
Branches
Tags
Showing
with 777 additions and 537 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment