class MAGES::MeshDeformations::Editor::BasePhysicsActorEditorTool

Overview

A Tool for editing particles of a BasePhysicsActor. More…

class BasePhysicsActorEditorTool:
    public EditorTool,
    public IDrawSelectedHandles
{
public:
    // structs

    struct DistanceEntry;

    // properties

    OnParticleSelected ParticleSelected;
    float ParticleHandleScale;
    int ParticleDrawCount;
    bool DrawConstraints;
    int SelectedParticleCount;
    int SelectedParticleIndex;
    int StaticParticleCount;
    override GUIContent toolbarIcon;

    // events

    static event SelectedParticleCountChanged();
    static event StaticParticleCountChanged();

    // methods

    delegate void OnParticleSelected(int particleIndex);
    delegate void OnSelectedParticleCountChanged(int selectedParticleCount);
    delegate void OnStaticParticleCountChanged(int staticParticleCount);
    override void OnActivated();
    override void OnWillBeDeactivated();
    override void OnToolGUI(EditorWindow window);
    void OnDrawHandles();
    static void SetSelectedParticlesKinematic(bool setKinematic);
};

Detailed Documentation

A Tool for editing particles of a BasePhysicsActor.

Properties

OnParticleSelected ParticleSelected

Event that is triggered when a particle is selected.

float ParticleHandleScale

Gets or sets the scale of the particle handles in the Scene View.

int ParticleDrawCount

Gets or sets the number of particles to draw in the Scene View.

bool DrawConstraints

Gets or sets a value indicating whether to draw constraints in the Scene View.

int SelectedParticleCount

Gets the number of currently selected particles.

int SelectedParticleIndex

Gets the selected particle index when exactly one particle is selected.

int StaticParticleCount

Gets the number of particles the edited actor currently pins in place.

Resolved from EditorTool.target rather than a cached reference so it stays correct as soon as the Hierarchy selection changes, before the Scene View has repainted.

Events

static event SelectedParticleCountChanged()

Event that is triggered when the selected particle count changes.

static event StaticParticleCountChanged()

Event that is triggered when the edited actor’s set of static particles changes.

Methods

delegate void OnParticleSelected(int particleIndex)

Delegate for handling particle selection events.

Parameters:

particleIndex

The index of the selected particle.

delegate void OnSelectedParticleCountChanged(int selectedParticleCount)

Delegate for handling selected particle count changes.

Parameters:

selectedParticleCount

The current selected particle count.

delegate void OnStaticParticleCountChanged(int staticParticleCount)

Delegate for handling static particle count changes.

Parameters:

staticParticleCount

The current static particle count of the edited actor.

static void SetSelectedParticlesKinematic(bool setKinematic)

Sets the current selected particles to kinematic or non-kinematic.

Parameters:

setKinematic

True to set the current selection kinematic, false otherwise.