Class SceneNode
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Base class for all objects in the scene graph.
public abstract class SceneNodeInheritance
Derived
SceneAggregate.Fragment, HitboxSetSceneNode, LineSceneNode, MeshCollectionNode, ParticleSceneNode, SceneAggregate, SceneCubemapFog, SceneEnvMap, SceneGradientFog, SceneLight, SceneLightProbe, ScenePostProcessVolume, SceneTonemapController, ShapeSceneNode, SkeletonSceneNode, VisibilitySceneNode
Constructors
SceneNode(Scene)
Initializes a new instance of the class.
protected SceneNode(Scene scene)Parameters
scene Scene
The scene this node belongs to.
Properties
BoundingBox
Gets the world-space axis-aligned bounding box, computed from and .
public AABB BoundingBox { get; }Property Value
CubeMapPrecomputedHandshake
Gets or sets the precomputed handshake value for cubemap assignment.
public int CubeMapPrecomputedHandshake { get; set; }Property Value
EntityData
Gets or sets the associated entity data from the map.
public EntityLump.Entity? EntityData { get; set; }Property Value
EnvMaps
Gets the environment maps affecting this node.
public List<SceneEnvMap> EnvMaps { get; }Property Value
Flags
Gets or sets the object type flags used for filtering.
public ObjectTypeFlags Flags { get; set; }Property Value
Id
Gets or sets the unique identifier for this node.
public uint Id { get; set; }Property Value
IsSelected
Gets or sets whether this node is currently selected.
public bool IsSelected { get; set; }Property Value
LayerEnabled
Gets or sets whether this node's layer is enabled. Marks the parent octree dirty on change.
public virtual bool LayerEnabled { get; set; }Property Value
LayerName
Gets or sets the visibility layer name.
public string? LayerName { get; set; }Property Value
LightProbeBinding
Gets or sets the bound light probe for this node.
public SceneLightProbe? LightProbeBinding { get; set; }Property Value
LightProbeVolumePrecomputedHandshake
Gets or sets the precomputed handshake value for light probe volume assignment.
public int LightProbeVolumePrecomputedHandshake { get; set; }Property Value
LightingOrigin
Gets or sets a custom lighting origin override for environment map and light probe sampling.
public Vector3? LightingOrigin { get; set; }Property Value
LocalBoundingBox
Gets or sets the local-space axis-aligned bounding box. Setting this also updates .
public AABB LocalBoundingBox { get; protected set; }Property Value
Name
Gets the name of this node.
public string? Name { get; init; }Property Value
OverlayRenderOrder
Gets or sets the render order for overlay nodes.
public int OverlayRenderOrder { get; set; }Property Value
Scene
Gets the scene this node belongs to.
public Scene Scene { get; }Property Value
ShaderEnvMapVisibility
Gets or sets the precomputed environment map visibility bitfield for shaders.
public SceneEnvMap.EnvMapVisibility128 ShaderEnvMapVisibility { get; set; }Property Value
SceneEnvMap.EnvMapVisibility128
Transform
Gets or sets the world transform. Setting this also updates .
public Matrix4x4 Transform { get; set; }Property Value
Methods
Delete()
Releases resources held by this node.
public virtual void Delete()GetCameraDistance(Camera)
Gets the squared distance from this node's bounding box center to the camera.
public float GetCameraDistance(Camera camera)Parameters
camera Camera
The camera to measure distance from.
Returns
The squared distance to the camera.
GetSupportedRenderModes()
Returns the render modes supported by this node.
public virtual IEnumerable<string> GetSupportedRenderModes()Returns
Render(RenderContext)
Called each frame to render this node.
public virtual void Render(Scene.RenderContext context)Parameters
context Scene.RenderContext
The current render context.
SetRenderMode(string)
Sets the active render mode for this node.
public virtual void SetRenderMode(string mode)Parameters
mode string
The render mode name to activate.
Update(UpdateContext)
Called each frame to update this node's state.
public virtual void Update(Scene.UpdateContext context)Parameters
context Scene.UpdateContext
The current update context.

