![]() |
Lysa
0.0
Lysa 3D Engine
|
Omnidirectional light, such as a light bulb or a candle
Inheritance diagram for OmniLight:Public Member Functions | |
| OmniLight (const std::string &name=TypeNames[OMNI_LIGHT], Type type=OMNI_LIGHT) | |
| OmniLight (float range, const float4 &color={1.0f, 1.0f, 1.0f, 1.0f}, const std::string &nodeName=TypeNames[OMNI_LIGHT], Type type=OMNI_LIGHT) | |
| ~OmniLight () override = default | |
| auto | getRange () const |
| void | setRange (float range) |
| auto | getNearClipDistance () const |
| void | setProperty (const std::string &property, const std::string &value) override |
| LightData | getLightData () const override |
Public Member Functions inherited from Light | |
| ~Light () override = default | |
| const auto & | getColorAndIntensity () const |
| void | setColorAndIntensity (const float4 &colorAndIntensity) |
| auto | getCastShadows () const |
| void | setCastShadows (bool castShadows) |
| auto | getLightType () const |
| auto | getShadowMapSize () const |
| void | setShadowMapSize (const int32 shadowMapSize) |
| auto | getShadowTransparencyScissors () const |
| auto | setShadowTransparencyScissors (const float scissors) |
| auto | getShadowTransparencyColorScissors () const |
| auto | setShadowTransparencyColorScissors (const float scissors) |
Public Member Functions inherited from Node | |
| Node (const Node &node) | |
| Node (const std::string &name=TypeNames[NODE], Type type=NODE) | |
| auto | getId () const |
| virtual void | onReady () |
| virtual void | onEnterScene () |
| virtual void | onExitScene () |
| virtual void | onProcess (const float alpha) |
| virtual void | onPhysicsProcess (const float delta) |
| virtual bool | onInput (InputEvent &inputEvent) |
| void | setTransformLocal (const float4x4 &transform) |
| const float4x4 & | getTransformGlobal () const |
| const float4x4 & | getTransform () const |
| virtual void | setPosition (const float3 &position) |
| virtual void | setPosition (const float x, const float y, const float z) |
| float3 | getPosition () const |
| void | translate (const float3 &localOffset) |
| void | translate (float x, float y, float z) |
| virtual void | setPositionGlobal (const float3 &position) |
| virtual void | setPositionGlobal (const float x, const float y, const float z) |
| float3 | getPositionGlobal () const |
| void | rotateX (float angle) |
| void | rotateY (float angle) |
| void | rotateZ (float angle) |
| quaternion | getRotation () const |
| quaternion | getRotationGlobal () const |
| float3 | getRotationEulerAngles () const |
| float3 | getRotationEulerAnglesGlobal () const |
| virtual void | scale (float scale) |
| void | setRotation (const quaternion &quat) |
| void | setRotationGlobal (const quaternion &quat) |
| void | setRotationX (float angle) |
| void | setRotationY (float angle) |
| void | setRotationZ (float angle) |
| float | getRotationX () const |
| float | getRotationY () const |
| float | getRotationZ () const |
| float3 | getScale () const |
| float3 | getScaleGlobal () const |
| auto * | getParent () const |
| bool | addChild (std::shared_ptr< Node > child, bool async=false) |
| bool | removeChild (const std::shared_ptr< Node > &child, bool async=false) |
| void | removeAllChildren (bool async=false) |
| bool | haveChild (const std::shared_ptr< Node > &child, bool recursive) const |
| void | lookAt (const float3 &target) |
| template<typename T = Node> | |
| std::shared_ptr< T > | getChild (const std::string &name) const |
| template<typename T = Node> | |
| std::shared_ptr< T > | getChildByPath (const std::string &path) const |
| template<typename T = Node> | |
| std::shared_ptr< T > | findFirstChild (const std::string &name) const |
| template<typename T > | |
| std::shared_ptr< T > | findFirstChild (const bool recursive=true) const |
| template<typename T > | |
| std::list< std::shared_ptr< T > > | findAllChildren (const bool recursive=true) const |
| template<typename T = Node> | |
| std::list< std::shared_ptr< T > > | findAllChildren (const std::string &name, const bool recursive=true) const |
| template<typename T = Node> | |
| std::list< std::shared_ptr< T > > | findAllChildrenByGroup (const std::string &groupName, const bool recursive=true) const |
| const std::list< std::shared_ptr< Node > > & | getChildren () const |
| const std::list< std::string > & | getGroups () const |
| void | addToGroup (const std::string &group) |
| void | removeFromGroup (const std::string &group) |
| bool | isVisible () const |
| virtual void | setVisible (bool visible=true) |
| auto | isInGroup (const std::string &group) const |
| void | setProcessMode (const ProcessMode mode) |
| bool | isProcessed () const |
| auto | getType () const |
| auto | getViewport () const |
| const std::string & | getName () const |
| std::string | getPath () const |
| void | printTree (int tab=0) const |
| std::shared_ptr< Node > | duplicate (bool recursiveFilter=false) const |
| float3 | toGlobal (const float3 &local) const |
| float3 | toLocal (const float3 &global) const |
| float3 | getRightVector () const |
| float3 | getLeftVector () const |
| float3 | getFrontVector () const |
| float3 | getBackVector () const |
| float3 | getUpVector () const |
| float3 | getDownVector () const |
| void | setName (const std::string &nodeName) |
| template<typename T > | |
| std::shared_ptr< Tween > | createPropertyTween (typename PropertyTween< T >::Setter set, const T initial, const T final, float duration, const TransitionType ttype=TransitionType::LINEAR, const Tween::Callback &callback=nullptr) |
| void | killTween (const std::shared_ptr< Tween > &tween) |
| auto | getSharedPtr () |
| ~Node () override = default | |
Public Member Functions inherited from Object | |
| void | connect (const Signal::signal &name, const Signal::Handler &handler) |
| void | connect (const Signal::signal &name, const std::function< void ()> &handler) |
| void | emit (const Signal::signal &name, void *params=nullptr) |
| virtual std::string | toString () const |
| Object () = default | |
| virtual | ~Object () = default |
Public Member Functions inherited from Updatable | |
| auto | isUpdated () const |
| void | decrementUpdates () |
| void | setUpdated () |
| void | setMaxUpdates (const uint32 maxUpdates) |
Protected Member Functions | |
| std::shared_ptr< Node > | duplicateInstance () const override |
Protected Member Functions inherited from Light | |
| Light (const std::string &nodeName=TypeNames[LIGHT], Type type=LIGHT) | |
| Light (const float4 &color, const std::string &nodeName=TypeNames[LIGHT], Type type=LIGHT) | |
Protected Member Functions inherited from Node | |
| virtual void | updateGlobalTransform () |
| virtual void | ready () |
| virtual void | physicsProcess (float delta) |
| virtual void | process (float alpha) |
| virtual void | enterScene () |
| virtual void | exitScene () |
| virtual void | attachToViewport (Viewport *viewport) |
| virtual void | detachFromViewport () |
| virtual void | pause () |
| virtual void | resume () |
Additional Inherited Members | |
Public Types inherited from Light | |
| enum | LightType { LIGHT_UNKNOWN = -1, LIGHT_DIRECTIONAL = 0, LIGHT_OMNI = 1, LIGHT_SPOT = 2 } |
Public Types inherited from Node | |
| enum | Type { ANIMATION_PLAYER, CAMERA, CHARACTER, COLLISION_AREA, COLLISION_OBJECT, DIRECTIONAL_LIGHT, ENVIRONMENT, KINEMATIC_BODY, LIGHT, MESH_INSTANCE, NODE, OMNI_LIGHT, PHYSICS_BODY, RAYCAST, RIGID_BODY, SKYBOX, SPOT_LIGHT, STATIC_BODY, VIEWPORT } |
| Node type. More... | |
Public Attributes inherited from Updatable | |
| uint32 | pendingUpdates {0} |
| uint32 | maxUpdates {0} |
Static Public Attributes inherited from Light | |
| static constexpr auto | MAX_LIGHTS {100} |
Static Public Attributes inherited from Node | |
| static constexpr auto | TypeNames |
Protected Attributes inherited from Light | |
| uint32 | shadowMapSize {512} |
Protected Attributes inherited from Node | |
| float4x4 | localTransform {} |
| float4x4 | globalTransform {} |
| OmniLight | ( | const std::string & | name = TypeNames[OMNI_LIGHT], |
| Type | type = OMNI_LIGHT |
||
| ) |
Creates an OmniLight with default parameters
| OmniLight | ( | float | range, |
| const float4 & | color = {1.0f, 1.0f, 1.0f, 1.0f}, |
||
| const std::string & | nodeName = TypeNames[OMNI_LIGHT], |
||
| Type | type = OMNI_LIGHT |
||
| ) |
|
overridedefault |
|
overrideprotectedvirtual |
Reimplemented from lysa::Node::duplicateInstance()
Reimplemented in lysa::SpotLight::duplicateInstance()
|
overridevirtual |
Reimplemented from lysa::Light::getLightData()
Reimplemented in lysa::SpotLight::getLightData()
|
inline |
Returns the light near clipping distance for the shadows (default 0.1m)
|
inline |
Returns the light range (default 10m)
|
overridevirtual |
Sets a property by its name and value. Currently, not all properties in all node classes are supported.
Reimplemented from lysa::Light::setProperty()
Reimplemented in lysa::SpotLight::setProperty()
| void setRange | ( | float | range | ) |
Sets the light range