Rebel Fork Framework
Urho3D::SceneSelection Class Reference

Selected nodes and components in the Scene. More...

#include <Urho3D/Utility/SceneSelection.h>

Public Types

using WeakNodeSet = ea::unordered_set< WeakPtr< Node > >
 
using WeakComponentSet = ea::unordered_set< WeakPtr< Component > >
 
using WeakObjectSet = ea::unordered_set< WeakPtr< Object > >
 

Public Member Functions

void Update ()
 Cleanup expired selection.
 
void Save (PackedSceneSelection &packedSelection) const
 Save selection.
 
void Load (Scene *scene, const PackedSceneSelection &packedSelection)
 Load selection.
 
PackedSceneSelection Pack () const
 Return packed selection.
 
void Clear ()
 Clear selection.
 
void ConvertToNodes ()
 Convert component selection to node selection.
 
void SetSelected (Component *component, bool selected, bool activated=true)
 Set whether the component is selected.
 
void SetSelected (Node *node, bool selected, bool activated=true)
 Set whether the node is selected.
 
void SetSelected (Object *object, bool selected, bool activated=true)
 Set whether the node or component is selected.
 
unsigned GetRevision () const
 
bool IsEmpty () const
 
bool IsSelected (Component *component) const
 
bool IsSelected (Node *node, bool effectively=false) const
 
bool IsSelected (Object *object) const
 
Node * GetActiveNodeOrScene () const
 
Node * GetActiveNode () const
 
ObjectGetActiveObject () const
 
const WeakNodeSet & GetNodesAndScenes () const
 
const WeakNodeSet & GetNodes () const
 
const WeakNodeSet & GetEffectiveNodesAndScenes () const
 
const WeakNodeSet & GetEffectiveNodes () const
 
const WeakComponentSet & GetComponents () const
 
ea::string GetSummary (Scene *scene) const
 

Public Attributes

Signal< void(), SceneSelectionOnChanged
 

Private Member Functions

void ClearInternal ()
 
void NotifyChanged ()
 
void UpdateActiveObject (const WeakPtr< Node > &node, const WeakPtr< Component > &component, bool forceUpdate)
 
void UpdateEffectiveNodes ()
 

Private Attributes

WeakObjectSet objects_
 
WeakNodeSet nodesAndScenes_
 
WeakNodeSet nodes_
 
WeakComponentSet components_
 
WeakPtr< Node > activeNodeOrScene_
 
WeakPtr< Node > activeNode_
 
WeakPtr< ObjectactiveObject_
 
WeakNodeSet effectiveNodesAndScenes_
 
WeakNodeSet effectiveNodes_
 
unsigned revision_ {1}
 

Detailed Description

Selected nodes and components in the Scene.

Member Function Documentation

◆ GetRevision()

unsigned Urho3D::SceneSelection::GetRevision ( ) const
inline

Return current state


The documentation for this class was generated from the following files: