3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
EditorGame Class Reference

#include <EditorGame.hpp>

Inheritance diagram for EditorGame:
Collaboration diagram for EditorGame:

Public Member Functions

 EditorGame (HWND parent, HINSTANCE hInstance)
void Initialize () override
 Initialization method.
void Load () override
 Loads object's assets.
void Update () override
 Update function.
void Draw2D () override
 Main drawing function for 2D elements.
void Draw3D () override
 Main draw function for 3D objects.
void Draw3D (bool transparent)
bool IsEditor () const noexcept override
 Is this game instance an editor?
bool IsFocused () const
void Reset3DCursor ()
Vector3 Get3DCursor () const noexcept
void SelectObject (IObject *obj)
 ~EditorGame ()
Public Member Functions inherited from Engine3DRadSpace.Game
 Game (string title, uint width=800, uint height=600)
 Game (IntPtr handle)
void Run ()
void RunOneFrame ()
 Game (const std::string &title, size_t width=800, size_t height=600)
 Constructs an application instance.
 Game (Native::Window &&window)
 Constructs an application window from the specified window.
 Game (Game &)=delete
 Game (Game &&)=delete
Game & operator= (const Game &)=delete
Game & operator= (Game &&)=delete
IService * RequireService (const std::type_index &type)
 Requires a service of the given type. If the service is not found, it is attempted to be created.
void Run ()
void RunOneFrame ()
void Exit ()
 Exits the game.
bool WasInitialized () const noexcept override
 Was ::Initialized() called on this instance?
bool WasLoaded () const noexcept override
 Was ::Load() called on this instance?
bool IsEditor () const noexcept override
 Is this game instance an editor?
Math::Ray GetMouseRay (const Math::Vector2 &mousePosition, const Math::Matrix4x4 &view, const Math::Matrix4x4 &projection)
virtual void Uninitialize () override
 Called before the object has the destructor called.
virtual void Load (const std::filesystem::path &path) override
 Loads a scene from file.
void AppendScene (const std::filesystem::path &path) override
std::filesystem::path GetCurrentScene () const noexcept
 ~Game () override
Public Member Functions inherited from Engine3DRadSpace.InstIGame
 InstIGame (IntPtr handle)
void Exit ()
 Exits the game.
Ray GetMouseRay (Vector2 pos, in Matrix4x4 view, in Matrix4x4 projection)
void AppendScene (string path)
Public Member Functions inherited from Engine3DRadSpace.NatPtrWrapper
virtual void Dispose ()
Public Member Functions inherited from Engine3DRadSpace.IGame
void Exit ()
void AppendScene (string path)
template<Service S>
void AddService (S *service)
 Adds an service to this game. The service must be derived from IService.
IService * GetService (const std::type_index &type)
 Gets the service of the given type. If the service is not found, nullptr is returned.
template<Service S>
S * GetService (Tag< S > dummy)
 Gets the service of type S. If the service is not found, nullptr is returned.
template<Service S>
S * RequireService (Tag< S > dummy)
 Requires a service of type S. If the service is not found, it is attempted to be created.
std::unordered_map< std::type_index, IService * >::iterator begin ()
 Begin iterator for services in the game.
std::unordered_map< std::type_index, IService * >::iterator end ()
 End iterator for services in the game.
virtual ~IGame ()=default
Public Member Functions inherited from Engine3DRadSpace.IUpdateable
void Update ()
virtual ~IUpdateable ()=default
Public Member Functions inherited from Engine3DRadSpace.IDrawable3D
void Draw3D ()
virtual ~IDrawable3D ()=default
Public Member Functions inherited from Engine3DRadSpace.IDrawable2D
void Draw2D ()
virtual ~IDrawable2D ()=default
Public Member Functions inherited from Engine3DRadSpace.IInitializable
void Initialize ()
virtual ~IInitializable ()=default
Public Member Functions inherited from Engine3DRadSpace.ILoadable
void Load ()
void Load (string path)
virtual ~ILoadable ()=default

Additional Inherited Members

Public Attributes inherited from Engine3DRadSpace.Game
std::unique_ptr< Native::Window > Window
std::unique_ptr< Graphics::IGraphicsDevice > Device
std::unique_ptr< Content::ContentManager > Content
std::unique_ptr< Graphics::SpriteBatch > SpriteBatch
std::unique_ptr< Graphics::Rendering::RenderingManager > RenderingManager
Math::Color ClearColor = Math::Colors::Black
Input::Keyboard & Keyboard
Input::Mouse & Mouse
std::unique_ptr< Physics::IPhysicsEngine > Physics
std::unique_ptr< Audio::IAudioEngine > Audio
std::unique_ptr< Graphics::Rendering::PostProcessCollection > PostProcesses
std::unique_ptr< Objects::CameraProvider > Cameras
std::unique_ptr< Objects::ObjectList > Objects
std::unique_ptr< Plugins::PluginManager > Plugins
double Draw_dt = 0
double Update_dt = 0
Protected Member Functions inherited from Engine3DRadSpace.NatPtrWrapper
 NatPtrWrapper (IntPtr handle, Action< IntPtr > fnDestroy)
 NatPtrWrapper (Action< IntPtr > fnDestroy)
void Reset (IntPtr newObj)
void Dispose (bool disposing)
Protected Member Functions inherited from Engine3DRadSpace.IGame
 IGame ()=default
 IGame (const IGame &)=delete
IGame & operator= (const IGame &)=delete
 IGame (IGame &&) noexcept=default
IGame & operator= (IGame &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IUpdateable
 IUpdateable ()=default
 IUpdateable (const IUpdateable &) noexcept=default
IUpdateable & operator= (const IUpdateable &) noexcept=default
 IUpdateable (IUpdateable &&) noexcept=default
IUpdateable & operator= (IUpdateable &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IDrawable3D
 IDrawable3D ()=default
 IDrawable3D (const IDrawable3D &)=default
IDrawable3D & operator= (const IDrawable3D &)=default
 IDrawable3D (IDrawable3D &&) noexcept=default
IDrawable3D & operator= (IDrawable3D &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IDrawable2D
 IDrawable2D ()=default
 IDrawable2D (const IDrawable2D &)=default
IDrawable2D & operator= (const IDrawable2D &)=default
 IDrawable2D (IDrawable2D &&) noexcept=default
IDrawable2D & operator= (IDrawable2D &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IInitializable
 IInitializable ()=default
 IInitializable (const IInitializable &) noexcept=default
IInitializable & operator= (const IInitializable &) noexcept=default
 IInitializable (IInitializable &&) noexcept=default
IInitializable & operator= (IInitializable &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.ILoadable
 ILoadable ()=default
 ILoadable (const ILoadable &) noexcept=default
ILoadable & operator= (const ILoadable &) noexcept=default
 ILoadable (ILoadable &&) noexcept=default
ILoadable & operator= (ILoadable &&) noexcept=default
Protected Attributes inherited from Engine3DRadSpace.Game
List< Tuple< int, object > > objects
Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper
IntPtr _handle
bool _disposed
Protected Attributes inherited from Engine3DRadSpace.IGame
std::unordered_map< std::type_index, IService * > _services
Properties inherited from Engine3DRadSpace.Game
SpriteBatch SpriteBatch [get]
IGraphicsDevice GraphicsDevice [get]
PostProcessCollection PostProcessCollection [get]
IPhysicsEngine PhysicsEngine [get]
RenderingManager RenderingManager [get]
ObjectList ObjectList [get]
ContentManager ContentManager [get]
CameraProvider CameraProvider [get]
Mouse Mouse [get]
Keyboard Keyboard [get]
float DrawDeltaTime [get]
float UpdateDeltaTime [get]
Properties inherited from Engine3DRadSpace.InstIGame
bool WasInitialized [get]
bool WasLoaded [get]
Properties inherited from Engine3DRadSpace.NatPtrWrapper
IntPtr Handle [get]
Properties inherited from Engine3DRadSpace.IGame
bool WasInitialized [get]
bool WasLoaded [get]

Constructor & Destructor Documentation

◆ EditorGame()

EditorGame::EditorGame ( HWND parent,
HINSTANCE hInstance )

◆ ~EditorGame()

EditorGame::~EditorGame ( )

Member Function Documentation

◆ Draw2D()

void EditorGame::Draw2D ( )
overridevirtual

Main drawing function for 2D elements.

Reimplemented from Engine3DRadSpace.Game.

◆ Draw3D() [1/2]

void EditorGame::Draw3D ( )
overridevirtual

Main draw function for 3D objects.

Reimplemented from Engine3DRadSpace.Game.

◆ Draw3D() [2/2]

void EditorGame::Draw3D ( bool transparent)

◆ Get3DCursor()

Vector3 EditorGame::Get3DCursor ( ) const
noexcept

◆ Initialize()

void EditorGame::Initialize ( )
overridevirtual

Initialization method.

Reimplemented from Engine3DRadSpace.Game.

◆ IsEditor()

bool EditorGame::IsEditor ( ) const
overridevirtualnoexcept

Is this game instance an editor?

Returns
True if this instance is an editor.

summary> Appends a scene to the game.

Parameters
pathPath to the scene to append.

Implements Engine3DRadSpace.IGame.

◆ IsFocused()

bool EditorGame::IsFocused ( ) const

◆ Load()

void EditorGame::Load ( )
overridevirtual

Loads object's assets.

Reimplemented from Engine3DRadSpace.Game.

◆ Reset3DCursor()

void EditorGame::Reset3DCursor ( )

◆ SelectObject()

void EditorGame::SelectObject ( IObject * obj)

◆ Update()

void EditorGame::Update ( )
overridevirtual

Update function.

Reimplemented from Engine3DRadSpace.Game.


The documentation for this class was generated from the following files: