Skip to content

SceneEvent

Represents a scene hierarchy change event.

A scene event is dispatched when a node is added to or removed from the active scene. It extends the base Event with data specific to scene changes: the change type and the affected node reference.

This event type is used internally by the active Scene to track hierarchy changes and cannot be handled directly by individual nodes.

INFO

Derives from Event and inherits all public properties and methods.

Construction

Constructors


SceneEvent()

Constructs a scene event.

cpp
SceneEvent::SceneEvent(Type type, std::shared_ptr<Node> node);
ParameterDescription
typeThe type of scene change.
nodeThe node that was affected.

Types

SceneEvent::Type enum

Enumerates all scene change types.

Distinguishes between node additions and removals within the active scene graph.

ValueDescription
NodeAddedNode was added to the scene.
NodeRemovedNode was removed from the scene.

Properties

node std::shared_ptr<Node>

The node that was added or removed. Holds a shared reference to the affected node at the time the event was generated.

cpp
std::shared_ptr<Node> node {};

The type of this event.

cpp
SceneEvent::Type type {};

Functions

GetType() Event::Type virtual

Identifies this event as Event::Type::Scene.

cpp
Type vglx::SceneEvent::GetType() const override;

Released under the MIT License.