#include <hps.h>
Public Member Functions | |
void | Consume (SpotlightKit &in_kit) |
HPS::Type | ObjectType () const |
SpotlightKey & | operator= (SpotlightKey const &in_that) |
SpotlightKey & | operator= (SpotlightKey &&in_that) |
void | Set (SpotlightKit const &in_kit) |
SpotlightKey & | SetCameraRelative (bool in_state) |
SpotlightKey & | SetColor (RGBAColor const &in_rgba_color) |
SpotlightKey & | SetColorByIndex (float in_index) |
SpotlightKey & | SetConcentration (float in_concentration) |
SpotlightKey & | SetInnerCone (float in_size, HPS::Spotlight::InnerConeUnits in_units=HPS::Spotlight::InnerConeUnits::Percent) |
SpotlightKey & | SetOuterCone (float in_size, HPS::Spotlight::OuterConeUnits in_units=HPS::Spotlight::OuterConeUnits::Degrees) |
SpotlightKey & | SetPosition (HPS::Point const &in_position) |
SpotlightKey & | SetTarget (HPS::Point const &in_target) |
void | Show (SpotlightKit &out_kit) const |
bool | ShowCameraRelative (bool &out_state) const |
bool | ShowColor (Material::Type &out_type, RGBAColor &out_rgba_color, float &out_index) const |
bool | ShowConcentration (float &out_concentration) const |
bool | ShowInnerCone (float &out_size, HPS::Spotlight::InnerConeUnits &out_units) const |
bool | ShowOuterCone (float &out_size, HPS::Spotlight::OuterConeUnits &out_units) const |
bool | ShowPosition (HPS::Point &out_position) const |
bool | ShowTarget (HPS::Point &out_target) const |
SpotlightKey () | |
SpotlightKey (Key const &in_that) | |
SpotlightKey (SpotlightKey const &in_that) | |
SpotlightKey (SpotlightKey &&in_that) | |
SpotlightKey & | UnsetColor () |
![]() | |
GeometryKey () | |
GeometryKey (Key const &in_that) | |
GeometryKey (GeometryKey const &in_that) | |
GeometryKey (GeometryKey &&in_that) | |
GeometryKey & | operator= (GeometryKey const &in_that) |
GeometryKey & | operator= (GeometryKey &&in_that) |
GeometryKey & | SetPriority (int in_priority) |
GeometryKey & | SetUserData (intptr_t in_index, size_t in_bytes, byte const in_data[]) |
GeometryKey & | SetUserData (intptr_t in_index, ByteArray const &in_data) |
GeometryKey & | SetUserData (IntPtrTArray const &in_indices, ByteArrayArray const &in_data) |
bool | ShowBounding (BoundingKit &out_kit) const |
bool | ShowPriority (int &out_priority) const |
size_t | ShowReferrers (SegmentKeyArray &out_segments) const |
size_t | ShowReferrers (ReferenceKeyArray &out_references) const |
bool | ShowUserData (intptr_t in_index, ByteArray &out_data) const |
bool | ShowUserData (IntPtrTArray &out_indices, ByteArrayArray &out_data) const |
size_t | ShowUserDataCount () const |
bool | ShowUserDataIndices (IntPtrTArray &out_indices) const |
GeometryKey & | UnsetAllUserData () |
GeometryKey & | UnsetPriority () |
GeometryKey & | UnsetUserData (intptr_t in_index) |
GeometryKey & | UnsetUserData (size_t in_count, intptr_t const in_indices[]) |
GeometryKey & | UnsetUserData (IntPtrTArray const &in_indices) |
![]() | |
virtual void | Assign (Key const &in_that) |
Key | CopyTo (SegmentKey const &in_destination) const |
void | Delete () |
bool | Equals (Key const &in_that) const |
size_t | GetHash () const |
bool | HasOwner () const |
Key () | |
Key (Key const &in_that) | |
Key (Control const &in_control) | |
Key (Key &&in_that) | |
void | MoveTo (SegmentKey const &in_new_owner) |
bool | operator!= (Key const &in_that) const |
Key & | operator= (Key &&in_that) |
Key & | operator= (Key const &in_that) |
bool | operator== (Key const &in_that) const |
SegmentKey | Owner () const |
SegmentKey | Up () const |
virtual | ~Key () |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
HPS::Type | Type () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The SpotlightKey class is a smart pointer to a database object. It is a handle to a spotlight inserted via SegmentKey::InsertSpotlight.
HPS::SpotlightKey::SpotlightKey | ( | ) |
The default constructor creates an uninitialized SpotlightKey object. The Type() function will return Type::None.
|
explicit |
This constructor creates a SpotlightKey object that shares the underlying smart-pointer of the source Key. The copy will only be successful if the source key is really an upcast of a Spotlight key. Otherwise the copy will fail and the resulting SpotlightKey will be invalid.
in_key | The source Key to copy. |
HPS::SpotlightKey::SpotlightKey | ( | SpotlightKey const & | in_that | ) |
The copy constructor creates a SpotlightKey object that shares the underlying smart-pointer of the source SpotlightKey.
in_that | The source SpotlightKey to copy. |
HPS::SpotlightKey::SpotlightKey | ( | SpotlightKey && | in_that | ) |
The move constructor creates a SpotlightKey by transferring the underlying impl of the rvalue reference to this SpotlightKey thereby avoiding a copy and allocation.
in_that | An rvalue reference to a SpotlightKey to take the impl from. |
void HPS::SpotlightKey::Consume | ( | SpotlightKit & | in_kit | ) |
Completely replaces all settings on this SpotlightKey with those set on the specified kit and resets the kit.InfiniteLineKey
in_kit | The kit from which to get the settings to replace on this SpotlightKey. |
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::GeometryKey.
SpotlightKey& HPS::SpotlightKey::operator= | ( | SpotlightKey const & | in_that | ) |
Associate this SpotlightKey with the same underlying impl as the source SpotlightKey.
in_that | The source SpotlightKey for the assignment. |
SpotlightKey& HPS::SpotlightKey::operator= | ( | SpotlightKey && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this SpotlightKey thereby avoiding a copy.
in_that | An rvalue reference to a SpotlightKey to take the impl from. |
void HPS::SpotlightKey::Set | ( | SpotlightKit const & | in_kit | ) |
Replace those settings on this SpotlightKey with those set on the specified kit.
in_kit | The kit from which to get the settings to replace on this SpotlightKey. |
SpotlightKey& HPS::SpotlightKey::SetCameraRelative | ( | bool | in_state | ) |
Sets whether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space.
in_state | Whether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space. |
SpotlightKey& HPS::SpotlightKey::SetColor | ( | RGBAColor const & | in_rgba_color | ) |
Sets the RGBA color to use for this SpotlightKey.
in_rgba_color | The RGBA color to use for this SpotlightKey. |
SpotlightKey& HPS::SpotlightKey::SetColorByIndex | ( | float | in_index | ) |
Sets the color index to use for this SpotlightKey.
in_index | The color index to use for this SpotlightKey. |
SpotlightKey& HPS::SpotlightKey::SetConcentration | ( | float | in_concentration | ) |
Sets the concentration for this SpotlightKey. The concentration defines the rate at which light intensity decreases with increasing angular distance from the light direction vector. This effect works in addition to the decrease that occurs between the inner and outer cones.
in_concentration | The concentration for the SpotlightKey. This value must be non-negative. A value of 0.0f defines no intensity decrease (besides that between the inner and outer cone), and larger values will concentrate intensity closer to the light direction vector. |
SpotlightKey& HPS::SpotlightKey::SetInnerCone | ( | float | in_size, |
HPS::Spotlight::InnerConeUnits | in_units = HPS::Spotlight::InnerConeUnits::Percent |
||
) |
Sets the size of the inner cone for this SpotlightKey. The inner cone defines the conic region inside the conic region defined by the outer cone at which the spotlight intensity will decrease linearly to zero at the outer cone's edge. As such, the size of the inner cone should be no larger than the outer cone.
in_size | The size of the inner cone for this SpotlightKey. The interpretation of the value and its valid range depends on the units argument. |
in_units | The units for the size of the inner cone for this SpotlightKey. Defaults to Spotlight::InnerConeUnits::Degrees. |
SpotlightKey& HPS::SpotlightKey::SetOuterCone | ( | float | in_size, |
HPS::Spotlight::OuterConeUnits | in_units = HPS::Spotlight::OuterConeUnits::Degrees |
||
) |
Sets the size of the outer cone for this SpotlightKey. The outer cone defines the conic region inside of which surfaces will be illuminated by this spotlight. Any surface outside this conic region will not be illuminated by this spotlight.
in_size | The size of the outer cone for this SpotlightKey. The interpretation of the value and its valid range depends on the units argument. |
in_units | The units for the size of the outer cone for this SpotlightKey. Defaults to Spotlight::OuterConeUnits::Degrees. |
SpotlightKey& HPS::SpotlightKey::SetPosition | ( | HPS::Point const & | in_position | ) |
Sets the position of the light source for this SpotlightKey.
in_position | The position of the light source for this SpotlightKey. The point will either be treated as being in object space or in camera-relative units depending on the setting passed to SetCameraRelative. |
SpotlightKey& HPS::SpotlightKey::SetTarget | ( | HPS::Point const & | in_target | ) |
Sets the target coordinate towards which the light source points for this SpotlightKey.
in_target | The target coordinate towards which the light source points for this SpotlightKey. The point will either be treated as being in object space or in camera-relative units depending on the setting passed to SetCameraRelative. |
void HPS::SpotlightKey::Show | ( | SpotlightKit & | out_kit | ) | const |
Copy the contents of this SpotlightKey into the specified kit.
out_kit | The kit to populate with the contents of this SpotlightKey. |
bool HPS::SpotlightKey::ShowCameraRelative | ( | bool & | out_state | ) | const |
Shows whether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space.
out_state | Whether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space. |
bool HPS::SpotlightKey::ShowColor | ( | Material::Type & | out_type, |
RGBAColor & | out_rgba_color, | ||
float & | out_index | ||
) | const |
Shows the color for this SpotlightKey.
out_type | The type of color for the spotlight. |
out_rgba_color | The RGBA color for the spotlight. This is only valid if out_type is Material::Type::RGBAColor. |
out_index | The material index for the spotlight. This is only valid if out_type is Material::Type::MaterialIndex. |
bool HPS::SpotlightKey::ShowConcentration | ( | float & | out_concentration | ) | const |
Shows the concentration for this SpotlightKey.
out_concentration | The concentration for this SpotlightKey. |
bool HPS::SpotlightKey::ShowInnerCone | ( | float & | out_size, |
HPS::Spotlight::InnerConeUnits & | out_units | ||
) | const |
Shows the inner cone for this SpotlightKey.
out_size | The size of the inner cone for this SpotlightKey. |
out_units | The units for the size of the inner cone for this SpotlightKey. |
bool HPS::SpotlightKey::ShowOuterCone | ( | float & | out_size, |
HPS::Spotlight::OuterConeUnits & | out_units | ||
) | const |
Shows the outer cone for this SpotlightKey.
out_size | The size of the outer cone for this SpotlightKey. |
out_units | The units for the size of the outer cone for this SpotlightKey. |
bool HPS::SpotlightKey::ShowPosition | ( | HPS::Point & | out_position | ) | const |
Shows the position of the light source for this SpotlightKey.
out_position | The position of the light source for this SpotlightKey. |
bool HPS::SpotlightKey::ShowTarget | ( | HPS::Point & | out_target | ) | const |
Shows the target coordinate towards which the light source points for this SpotlightKey.
out_target | The target coordinate towards which the light source points for this SpotlightKey. |
SpotlightKey& HPS::SpotlightKey::UnsetColor | ( | ) |
Removes the color (RGBA or material index) set on this SpotlightKey.