Class Scene
A mutable scene. Mutate and render on the same thread; notifications are synchronous.
Namespace: Simple3D.Core
Assembly: Simple3D.Core.dll
Syntax
public sealed class Scene
Constructors
|
Edit this page
View Source
Scene()
Declaration
Fields
|
Edit this page
View Source
MaximumNodes
Maximum node visits during bounds calculation or rendering, including empty groups and repeated instances.
Declaration
public const int MaximumNodes = 100000
Field Value
Properties
|
Edit this page
View Source
Labels
World anchored overlay labels.
Declaration
public IReadOnlyList<WorldLabel> Labels { get; }
Property Value
|
Edit this page
View Source
Shapes
Top-level immutable nodes.
Declaration
public IReadOnlyList<Shape> Shapes { get; }
Property Value
Methods
|
Edit this page
View Source
Add(Shape)
Appends a node and notifies observers.
Declaration
public Scene Add(Shape shape)
Parameters
| Type |
Name |
Description |
| Shape |
shape |
|
Returns
|
Edit this page
View Source
AddLabel(WorldLabel)
Adds a label and notifies observers.
Declaration
public Scene AddLabel(WorldLabel label)
Parameters
Returns
|
Edit this page
View Source
Clear()
Removes all nodes and labels.
Declaration
Returns
|
Edit this page
View Source
GetBounds()
World axis-aligned bounds of geometry, or null for an empty scene. Labels are excluded. Overflowing transforms or excessive node or triangle visits throw.
Declaration
public Bounds3? GetBounds()
Returns
|
Edit this page
View Source
Remove(Shape)
Removes the first matching top-level node.
Declaration
public bool Remove(Shape shape)
Parameters
| Type |
Name |
Description |
| Shape |
shape |
|
Returns
|
Edit this page
View Source
RemoveLabel(WorldLabel)
Removes the first matching label.
Declaration
public bool RemoveLabel(WorldLabel label)
Parameters
Returns
|
Edit this page
View Source
Replace(Shape, Shape)
Replaces the first matching top-level node. Returns false when absent or unchanged.
Declaration
public bool Replace(Shape oldShape, Shape newShape)
Parameters
| Type |
Name |
Description |
| Shape |
oldShape |
|
| Shape |
newShape |
|
Returns
Events
|
Edit this page
View Source
Changed
Declaration
public event EventHandler? Changed
Event Type