3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Objects.IObject Class Referenceabstract

Base polymorphic type of all objects that can be contained in a scene/ObjectList. More...

#include <IObject.hpp>

Inheritance diagram for Engine3DRadSpace.Objects.IObject:
Collaboration diagram for Engine3DRadSpace.Objects.IObject:

Public Member Functions

void Enable ()
void Disable ()
bool Switch ()
void Show ()
void Hide ()
bool SwitchVisibility ()
IObject GetChild (int idx)
int GetChildrenCount ()
void InternalInitialize (IGame *game)
 Called by ObjectsList to set the _game Game instance. If there are objects manually managed, this MUST be called before Initialize or EditorInitialize.
virtual Reflection::UUID GetUUID () const noexcept=0
 Returns the unique identifier of this object. This is used for serialization and deserialization.
virtual Objects::Gizmos::IGizmo * GetGizmo () const noexcept=0
 Returns the gizmo object of this object, used for editor/debug rendering.
Graphics::IGraphicsDevice * GetGraphicsDeviceHandle () const noexcept
 Returns the graphics device handle associated with this object.
IGame * GetGame () const noexcept
 Gets the game that this object belongs to.
IObject * operator[] (size_t idxChild) const
 Returns the idx-th child of this object.
IObject * GetParent () const noexcept
 Returns the parent of this object.
void SetParent (IObject *newParent) noexcept
 Sets the parent of this object.
bool HasParent () const noexcept
 Checks if this object has a parent.
size_t GetChildrenCount () const noexcept
 Returns the number of children of this object.
virtual void Enable ()
 Enables this object.
virtual void Disable ()
 Disables this object.
virtual bool Switch ()
 Switched the enable/disable state of this object.
virtual void Show ()
 Shows this object.
virtual void Hide ()
 Hides this object.
virtual bool SwitchVisibility ()
 Switches the visibility state of this object.
void Uninitialize () override
 Called before the object has the destructor called.
virtual ~IObject ()
Public Member Functions inherited from Engine3DRadSpace.IInitializable
void Initialize ()
virtual void Initialize ()=0
 Initialization method.
virtual ~IInitializable ()=default
Public Member Functions inherited from Engine3DRadSpace.IUpdateable
void Update ()
virtual void Update ()=0
 Update function.
virtual ~IUpdateable ()=default
Public Member Functions inherited from Engine3DRadSpace.ILoadable
void Load ()
void Load (string path)
virtual void Load ()=0
 Loads object's assets.
virtual void Load (const std::filesystem::path &path)=0
 Reloads assets from another path. The initial underlying asset will not be replaced in the content manager.
virtual ~ILoadable ()=default

Public Attributes

std::string Name
 Name of the object.
ChildObjectCollection Children
 Children of this object.

Protected Member Functions

 IObject (const std::string &name="Empty", bool enabled=false, bool visible=false)
 Default constructor used for reflection. Objects created with this constructor are initially invalid, until internalInitialize() is called.
 IObject (const IObject &) noexcept=delete
IObject & operator= (const IObject &) noexcept=delete
 IObject (IObject &&) noexcept=default
IObject & operator= (IObject &&) 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.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.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

IGame * _game = nullptr
Graphics::IGraphicsDevice * _device = nullptr
IObject * _parent = nullptr

Properties

string Name [get, set]
bool Enabled [get, set]
 Is this object enabled?
bool Visible [get, set]
 Is this object visible?
Reflection.UUID UUID [get]
IGame Game [get]
IGraphicsDevice GraphicsDevice [get]
IGizmo Gizmo [get]
ObjectCollection Children [get]
IObject Parent [get, set]
Properties inherited from Engine3DRadSpace.IPtrWrapper
IntPtr Handle [get]

Friends

class Game
class ObjectList

Detailed Description

Base polymorphic type of all objects that can be contained in a scene/ObjectList.

Constructor & Destructor Documentation

◆ IObject() [1/3]

IObject::IObject ( const std::string & name = "Empty",
bool enabled = false,
bool visible = false )
explicitprotected

Default constructor used for reflection. Objects created with this constructor are initially invalid, until internalInitialize() is called.

Parameters
name
tag
enabled
visible

◆ IObject() [2/3]

Engine3DRadSpace.Objects.IObject.IObject ( const IObject & )
protecteddeletenoexcept

◆ IObject() [3/3]

Engine3DRadSpace.Objects.IObject.IObject ( IObject && )
protecteddefaultnoexcept

◆ ~IObject()

IObject::~IObject ( )
virtual

Member Function Documentation

◆ Disable() [1/2]

void IObject.Disable ( )

◆ Disable() [2/2]

◆ Enable() [1/2]

void IObject.Enable ( )

◆ Enable() [2/2]

◆ GetChild()

IObject Engine3DRadSpace.Objects.IObject.GetChild ( int idx)

◆ GetChildrenCount() [1/2]

int Engine3DRadSpace.Objects.IObject.GetChildrenCount ( )

◆ GetChildrenCount() [2/2]

size_t IObject::GetChildrenCount ( ) const
noexcept

Returns the number of children of this object.

Returns
The number of children.

◆ GetGame()

IGame * IObject::GetGame ( ) const
noexcept

Gets the game that this object belongs to.

Returns

◆ GetGizmo()

◆ GetGraphicsDeviceHandle()

IGraphicsDevice * IObject::GetGraphicsDeviceHandle ( ) const
noexcept

Returns the graphics device handle associated with this object.

Returns
Pointer to the graphics device handle.

◆ GetParent()

IObject * IObject::GetParent ( ) const
noexcept

Returns the parent of this object.

Returns
Pointer to the parent object.

◆ GetUUID()

◆ HasParent()

bool IObject::HasParent ( ) const
noexcept

Checks if this object has a parent.

Returns
True if this object has a parent, false otherwise.

◆ Hide() [1/2]

void IObject.Hide ( )

◆ Hide() [2/2]

virtual void Engine3DRadSpace.Objects.IObject.Hide ( )
virtual

Hides this object.

Reimplemented in Engine3DRadSpace.Objects.InstIObject.

◆ InternalInitialize()

void IObject::InternalInitialize ( IGame * game)

Called by ObjectsList to set the _game Game instance. If there are objects manually managed, this MUST be called before Initialize or EditorInitialize.

Parameters
gameApplication context

◆ operator=() [1/2]

IObject & Engine3DRadSpace.Objects.IObject.operator= ( const IObject & )
protecteddeletenoexcept

◆ operator=() [2/2]

IObject & Engine3DRadSpace.Objects.IObject.operator= ( IObject && )
protecteddefaultnoexcept

◆ operator[]()

IObject * IObject::operator[] ( size_t idxChild) const

Returns the idx-th child of this object.

Parameters
idxChildChild index
Returns
Pointer to the idx-th child object.

◆ SetParent()

void IObject::SetParent ( IObject * newParent)
noexcept

Sets the parent of this object.

Parameters
newParentPointer to the new parent object.

◆ Show() [1/2]

void IObject.Show ( )

◆ Show() [2/2]

virtual void Engine3DRadSpace.Objects.IObject.Show ( )
virtual

Shows this object.

Reimplemented in Engine3DRadSpace.Objects.InstIObject.

◆ Switch() [1/2]

bool IObject.Switch ( )

◆ Switch() [2/2]

Switched the enable/disable state of this object.

Returns
The new state.

Reimplemented in Engine3DRadSpace.Objects.InstIObject, Engine3DRadSpace.Objects.SoundEffect, and Engine3DRadSpace.Objects.SoundSource.

◆ SwitchVisibility() [1/2]

bool IObject.SwitchVisibility ( )

◆ SwitchVisibility() [2/2]

Switches the visibility state of this object.

Returns
The new visibility state.

Reimplemented in Engine3DRadSpace.Objects.InstIObject.

◆ Uninitialize()

void IObject::Uninitialize ( )
overridevirtual

Called before the object has the destructor called.

Implements Engine3DRadSpace.IInitializable.

◆ Game

friend class Game
friend

◆ ObjectList

friend class ObjectList
friend

Member Data Documentation

◆ _device

Graphics::IGraphicsDevice* Engine3DRadSpace.Objects.IObject._device = nullptr
protected

◆ _game

IGame* Engine3DRadSpace.Objects.IObject._game = nullptr
protected

◆ _parent

IObject* Engine3DRadSpace.Objects.IObject._parent = nullptr
protected

◆ Children

◆ Name

Name of the object.

Property Documentation

◆ Children

ObjectCollection Engine3DRadSpace.Objects.IObject.Children
get

◆ Enabled

bool Engine3DRadSpace.Objects.IObject.Enabled
getset

Is this object enabled?

◆ Game

IGame Engine3DRadSpace.Objects.IObject.Game
get

◆ Gizmo

IGizmo Engine3DRadSpace.Objects.IObject.Gizmo
get

◆ GraphicsDevice

IGraphicsDevice Engine3DRadSpace.Objects.IObject.GraphicsDevice
get

◆ Name

string Engine3DRadSpace.Objects.IObject.Name
getset

◆ Parent

IObject Engine3DRadSpace.Objects.IObject.Parent
getset

◆ UUID

Reflection.UUID Engine3DRadSpace.Objects.IObject.UUID
get

◆ Visible

bool Engine3DRadSpace.Objects.IObject.Visible
getset

Is this object visible?


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