#include <light2.h>
|
| | Light2 () |
| | Constructor. More...
|
| |
| | Light2 (const Light2 &)=default |
| | Default copy constructor. More...
|
| |
| virtual | ~Light2 () |
| | Destructor. More...
|
| |
| virtual const Path & | path () const =0 |
| |
| virtual SceneItem::Ptr | sceneItem () const =0 |
| |
| virtual Type | type () const =0 |
| |
| virtual IntensityUndoableCommand::Ptr | intensityCmd (float li)=0 |
| |
| virtual void | intensity (float li) |
| |
| virtual float | intensity () const =0 |
| |
| virtual ColorUndoableCommand::Ptr | colorCmd (float r, float g, float b)=0 |
| |
| virtual void | color (float r, float g, float b) |
| |
| virtual Color3f | color () const =0 |
| |
| virtual ShadowEnableUndoableCommand::Ptr | shadowEnableCmd (bool se)=0 |
| |
| virtual void | shadowEnable (bool se) |
| |
| virtual bool | shadowEnable () const =0 |
| |
| virtual ShadowColorUndoableCommand::Ptr | shadowColorCmd (float r, float g, float b)=0 |
| |
| virtual void | shadowColor (float r, float g, float b) |
| |
| virtual Color3f | shadowColor () const =0 |
| |
| virtual DiffuseUndoableCommand::Ptr | diffuseCmd (float ld)=0 |
| |
| virtual void | diffuse (float ld) |
| |
| virtual float | diffuse () const =0 |
| |
| virtual SpecularUndoableCommand::Ptr | specularCmd (float ls)=0 |
| |
| virtual void | specular (float ls) |
| |
| virtual float | specular () const =0 |
| |
|
| virtual Value | getMetadata (const std::string &key) const =0 |
| |
| virtual bool | setMetadata (const std::string &key, const Value &value)=0 |
| |
| virtual UndoableCommand::Ptr | setMetadataCmd (const std::string &key, const Value &value) |
| |
| virtual bool | clearMetadata (const std::string &key)=0 |
| |
| virtual UndoableCommand::Ptr | clearMetadataCmd (const std::string &key) |
| |
| virtual bool | hasMetadata (const std::string &key) const =0 |
| | Returns true if metadata key has a non-empty value. More...
|
| |
Definition at line 110 of file light2.h.
◆ ColorUndoableCommand
◆ DiffuseUndoableCommand
◆ IntensityUndoableCommand
◆ Ptr
◆ ShadowColorUndoableCommand
◆ ShadowEnableUndoableCommand
◆ SpecularUndoableCommand
◆ Type
◆ Light2() [1/2]
◆ Light2() [2/2]
| Ufe::Light2::Light2 |
( |
const Light2 & |
| ) |
|
|
default |
Default copy constructor.
◆ ~Light2()
| virtual Ufe::Light2::~Light2 |
( |
| ) |
|
|
virtual |
◆ addObserver()
Add observation on the argument item for Light changes.
- Parameters
-
- Returns
- True if the observer is added. Add does nothing and returns false if the observer is already present.
◆ clearMetadata()
| virtual bool Ufe::Light2::clearMetadata |
( |
const std::string & |
key | ) |
|
|
pure virtual |
Clear the metadata key's value.
- Parameters
-
| [in] | key | The metadata key to clear. |
- Returns
- True if the metadata was cleared successfully, otherwise false.
◆ clearMetadataCmd()
Return a command for undo / redo that clear the metadata. The returned command is not executed; it is up to the caller to call execute().
◆ color() [1/2]
| virtual Color3f Ufe::Light2::color |
( |
| ) |
const |
|
pure virtual |
Retrieve the color for the light
- Returns
- the color value
◆ color() [2/2]
| virtual void Ufe::Light2::color |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b |
|
) |
| |
|
inlinevirtual |
Set the color. Default implementation uses ColorUndoableCommand.
- Parameters
-
| r | red component |
| g | green component |
| b | blue component |
Definition at line 287 of file light2.h.
◆ colorCmd()
Create an undoable command to set the color. The command is not executed.
- Parameters
-
| r | Red component of the new color value. |
| g | Green component of the new color value. |
| b | Blue component of the new color value. |
- Returns
- Undoable command to set the color
◆ diffuse() [1/2]
| virtual float Ufe::Light2::diffuse |
( |
| ) |
const |
|
pure virtual |
Retrieve the diffuse for the light
- Returns
- the diffuse value
◆ diffuse() [2/2]
| virtual void Ufe::Light2::diffuse |
( |
float |
ld | ) |
|
|
inlinevirtual |
Set the diffuse. Default implementation uses DiffuseUndoableCommand.
- Parameters
-
Definition at line 356 of file light2.h.
◆ diffuseCmd()
Create an undoable command to set the diffuse. The command is not executed.
- Parameters
-
- Returns
- Undoable command to set the diffuse
◆ getMetadata()
| virtual Value Ufe::Light2::getMetadata |
( |
const std::string & |
key | ) |
const |
|
pure virtual |
Get the value of the metadata named key.
- Parameters
-
| [in] | key | The metadata key to query. |
- Returns
- The value of the metadata key. If the key does not exist an empty Value is returned.
◆ hasMetadata()
| virtual bool Ufe::Light2::hasMetadata |
( |
const std::string & |
key | ) |
const |
|
pure virtual |
Returns true if metadata key has a non-empty value.
◆ hasObserver()
Query observation on argument item for light changes.
- Parameters
-
- Returns
- True if there is observation on argument item for light changes.
◆ hasObservers() [1/2]
| static bool Ufe::Light2::hasObservers |
( |
const Path & |
path | ) |
|
|
static |
- Parameters
-
| path | Path to verify if being observed. |
- Returns
- True if the given path is being observed.
◆ hasObservers() [2/2]
| static bool Ufe::Light2::hasObservers |
( |
Rtid |
runTimeId | ) |
|
|
static |
Helper query for runtimes, to determine if any path they are responsible for is being observed.
- Parameters
-
| runTimeId | runtime Id to find observers on. |
- Returns
- True if any path of given runtime Id are being observed.
◆ intensity() [1/2]
| virtual float Ufe::Light2::intensity |
( |
| ) |
const |
|
pure virtual |
Retrieve the intensity for the light
- Returns
- the intensity value
◆ intensity() [2/2]
| virtual void Ufe::Light2::intensity |
( |
float |
li | ) |
|
|
inlinevirtual |
Set the intensity. Default implementation uses IntensityUndoableCommand.
- Parameters
-
| li | the new intensity value. |
Definition at line 263 of file light2.h.
◆ intensityCmd()
Create an undoable command to set the intensity. The command is not executed.
- Parameters
-
| li | the new intensity value. |
- Returns
- Undoable command to set the intensity
◆ light()
Convenience method that calls the Ufe::Light2Handler::light() method on the Light handler for the item. Returns a null pointer if the argument is null, is an empty path or if the item does not support the Light interface.
- Parameters
-
- Returns
- Light of the given SceneItem
◆ nbObservers()
| static std::size_t Ufe::Light2::nbObservers |
( |
const SceneItem::Ptr & |
item | ) |
|
|
static |
Number of observers on the given SceneItem.
- Parameters
-
- Returns
- Number of observers on SceneItem.
◆ notify()
Notify all observers of the item with this path. If no observer exists, does nothing.
- Parameters
-
◆ path()
| virtual const Path & Ufe::Light2::path |
( |
| ) |
const |
|
pure virtual |
- Returns
- the object's Path.
◆ removeObserver()
Remove observation on the argument item for Light changes.
- Parameters
-
- Returns
- True if the observer is removed. False if the observer isn't found.
◆ sceneItem()
◆ setMetadata()
| virtual bool Ufe::Light2::setMetadata |
( |
const std::string & |
key, |
|
|
const Value & |
value |
|
) |
| |
|
pure virtual |
Set the metadata key's value to value.
- Parameters
-
| [in] | key | The metadata key to set. |
| [in] | value | The value to set. |
- Returns
- True if the metadata was set successfully, otherwise false.
◆ setMetadataCmd()
Return a command for undo / redo that sets the metadata key's value to value. The returned command is not executed; it is up to the caller to call execute().
◆ shadowColor() [1/2]
| virtual Color3f Ufe::Light2::shadowColor |
( |
| ) |
const |
|
pure virtual |
Retrieve the shadow color for the light
- Returns
- the shadow color value
◆ shadowColor() [2/2]
| virtual void Ufe::Light2::shadowColor |
( |
float |
r, |
|
|
float |
g, |
|
|
float |
b |
|
) |
| |
|
inlinevirtual |
Set the shadow color. Default implementation uses ShadowColorUndoableCommand.
- Parameters
-
| r | red component |
| g | green component |
| b | blue component |
Definition at line 333 of file light2.h.
◆ shadowColorCmd()
Create an undoable command to set the shadow color. The command is not executed.
- Parameters
-
| r | Red component of the new shadow color value. |
| g | Green component of the new shadow color value. |
| b | Blue component of the new shadow color value. |
- Returns
- Undoable command to set the shadow color
◆ shadowEnable() [1/2]
| virtual bool Ufe::Light2::shadowEnable |
( |
| ) |
const |
|
pure virtual |
Retrieve the shadow enable flag
- Returns
- the shadow enable flag value
◆ shadowEnable() [2/2]
| virtual void Ufe::Light2::shadowEnable |
( |
bool |
se | ) |
|
|
inlinevirtual |
Set the shadow enable flag. Default implementation uses ShadowEnableUndoableCommand.
- Parameters
-
| se | the new shadow enable flag value. |
Definition at line 309 of file light2.h.
◆ shadowEnableCmd()
Create an undoable command to set the shadow enable flag. The command is not executed.
- Parameters
-
| se | the new shadow enable flag value. |
- Returns
- Undoable command to set the shadow enable flag
◆ specular() [1/2]
| virtual float Ufe::Light2::specular |
( |
| ) |
const |
|
pure virtual |
Retrieve the specular for the light
- Returns
- the specular value
◆ specular() [2/2]
| virtual void Ufe::Light2::specular |
( |
float |
ls | ) |
|
|
inlinevirtual |
Set the specular. Default implementation uses SpecularUndoableCommand.
- Parameters
-
| ls | the new specular value. |
Definition at line 379 of file light2.h.
◆ specularCmd()
Create an undoable command to set the specular. The command is not executed.
- Parameters
-
| ls | the new specular value. |
- Returns
- Undoable command to set the specular
◆ type()
| virtual Type Ufe::Light2::type |
( |
| ) |
const |
|
pure virtual |
◆ interfaces
The documentation for this class was generated from the following file: