|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents a directional light object in the scene. More...
#include <DirectionalLight.hpp>


Public Member Functions | |
| DirectionalLight (const std::string &name="DirectionalLight", bool visible=true, const Math::Vector3 &direction=Math::Vector3(0.0f, -1.0f, 0.0f), const Math::Color &lightColor=Math::Color(1.0f, 1.0f, 1.0f), const Math::Color &ambientColor=Math::Color(0.1f, 0.1f, 0.1f), float intensity=1.0f) | |
| DirectionalLight complete constructor. | |
| Graphics::Rendering::DirectionalLight * | GetLight () const noexcept |
| Gets the directional light referenced by this object. | |
| void | SetLightDir (const Math::Vector3 &direction) noexcept |
| Sets the light direction. | |
| void | SetLightColor (const Math::Color &color) noexcept |
| Sets the light color. | |
| void | SetAmbientColor (const Math::Color &color) noexcept |
| Sets the ambient color. | |
| void | SetIntensity (float intensity) noexcept |
| Sets the light intensity. | |
| Math::Vector3 | GetLightDir () const noexcept |
| Gets the light direction. | |
| Math::Color | GetLightColor () const noexcept |
| Gets the light color. | |
| Math::Color | GetAmbientColor () const noexcept |
| Gets the ambient color. | |
| float | GetIntensity () const noexcept |
| Gets the light intensity. | |
| void | Sync () noexcept |
| Syncronises all the properties of this object with the underlying directional light. | |
| void | Initialize () override |
| Initializes the directional light object. | |
| void | Update () override |
| Calls Sync(). | |
| void | Load () override |
| Does nothing. | |
| void | Load (const std::filesystem::path &path) override |
| Does nothing. | |
| Reflection::UUID | GetUUID () const noexcept override |
| Gets the UUID of the DirectionalLight class type. | |
| Gizmos::IGizmo * | GetGizmo () const noexcept override |
| Gets the gizmo associated with this object. | |
| Public Member Functions inherited from Engine3DRadSpace.Objects.IObject | |
| 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. | |
| 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 | ~IInitializable ()=default |
| Public Member Functions inherited from Engine3DRadSpace.IUpdateable | |
| void | Update () |
| virtual | ~IUpdateable ()=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.Objects.IObject | |
| std::string | Name |
| Name of the object. | |
| ChildObjectCollection | Children |
| Children of this object. | |
| Protected Member Functions inherited from Engine3DRadSpace.Objects.IObject | |
| 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 inherited from Engine3DRadSpace.Objects.IObject | |
| IGame * | _game = nullptr |
| Graphics::IGraphicsDevice * | _device = nullptr |
| IObject * | _parent = nullptr |
| Properties inherited from Engine3DRadSpace.Objects.IObject | |
| 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] |
Represents a directional light object in the scene.
|
explicit |
DirectionalLight complete constructor.
| name | Name of this object |
| visible | Whether the light is visible |
| direction | Direction of the light |
| lightColor | Color of the light |
| ambientColor | Ambient color of the light |
| intensity | Intensity of the light |
|
noexcept |
Gets the ambient color.
|
overridevirtualnoexcept |
Gets the gizmo associated with this object.
Implements Engine3DRadSpace.Objects.IObject.
|
noexcept |
Gets the light intensity.
|
noexcept |
Gets the directional light referenced by this object.
|
noexcept |
Gets the light color.
|
noexcept |
Gets the light direction.
|
overridevirtualnoexcept |
Gets the UUID of the DirectionalLight class type.
Implements Engine3DRadSpace.Objects.IObject.
|
overridevirtual |
Initializes the directional light object.
Implements Engine3DRadSpace.IInitializable.
|
overridevirtual |
Does nothing.
Implements Engine3DRadSpace.ILoadable.
|
overridevirtual |
|
noexcept |
Sets the ambient color.
| color | Ambient color |
|
noexcept |
Sets the light intensity.
| intensity | Light intensity |
|
noexcept |
Sets the light color.
| color | Light color |
|
noexcept |
Sets the light direction.
| direction | Light direction |
|
noexcept |
Syncronises all the properties of this object with the underlying directional light.
|
overridevirtual |
Calls Sync().
Implements Engine3DRadSpace.IUpdateable.