#include <hps.h>

Inheritance diagram for HPS::SpotlightKey:
HPS::GeometryKey HPS::Key HPS::Object

Public Member Functions

void Consume (SpotlightKit &in_kit)
 
HPS::Type ObjectType () const
 
SpotlightKeyoperator= (SpotlightKey const &in_that)
 
SpotlightKeyoperator= (SpotlightKey &&in_that)
 
void Set (SpotlightKit const &in_kit)
 
SpotlightKeySetCameraRelative (bool in_state)
 
SpotlightKeySetColor (RGBAColor const &in_rgba_color)
 
SpotlightKeySetColorByIndex (float in_index)
 
SpotlightKeySetConcentration (float in_concentration)
 
SpotlightKeySetInnerCone (float in_size, HPS::Spotlight::InnerConeUnits in_units=HPS::Spotlight::InnerConeUnits::Percent)
 
SpotlightKeySetOuterCone (float in_size, HPS::Spotlight::OuterConeUnits in_units=HPS::Spotlight::OuterConeUnits::Degrees)
 
SpotlightKeySetPosition (HPS::Point const &in_position)
 
SpotlightKeySetTarget (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)
 
SpotlightKeyUnsetColor ()
 
- Public Member Functions inherited from HPS::GeometryKey
 GeometryKey ()
 
 GeometryKey (Key const &in_that)
 
 GeometryKey (GeometryKey const &in_that)
 
 GeometryKey (GeometryKey &&in_that)
 
GeometryKeyoperator= (GeometryKey const &in_that)
 
GeometryKeyoperator= (GeometryKey &&in_that)
 
GeometryKeySetPriority (int in_priority)
 
GeometryKeySetUserData (intptr_t in_index, size_t in_bytes, byte const in_data[])
 
GeometryKeySetUserData (intptr_t in_index, ByteArray const &in_data)
 
GeometryKeySetUserData (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
 
GeometryKeyUnsetAllUserData ()
 
GeometryKeyUnsetPriority ()
 
GeometryKeyUnsetUserData (intptr_t in_index)
 
GeometryKeyUnsetUserData (size_t in_count, intptr_t const in_indices[])
 
GeometryKeyUnsetUserData (IntPtrTArray const &in_indices)
 
- Public Member Functions inherited from HPS::Key
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
 
Keyoperator= (Key &&in_that)
 
Keyoperator= (Key const &in_that)
 
bool operator== (Key const &in_that) const
 
SegmentKey Owner () const
 
SegmentKey Up () const
 
virtual ~Key ()
 
- Public Member Functions inherited from HPS::Object
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)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::SpotlightKey
 
- Static Public Attributes inherited from HPS::GeometryKey
static const HPS::Type staticType = HPS::Type::GeometryKey
 
- Static Public Attributes inherited from HPS::Key
static const HPS::Type staticType = HPS::Type::Key
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

The SpotlightKey class is a smart pointer to a database object. It is a handle to a spotlight inserted via SegmentKey::InsertSpotlight.

Constructor & Destructor Documentation

◆ SpotlightKey() [1/4]

HPS::SpotlightKey::SpotlightKey ( )

The default constructor creates an uninitialized SpotlightKey object. The Type() function will return Type::None.

◆ SpotlightKey() [2/4]

HPS::SpotlightKey::SpotlightKey ( Key const &  in_that)
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.

Parameters
in_keyThe source Key to copy.

◆ SpotlightKey() [3/4]

HPS::SpotlightKey::SpotlightKey ( SpotlightKey const &  in_that)

The copy constructor creates a SpotlightKey object that shares the underlying smart-pointer of the source SpotlightKey.

Parameters
in_thatThe source SpotlightKey to copy.

◆ SpotlightKey() [4/4]

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.

Parameters
in_thatAn rvalue reference to a SpotlightKey to take the impl from.

Member Function Documentation

◆ Consume()

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

Parameters
in_kitThe kit from which to get the settings to replace on this SpotlightKey.

◆ ObjectType()

HPS::Type HPS::SpotlightKey::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS::GeometryKey.

◆ operator=() [1/2]

SpotlightKey& HPS::SpotlightKey::operator= ( SpotlightKey const &  in_that)

Associate this SpotlightKey with the same underlying impl as the source SpotlightKey.

Parameters
in_thatThe source SpotlightKey for the assignment.
Returns
A reference to this SpotlightKey.

◆ operator=() [2/2]

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.

Parameters
in_thatAn rvalue reference to a SpotlightKey to take the impl from.
Returns
A reference to this SpotlightKey.

◆ Set()

void HPS::SpotlightKey::Set ( SpotlightKit const &  in_kit)

Replace those settings on this SpotlightKey with those set on the specified kit.

Parameters
in_kitThe kit from which to get the settings to replace on this SpotlightKey.

◆ SetCameraRelative()

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.

Parameters
in_stateWhether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space.
Returns
A reference to this SpotlightKey.
See also
SetPosition
SetTarget

◆ SetColor()

SpotlightKey& HPS::SpotlightKey::SetColor ( RGBAColor const &  in_rgba_color)

Sets the RGBA color to use for this SpotlightKey.

Parameters
in_rgba_colorThe RGBA color to use for this SpotlightKey.
Returns
A reference to this SpotlightKey.

◆ SetColorByIndex()

SpotlightKey& HPS::SpotlightKey::SetColorByIndex ( float  in_index)

Sets the color index to use for this SpotlightKey.

Parameters
in_indexThe color index to use for this SpotlightKey.
Returns
A reference to this SpotlightKey.

◆ SetConcentration()

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.

Parameters
in_concentrationThe 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.
Returns
A reference to this SpotlightKey.

◆ SetInnerCone()

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.

Parameters
in_sizeThe size of the inner cone for this SpotlightKey. The interpretation of the value and its valid range depends on the units argument.
in_unitsThe units for the size of the inner cone for this SpotlightKey. Defaults to Spotlight::InnerConeUnits::Degrees.
Returns
A reference to this SpotlightKey.

◆ SetOuterCone()

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.

Parameters
in_sizeThe size of the outer cone for this SpotlightKey. The interpretation of the value and its valid range depends on the units argument.
in_unitsThe units for the size of the outer cone for this SpotlightKey. Defaults to Spotlight::OuterConeUnits::Degrees.
Returns
A reference to this SpotlightKey.

◆ SetPosition()

SpotlightKey& HPS::SpotlightKey::SetPosition ( HPS::Point const &  in_position)

Sets the position of the light source for this SpotlightKey.

Parameters
in_positionThe 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.
Returns
A reference to this SpotlightKey.
See also
SetCameraRelative

◆ SetTarget()

SpotlightKey& HPS::SpotlightKey::SetTarget ( HPS::Point const &  in_target)

Sets the target coordinate towards which the light source points for this SpotlightKey.

Parameters
in_targetThe 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.
Returns
A reference to this SpotlightKey.
See also
SetCameraRelative

◆ Show()

void HPS::SpotlightKey::Show ( SpotlightKit out_kit) const

Copy the contents of this SpotlightKey into the specified kit.

Parameters
out_kitThe kit to populate with the contents of this SpotlightKey.

◆ ShowCameraRelative()

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.

Parameters
out_stateWhether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space.
Returns
true if a camera-relative setting was set, false otherwise.

◆ ShowColor()

bool HPS::SpotlightKey::ShowColor ( Material::Type out_type,
RGBAColor out_rgba_color,
float &  out_index 
) const

Shows the color for this SpotlightKey.

Parameters
out_typeThe type of color for the spotlight.
out_rgba_colorThe RGBA color for the spotlight. This is only valid if out_type is Material::Type::RGBAColor.
out_indexThe material index for the spotlight. This is only valid if out_type is Material::Type::MaterialIndex.
Returns
true if a color was set, false otherwise.

◆ ShowConcentration()

bool HPS::SpotlightKey::ShowConcentration ( float &  out_concentration) const

Shows the concentration for this SpotlightKey.

Parameters
out_concentrationThe concentration for this SpotlightKey.
Returns
true if a concentration was set, false otherwise.

◆ ShowInnerCone()

bool HPS::SpotlightKey::ShowInnerCone ( float &  out_size,
HPS::Spotlight::InnerConeUnits out_units 
) const

Shows the inner cone for this SpotlightKey.

Parameters
out_sizeThe size of the inner cone for this SpotlightKey.
out_unitsThe units for the size of the inner cone for this SpotlightKey.
Returns
true if an inner cone was set, false otherwise.

◆ ShowOuterCone()

bool HPS::SpotlightKey::ShowOuterCone ( float &  out_size,
HPS::Spotlight::OuterConeUnits out_units 
) const

Shows the outer cone for this SpotlightKey.

Parameters
out_sizeThe size of the outer cone for this SpotlightKey.
out_unitsThe units for the size of the outer cone for this SpotlightKey.
Returns
true if an outer cone was set, false otherwise.

◆ ShowPosition()

bool HPS::SpotlightKey::ShowPosition ( HPS::Point out_position) const

Shows the position of the light source for this SpotlightKey.

Parameters
out_positionThe position of the light source for this SpotlightKey.
Returns
true if a light source position was set, false otherwise.

◆ ShowTarget()

bool HPS::SpotlightKey::ShowTarget ( HPS::Point out_target) const

Shows the target coordinate towards which the light source points for this SpotlightKey.

Parameters
out_targetThe target coordinate towards which the light source points for this SpotlightKey.
Returns
true if a target was set, false otherwise.

◆ UnsetColor()

SpotlightKey& HPS::SpotlightKey::UnsetColor ( )

Removes the color (RGBA or material index) set on this SpotlightKey.

Returns
A reference to this SpotlightKey.

The documentation for this class was generated from the following file: