class
LightInstanceAttributesThis class describes an instance of a light - its template name, location/direction, color, intensity, type and other parameters if appropriate.
Base classes
- class AbstractAttributes
- Base class for all implemented attributes. Inherits from esp::
core:: managedContainers:: AbstractFileBasedManagedObject so the attributes can be managed by a esp:: core:: managedContainers:: ManagedContainer.
Constructors, destructors, conversion operators
-
LightInstanceAttributes(const std::
string& handle = "") explicit
Public functions
-
void setPosition(const Magnum::
Vector3& position) - Set the position of the light. Used for positional lights.
-
auto getPosition() const -> Magnum::
Vector3 - Get the position of the light. Used for positional lights.
-
void setDirection(const Magnum::
Vector3& direction) - Set the direction of the light. Used for directional lights.
-
auto getDirection() const -> Magnum::
Vector3 - Get the direction of the light. Used for directional lights.
-
void setColor(const Magnum::
Vector3& color) - Set the color of the light.
-
auto getColor() const -> Magnum::
Vector3 - Get the color of the light.
- void setIntensity(double intensity)
- Set the intensity of the light.
- auto getIntensity() const -> double
- Get the intensity of the light.
-
void setType(const std::
string& type) - Set the type of the light.
-
auto getType() const -> gfx::
LightType - Get the type of the light.
-
void setPositionModel(const std::
string& position_model) - Set the string key to the gfx::LightPositionModel to use when placing the light - whether the lights translation should be relative to the camera, the global scene origin, or some object.
-
auto getPositionModel() const -> gfx::
LightPositionModel - Get the gfx::
LightPositionModel to use when placing the light - whether the lights translation should be relative to the camera, the global scene origin, or some object. -
auto getSpotlightConfiguration() const -> std::
shared_ptr<Configuration> - Gets a smart pointer reference to a copy of the spotlight configuration data for this LightInstanceAttributes.
-
auto editSpotlightConfiguration() -> std::
shared_ptr<Configuration> - Gets a smart pointer reference to the actual spotlight configuration data for this LightInstanceAttributes.
-
void setInnerConeAngle(Magnum::
Rad innerConeAngle) - Set inner cone angle for spotlights. This value resides in subconfig 'spot'. Should be ignored for other lights.
-
auto getInnerConeAngle() const -> Magnum::
Rad - Get inner cone angle for spotlights. This value resides in subconfig 'spot'. Should be ignored for other lights.
-
void setOuterConeAngle(Magnum::
Rad outerConeAngle) - Set outer cone angle for spotlights. This value resides in subconfig 'spot'. Should be ignored for other lights.
-
auto getOuterConeAngle() const -> Magnum::
Rad - Get outer cone angle for spotlights. This value resides in subconfig 'spot'. Should be ignored for other lights.
- void writeValuesToJson(io::JsonGenericValue& jsonObj, io::JsonAllocator& allocator) const override
- Populate a json object with all the first-level values held in this configuration. Default is overridden to handle special cases for LightInstanceAttributes.
Protected functions
-
auto getObjectInfoHeaderInternal() const -> std::
string override - Retrieve a comma-separated string holding the header values for the info returned for this managed object, type-specific.
-
auto getObjectInfoInternal() const -> std::
string override - Retrieve a comma-separated informational string about the contents of this managed object. TODO : once Magnum supports retrieving key-values of configurations, use that to build this data.