Class Scene3D
Represents a 3D scene for rendering, including lighting and an optional skybox.
Inherited Members
Namespace: Genesis.Core
Assembly: Genesis.dll
Syntax
public class Scene3D : Scene
Constructors
Scene3D(string, Light)
Initializes a new instance of the Scene3D class.
Declaration
public Scene3D(string name, Light sun)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the scene. |
Light | sun | The light source (sun) in the scene. |
Properties
Skybox
Gets or sets the skybox used in the scene (optional).
Declaration
public Skybox Skybox { get; set; }
Property Value
Type | Description |
---|---|
Skybox |
Sun
Gets or sets the light source (sun) in the scene.
Declaration
public Light Sun { get; set; }
Property Value
Type | Description |
---|---|
Light |
Methods
Init(Game, IRenderDevice)
Initializes the 3D scene.
Declaration
public override void Init(Game game, IRenderDevice renderDevice)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
IRenderDevice | renderDevice | The render device used for rendering. |
Overrides
OnDestroy(Game)
Called when the scene is destroyed.
Declaration
public override void OnDestroy(Game game)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
Overrides
OnRender(Game, IRenderDevice)
Called during the rendering phase of the game loop.
Declaration
public override void OnRender(Game game, IRenderDevice renderDevice)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
IRenderDevice | renderDevice | The render device used for rendering. |
Overrides
OnUpdate(Game, IRenderDevice)
Called during the update phase of the game loop.
Declaration
public override void OnUpdate(Game game, IRenderDevice renderDevice)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance. |
IRenderDevice | renderDevice | The render device used for rendering. |