Table of Contents

Class Scene

Namespace
VisioForge.Core.SceneSwitching
Assembly
VisioForge.Core.dll

Represents a named scene containing a collection of source placements. A scene defines which sources are visible and their layout properties (position, size, z-order, opacity). Scene switching changes the active scene without modifying the underlying pipeline topology.

public class Scene

Inheritance

Inherited Members

Constructors

Scene(string)

Initializes a new instance of the VisioForge.Core.SceneSwitching.Scene class.

public Scene(string name)

Parameters

name string

The name of the scene.

Properties

ID

Gets the unique identifier for this scene.

public Guid ID { get; }

Property Value

Guid

ItemCount

Gets the number of items in this scene.

public int ItemCount { get; }

Property Value

int

Name

Gets or sets the name of this scene.

public string Name { get; set; }

Property Value

string

Methods

AddItem(Guid, SceneItemTransform)

Adds or replaces a source item in this scene. Each source can only appear once per scene; if the source already exists, its item is replaced with the new transform.

public SceneItem AddItem(Guid sourceId, SceneItemTransform transform)

Parameters

sourceId Guid

The ID of the registered source to add.

transform SceneItemTransform

The visual transform properties for the source in this scene.

Returns

SceneItem

The created VisioForge.Core.SceneSwitching.SceneItem.

AddItem(Guid, Rect, uint, double)

Adds or replaces a source item in this scene with explicit parameters. Each source can only appear once per scene; if the source already exists, its item is replaced with the new parameters.

public SceneItem AddItem(Guid sourceId, Rect rectangle, uint zOrder, double opacity = 1)

Parameters

sourceId Guid

The ID of the registered source to add.

rectangle Rect

The position and size rectangle.

zOrder uint

The z-order value.

opacity double

The opacity value.

Returns

SceneItem

The created VisioForge.Core.SceneSwitching.SceneItem.

BeginUpdate()

Begins a batch update. Changes will not trigger notifications until VisioForge.Core.SceneSwitching.Scene.EndUpdate is called.

public void BeginUpdate()

EndUpdate()

Ends a batch update and fires a single change notification.

public void EndUpdate()

GetItem(Guid)

Gets a scene item by its ID.

public SceneItem GetItem(Guid itemId)

Parameters

itemId Guid

The ID of the scene item.

Returns

SceneItem

The VisioForge.Core.SceneSwitching.SceneItem if found; otherwise, null.

GetItems()

Gets all scene items.

public SceneItem[] GetItems()

Returns

SceneItem[]

An array of all VisioForge.Core.SceneSwitching.SceneItem instances in this scene.

GetItemsBySource(Guid)

Gets all scene items that reference a specific source.

public SceneItem[] GetItemsBySource(Guid sourceId)

Parameters

sourceId Guid

The ID of the source to find items for.

Returns

SceneItem[]

An array of VisioForge.Core.SceneSwitching.SceneItem instances referencing the specified source.

GetSourceIds()

Gets the set of unique source IDs used in this scene.

public HashSet<Guid> GetSourceIds()

Returns

HashSet<Guid>

A set of source IDs.

RemoveItem(Guid)

Removes a scene item by its ID.

public bool RemoveItem(Guid itemId)

Parameters

itemId Guid

The ID of the scene item to remove.

Returns

bool

true if the item was found and removed; otherwise, false.

ToString()

Returns a string representation of this scene.

public override string ToString()

Returns

string