#include <hps.h>
Public Member Functions | |
SpotlightKit () | |
The default constructor creates an empty SpotlightKit object. More... | |
SpotlightKit (SpotlightKit const &in_kit) | |
The copy constructor creates a new SpotlightKit object that contains the same settings as the source SpotlightKit. More... | |
SpotlightKit (SpotlightKit &&in_that) | |
The move constructor creates a SpotlightKit by transferring the underlying impl of the rvalue reference to this SpotlightKit thereby avoiding a copy and allocation. More... | |
SpotlightKit & | operator= (SpotlightKit &&in_that) |
The move assignment operator transfers the underlying impl of the rvalue reference to this SpotlightKit thereby avoiding a copy. More... | |
virtual | ~SpotlightKit () |
HPS::Type | ObjectType () const |
void | Consume (SpotlightKit &in_kit) |
Copies the source SpotlightKit into this SpotlightKit and resets the source kit. More... | |
void | Set (SpotlightKit const &in_kit) |
Copies the source SpotlightKit into this SpotlightKit. More... | |
void | Show (SpotlightKit &out_kit) const |
Copies this SpotlightKit into the given SpotlightKit. More... | |
SpotlightKit & | operator= (SpotlightKit const &in_kit) |
Copies the source SpotlightKit into this SpotlightKit. More... | |
bool | Empty () const |
Indicates whether this SpotlightKit has any values set on it. More... | |
bool | Equals (SpotlightKit const &in_kit) const |
Check if the source SpotlightKit is equivalent to this SpotlightKit. More... | |
bool | operator== (SpotlightKit const &in_kit) const |
Check if the source SpotlightKit is equivalent to this SpotlightKit. More... | |
bool | operator!= (SpotlightKit const &in_kit) const |
Check if the source SpotlightKit is not equivalent to this SpotlightKit. More... | |
SpotlightKit & | SetPriority (int in_priority) |
Assigns a specific drawing priority value to the SpotlightKit. More... | |
SpotlightKit & | SetPosition (HPS::Point const &in_position) |
Sets the position of the light source for this SpotlightKit. More... | |
SpotlightKit & | SetTarget (HPS::Point const &in_target) |
Sets the target coordinate towards which the light source points for this SpotlightKit. More... | |
SpotlightKit & | SetColor (RGBAColor const &in_rgba_color) |
Sets the RGBA color to use for this SpotlightKit. More... | |
SpotlightKit & | SetColorByIndex (float in_index) |
Sets the color index to use for this SpotlightKit. More... | |
SpotlightKit & | SetOuterCone (float in_size, HPS::Spotlight::OuterConeUnits in_units=HPS::Spotlight::OuterConeUnits::Degrees) |
Sets the size of the outer cone for this SpotlightKit. More... | |
SpotlightKit & | SetInnerCone (float in_size, HPS::Spotlight::InnerConeUnits in_units=HPS::Spotlight::InnerConeUnits::Percent) |
Sets the size of the inner cone for this SpotlightKit. More... | |
SpotlightKit & | SetConcentration (float in_concentration) |
Sets the concentration for this SpotlightKit. More... | |
SpotlightKit & | SetCameraRelative (bool in_state) |
Sets the camera-relative setting for this SpotlightKit. More... | |
SpotlightKit & | UnsetPriority () |
Removes the drawing priority setting. More... | |
SpotlightKit & | UnsetPosition () |
Removes the light source position for this SpotlightKit. More... | |
SpotlightKit & | UnsetTarget () |
Removes the target coordinate towards which the light source points for this SpotlightKit. More... | |
SpotlightKit & | UnsetColor () |
Removes the color (RGBA or material index) for this SpotlightKit. More... | |
SpotlightKit & | UnsetOuterCone () |
Removes the outer-cone size specification for this SpotlightKit. More... | |
SpotlightKit & | UnsetInnerCone () |
Removes the inner-cone size specification for this SpotlightKit. More... | |
SpotlightKit & | UnsetConcentration () |
Removes the concentration for this SpotlightKit. More... | |
SpotlightKit & | UnsetCameraRelative () |
Removes the camera-relative setting for this SpotlightKit. More... | |
SpotlightKit & | UnsetEverything () |
Removes all settings from the SpotlightKit. More... | |
bool | ShowPriority (int &out_priority) const |
Shows the drawing priority. More... | |
bool | ShowPosition (HPS::Point &out_position) const |
Shows the position of the light source for this SpotlightKit. More... | |
bool | ShowTarget (HPS::Point &out_target) const |
Shows the target coordinate towards which the light source points for this SpotlightKit. More... | |
bool | ShowColor (Material::Type &out_type, RGBAColor &out_rgba_color, float &out_index) const |
Shows the color for this SpotlightKit. More... | |
bool | ShowOuterCone (float &out_size, HPS::Spotlight::OuterConeUnits &out_units) const |
Shows the outer cone for this SpotlightKit. More... | |
bool | ShowInnerCone (float &out_size, HPS::Spotlight::InnerConeUnits &out_units) const |
Shows the inner cone for this SpotlightKit. More... | |
bool | ShowConcentration (float &out_concentration) const |
Shows the concentration for this SpotlightKit. More... | |
bool | ShowCameraRelative (bool &out_state) const |
Shows the camera-relative setting for this SpotlightKit. More... | |
SpotlightKit & | SetUserData (intptr_t in_index, size_t in_bytes, byte const in_data[]) |
Sets user data on this kit. More... | |
SpotlightKit & | SetUserData (intptr_t in_index, ByteArray const &in_data) |
Sets user data on this kit. More... | |
SpotlightKit & | SetUserData (IntPtrTArray const &in_indices, ByteArrayArray const &in_data) |
Sets user data on this kit. More... | |
SpotlightKit & | UnsetUserData (intptr_t in_index) |
Removes the user data at the given index from this kit. More... | |
SpotlightKit & | UnsetUserData (size_t in_count, intptr_t const in_indices[]) |
Removes the user data at the given indices from this kit. More... | |
SpotlightKit & | UnsetUserData (IntPtrTArray const &in_indices) |
Removes the user data at the given indices from this kit. More... | |
SpotlightKit & | UnsetAllUserData () |
Removes all user data from this kit. More... | |
size_t | ShowUserDataCount () const |
Get the number of user data indices set on this kit. More... | |
bool | ShowUserDataIndices (IntPtrTArray &out_indices) const |
Shows the indices of all user data set on this kit. More... | |
bool | ShowUserData (intptr_t in_index, ByteArray &out_data) const |
Shows the user data at a given index for this kit. More... | |
bool | ShowUserData (IntPtrTArray &out_indices, ByteArrayArray &out_data) const |
Shows all user data for this kit. More... | |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. More... | |
virtual void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
bool | HasType (HPS::Type in_mask) const |
This function indicates whether this Object has the given Type mask. More... | |
intptr_t | GetClassID () const |
Returns a unique identifier that is shared by all objects of the same class. More... | |
intptr_t | GetInstanceID () const |
Returns an identifier that can be used to identify which instance of a class an object is. More... | |
Static Public Member Functions | |
static SpotlightKit | GetDefault () |
Creates a SpotlightKit which contains the default settings. More... | |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::SpotlightKit |
The HPS::SpotlightKit class is a user space object. It is the kit counterpart to a HPS::SpotlightKey. Calling HPS::SpotlightKit::GetDefault() will return a kit with values found in this table.
HPS::SpotlightKit::SpotlightKit | ( | ) |
The default constructor creates an empty SpotlightKit object.
HPS::SpotlightKit::SpotlightKit | ( | SpotlightKit const & | in_kit | ) |
The copy constructor creates a new SpotlightKit object that contains the same settings as the source SpotlightKit.
in_kit | The source SpotlightKit to copy. |
HPS::SpotlightKit::SpotlightKit | ( | SpotlightKit && | in_that | ) |
The move constructor creates a SpotlightKit by transferring the underlying impl of the rvalue reference to this SpotlightKit thereby avoiding a copy and allocation.
in_that | An rvalue reference to a SpotlightKit to take the impl from. |
|
virtual |
|
inlinestaticinherited |
Unique identifier for this class.
Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.
void HPS::SpotlightKit::Consume | ( | SpotlightKit & | in_kit | ) |
Copies the source SpotlightKit into this SpotlightKit and resets the source kit.
in_kit | The source SpotlightKit to consume. |
|
virtual |
Indicates whether this SpotlightKit has any values set on it.
Reimplemented from HPS::Object.
bool HPS::SpotlightKit::Equals | ( | SpotlightKit const & | in_kit | ) | const |
Check if the source SpotlightKit is equivalent to this SpotlightKit.
in_kit | The source SpotlightKit to compare to this SpotlightKit. |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
static |
Creates a SpotlightKit which contains the default settings.
The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.
|
inherited |
Returns an identifier that can be used to identify which instance of a class an object is.
Different keys and controls will return the same value if they are backed by the same database resource.
|
inherited |
|
inlinevirtual |
bool HPS::SpotlightKit::operator!= | ( | SpotlightKit const & | in_kit | ) | const |
Check if the source SpotlightKit is not equivalent to this SpotlightKit.
in_kit | The source SpotlightKit to compare to this SpotlightKit. |
SpotlightKit& HPS::SpotlightKit::operator= | ( | SpotlightKit && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this SpotlightKit thereby avoiding a copy.
in_that | An rvalue reference to a SpotlightKit to take the impl from. |
SpotlightKit& HPS::SpotlightKit::operator= | ( | SpotlightKit const & | in_kit | ) |
Copies the source SpotlightKit into this SpotlightKit.
in_kit | The source SpotlightKit to copy. |
bool HPS::SpotlightKit::operator== | ( | SpotlightKit const & | in_kit | ) | const |
Check if the source SpotlightKit is equivalent to this SpotlightKit.
in_kit | The source SpotlightKit to compare to this SpotlightKit. |
|
virtualinherited |
Resets this object to its initial, uninitialized state.
Reimplemented in HPS::EventHandler, HPS::EventDispatcher, HPS::World, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::SearchResults, and HPS::SearchResultsIterator.
void HPS::SpotlightKit::Set | ( | SpotlightKit const & | in_kit | ) |
Copies the source SpotlightKit into this SpotlightKit.
in_kit | The source SpotlightKit to copy. |
SpotlightKit& HPS::SpotlightKit::SetCameraRelative | ( | bool | in_state | ) |
Sets the camera-relative setting for this SpotlightKit.
This defines what the implied units of the target and position will be.
in_state | Whether the coordinates of the position and target for this SpotlightKit are treated as being in object space or camera-relative space. |
SpotlightKit& HPS::SpotlightKit::SetColor | ( | RGBAColor const & | in_rgba_color | ) |
Sets the RGBA color to use for this SpotlightKit.
in_rgba_color | The RGBA color to use for this SpotlightKit. |
SpotlightKit& HPS::SpotlightKit::SetColorByIndex | ( | float | in_index | ) |
Sets the color index to use for this SpotlightKit.
in_index | The color index to use for this SpotlightKit. |
SpotlightKit& HPS::SpotlightKit::SetConcentration | ( | float | in_concentration | ) |
Sets the concentration for this SpotlightKit.
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 SpotlightKit. 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. |
SpotlightKit& HPS::SpotlightKit::SetInnerCone | ( | float | in_size, |
HPS::Spotlight::InnerConeUnits | in_units = HPS::Spotlight::InnerConeUnits::Percent |
||
) |
Sets the size of the inner cone for this SpotlightKit.
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 SpotlightKit. 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 SpotlightKit. Defaults to Spotlight::InnerConeUnits::Percent. |
SpotlightKit& HPS::SpotlightKit::SetOuterCone | ( | float | in_size, |
HPS::Spotlight::OuterConeUnits | in_units = HPS::Spotlight::OuterConeUnits::Degrees |
||
) |
Sets the size of the outer cone for this SpotlightKit.
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 SpotlightKit. 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 SpotlightKit. Defaults to Spotlight::OuterConeUnits::Degrees. |
SpotlightKit& HPS::SpotlightKit::SetPosition | ( | HPS::Point const & | in_position | ) |
Sets the position of the light source for this SpotlightKit.
in_position | The position of the light source for this SpotlightKit. The point will either be treated as being in object space or in camera-relative units depending on the setting passed to SetCameraRelative. |
SpotlightKit& HPS::SpotlightKit::SetPriority | ( | int | in_priority | ) |
Assigns a specific drawing priority value to the SpotlightKit.
It affects the order in which the contents of this segment are drawn if and only if the rendering algorithm is set to Priority.
in_priority | The drawing priority, higher priority items are drawn on top of lower priority items. |
SpotlightKit& HPS::SpotlightKit::SetTarget | ( | HPS::Point const & | in_target | ) |
Sets the target coordinate towards which the light source points for this SpotlightKit.
in_target | The target coordinate towards which the light source points for this SpotlightKit. The point will either be treated as being in object space or in camera-relative units depending on the setting passed to SetCameraRelative. |
SpotlightKit& HPS::SpotlightKit::SetUserData | ( | intptr_t | in_index, |
size_t | in_bytes, | ||
byte const | in_data[] | ||
) |
Sets user data on this kit.
in_index | The index of the user data to set. |
in_bytes | The number of bytes of user data to set. |
in_data | The bytes of user data to set. |
SpotlightKit& HPS::SpotlightKit::SetUserData | ( | intptr_t | in_index, |
ByteArray const & | in_data | ||
) |
Sets user data on this kit.
in_index | The index of the user data to set. |
in_data | The bytes of user data to set. |
SpotlightKit& HPS::SpotlightKit::SetUserData | ( | IntPtrTArray const & | in_indices, |
ByteArrayArray const & | in_data | ||
) |
Sets user data on this kit.
in_indices | An array of user data indices to set. |
in_data | An array of bytes of user data to set. |
void HPS::SpotlightKit::Show | ( | SpotlightKit & | out_kit | ) | const |
Copies this SpotlightKit into the given SpotlightKit.
out_kit | The SpotlightKit to populate with the contents of this SpotlightKit. |
bool HPS::SpotlightKit::ShowCameraRelative | ( | bool & | out_state | ) | const |
Shows the camera-relative setting for this SpotlightKit.
out_state | Whether the coordinates of the position and target for this SpotlightKit are treated as being in object space or camera-relative space. |
bool HPS::SpotlightKit::ShowColor | ( | Material::Type & | out_type, |
RGBAColor & | out_rgba_color, | ||
float & | out_index | ||
) | const |
Shows the color for this SpotlightKit.
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::SpotlightKit::ShowConcentration | ( | float & | out_concentration | ) | const |
Shows the concentration for this SpotlightKit.
out_concentration | The concentration for this SpotlightKit. |
bool HPS::SpotlightKit::ShowInnerCone | ( | float & | out_size, |
HPS::Spotlight::InnerConeUnits & | out_units | ||
) | const |
Shows the inner cone for this SpotlightKit.
out_size | The size of the inner cone for this SpotlightKit. |
out_units | The units for the size of the inner cone for this SpotlightKit. |
bool HPS::SpotlightKit::ShowOuterCone | ( | float & | out_size, |
HPS::Spotlight::OuterConeUnits & | out_units | ||
) | const |
Shows the outer cone for this SpotlightKit.
out_size | The size of the outer cone for this SpotlightKit. |
out_units | The units for the size of the outer cone for this SpotlightKit. |
bool HPS::SpotlightKit::ShowPosition | ( | HPS::Point & | out_position | ) | const |
Shows the position of the light source for this SpotlightKit.
out_position | The position of the light source for this SpotlightKit. |
bool HPS::SpotlightKit::ShowPriority | ( | int & | out_priority | ) | const |
Shows the drawing priority.
out_priority | The drawing priority, higher priority items are drawn on top of lower priority items. |
bool HPS::SpotlightKit::ShowTarget | ( | HPS::Point & | out_target | ) | const |
Shows the target coordinate towards which the light source points for this SpotlightKit.
out_target | The target coordinate towards which the light source points for this SpotlightKit. |
bool HPS::SpotlightKit::ShowUserData | ( | intptr_t | in_index, |
ByteArray & | out_data | ||
) | const |
Shows the user data at a given index for this kit.
in_index | The index of the user data to show. |
out_data | The user data at the given index. |
bool HPS::SpotlightKit::ShowUserData | ( | IntPtrTArray & | out_indices, |
ByteArrayArray & | out_data | ||
) | const |
Shows all user data for this kit.
out_indices | An array of all user data indices set on this kit. |
out_data | An array of all user data set on this kit. |
size_t HPS::SpotlightKit::ShowUserDataCount | ( | ) | const |
Get the number of user data indices set on this kit.
bool HPS::SpotlightKit::ShowUserDataIndices | ( | IntPtrTArray & | out_indices | ) | const |
Shows the indices of all user data set on this kit.
out_indices | The user data indices set on this kit. |
|
inlinevirtualinherited |
This function returns the true type of the underlying object.
This function is useful for finding the type of smart pointer objects that have been cast to more generic types.
Reimplemented from HPS::Object.
SpotlightKit& HPS::SpotlightKit::UnsetAllUserData | ( | ) |
Removes all user data from this kit.
SpotlightKit& HPS::SpotlightKit::UnsetCameraRelative | ( | ) |
Removes the camera-relative setting for this SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetColor | ( | ) |
Removes the color (RGBA or material index) for this SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetConcentration | ( | ) |
Removes the concentration for this SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetEverything | ( | ) |
Removes all settings from the SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetInnerCone | ( | ) |
Removes the inner-cone size specification for this SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetOuterCone | ( | ) |
Removes the outer-cone size specification for this SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetPosition | ( | ) |
Removes the light source position for this SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetPriority | ( | ) |
Removes the drawing priority setting.
SpotlightKit& HPS::SpotlightKit::UnsetTarget | ( | ) |
Removes the target coordinate towards which the light source points for this SpotlightKit.
SpotlightKit& HPS::SpotlightKit::UnsetUserData | ( | intptr_t | in_index | ) |
Removes the user data at the given index from this kit.
in_index | The index of the user data to remove. |
SpotlightKit& HPS::SpotlightKit::UnsetUserData | ( | size_t | in_count, |
intptr_t const | in_indices[] | ||
) |
Removes the user data at the given indices from this kit.
in_count | The size of the following array. |
in_indices | The indices of the user data to remove. |
SpotlightKit& HPS::SpotlightKit::UnsetUserData | ( | IntPtrTArray const & | in_indices | ) |
Removes the user data at the given indices from this kit.
in_indices | The indices of the user data to remove. |
|
static |