class MAGES::MeshDeformations::TearActionData::Factory

Overview

class Factory: public MAGES::SceneGraph::ActionFactory
{
public:
    // methods

    override bool Initialize(
        BaseActionData data,
        Action trigger,
        GraphRunner runner
    );

    virtual override bool Undo(BaseActionData data);
    virtual override void WriteDefaults(BaseActionData data);
    static void Reset(TearActionData cutData);
};

Inherited Members

public:
    // methods

    static bool InvokeInitialize(
        BaseActionData data,
        Action trigger,
        GraphRunner runner
    );

    static bool InvokeUndo(BaseActionData data, GraphRunner runner);
    static void InvokeWriteDefaults(BaseActionData data);
    static BaseActionData CreateAction(System.Type actionType);
    virtual void WriteDefaults(BaseActionData data);
    bool Initialize(BaseActionData data, Action trigger, GraphRunner runner);
    virtual bool Undo(BaseActionData data);
    virtual bool Undo(BaseActionData data, GraphRunner runner);

Detailed Documentation

Methods

virtual override bool Undo(BaseActionData data)

Undo the action data.

Parameters:

data

The action data.

Returns:

Whether (or not) the action was properly undone.

virtual override void WriteDefaults(BaseActionData data)

Write the default values for the action data.

Parameters:

data

The action data.

static void Reset(TearActionData cutData)

Restores the target to the untorn baseline captured at Initialize and re-arms the action so it can be torn and completed again from a clean baseline. Wired to the reset control’s button. No-op-safe: does nothing if there is no captured snapshot, no detector, or the target is not a DynamicSoftbodyActor currently part of a physics world.

The restore mutates live runtime data, so (like CutRemainingConstraints) it is deferred to PhysicsWorld.PhysicsUpdate to stay Jobs-safe. In the deferred step the currently injected groups are torn down (without discarding the snapshot), the actor is restored via DynamicSoftbodyActor.Load, and the groups + completion tracker are rebuilt. The rebuilt listeners read the actor’s simulation mesh live, so they observe the post-Load topology once it is re-added.

Parameters:

cutData

The action data to reset.