class ManagedSceneHandles

Inherits: SceneHandles

Renders, updates and manipulates handles declared in managed code.

Managed code handles have a [CustomHandle] attribute and must implement b3d.Editor.Handle.

Public

Constructors

ManagedSceneHandles

ManagedSceneHandles(const SPtr<EditorSceneInstance> &scene)

Methods

~ManagedSceneHandles

~ManagedSceneHandles() noexcept

Protected

Methods

TriggerPreInput

void TriggerPreInput() override

Called during handle update.

Allows handle sliders to be created or destroyed before any input is handled.

TriggerPostInput

void TriggerPostInput() override

Called during handle update after handle input is processed.

Allows implementation to respond to delta values calculated in sliders due to input.

QueueDrawCommands

void QueueDrawCommands() override

Queues handle draw commands from all the registered handles.

To be implemented by base classes.

UpdateHandles

void UpdateHandles()

Creates or destroys handle objects depending on the current selection.

ClearAssemblyData

void ClearAssemblyData()

Clears references to all managed types and objects.

Must be called before loadAssemblyData() if loadAssemblyData() was called previously.

LoadAssemblyData

void LoadAssemblyData()

Loads internal managed assembly types and finds all custom handle classes.

Must be called after construction and after assembly reload.

IsValidHandleType

bool IsValidHandleType(MonoClass *type, MonoClass *&componentType, MonoMethod *&ctor) const

Checks is the provided type a valid custom handle class.

Custom handles must have a [CustomHandle] attribute and must implement BansheeEditor.Handle.

type
Type to check.
componentType
Component type for which the handle should be displayed for. Handle will not be displayed unless a component of this type is selected. Only valid if method returns true.
ctor
Constructor method for the handle type. Only valid if method returns true.

Returns: True if the type is a valid custom handle type.

CallPreInput

void CallPreInput(MonoObject *instance)

Triggers the PreInput method on the provided Handle object.

Pre input happens before any handles are selected or moved and allows you to position the handles or prepare them in some other way.

CallPostInput

void CallPostInput(MonoObject *instance)

Triggers the PostInput method on the provided Handle object.

Post input happens after we know in what way has the user interacted with the handles this frame.

CallDraw

void CallDraw(MonoObject *instance)

Triggers the Draw method on the provided Handle object.

Draw allows you to draw the visual representation of the handles. Called after PostInput.

CallDestroy

void CallDestroy(MonoObject *instance)

Triggers the Destroy method on the provided Handle object.

Destroy is called when the handle is no longer being displayed.

Fields

mEditorScene

WeakSPtr<EditorSceneInstance> mEditorScene

mSelectedObject

HSceneObject mSelectedObject

mActiveSelectionHandles

Vector<ActiveHandle> mActiveSelectionHandles

mActiveGlobalHandles

Vector<ActiveHandle> mActiveGlobalHandles

mActiveDefaultHandle

ActiveHandle mActiveDefaultHandle

mPerComponentHandleTypes

Map<String, HandleTypeInformation> mPerComponentHandleTypes

mGlobalHandleTypes

Vector<HandleTypeInformation> mGlobalHandleTypes

mDefaultHandleManagerClass

MonoClass * mDefaultHandleManagerClass

mDefaultHandleManagerConstructor

MonoMethod * mDefaultHandleManagerConstructor

mCustomHandleAttribute

MonoClass * mCustomHandleAttribute

mTypeField

MonoField * mTypeField

mHandleBaseClass

MonoClass * mHandleBaseClass

mPreInputMethod

MonoMethod * mPreInputMethod

mPostInputMethod

MonoMethod * mPostInputMethod

mDrawMethod

MonoMethod * mDrawMethod

mDestroyMethod

MonoMethod * mDestroyMethod

mOnWillUnloadAssembliesConnection

HEvent mOnWillUnloadAssembliesConnection

mOnAssemblyRefreshAssembliesLoadedConnection

HEvent mOnAssemblyRefreshAssembliesLoadedConnection