HPS::DistantLightKey Class Reference

#include <hps.h>

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

Public Member Functions

void Consume (DistantLightKit &in_kit)
 
 DistantLightKey ()
 
 DistantLightKey (Key const &in_that)
 
 DistantLightKey (DistantLightKey const &in_that)
 
 DistantLightKey (DistantLightKey &&in_that)
 
HPS::Type ObjectType () const
 
DistantLightKeyoperator= (DistantLightKey const &in_that)
 
DistantLightKeyoperator= (DistantLightKey &&in_that)
 
void Set (DistantLightKit const &in_kit)
 
DistantLightKeySetCameraRelative (bool in_state)
 
DistantLightKeySetColor (RGBAColor const &in_rgba_color)
 
DistantLightKeySetColorByIndex (float in_index)
 
DistantLightKeySetDirection (HPS::Vector const &in_vector)
 
void Show (DistantLightKit &out_kit) const
 
bool ShowCameraRelative (bool &out_state) const
 
bool ShowColor (Material::Type &out_type, RGBAColor &out_rgba_color, float &out_index) const
 
bool ShowDirection (HPS::Vector &out_vector) const
 
DistantLightKeyUnsetColor ()
 
- 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::DistantLightKey
 
- 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 DistantLightKey class is a smart pointer to a database object. It is a handle to a distant light inserted via SegmentKey::InsertDistantLight.

Constructor & Destructor Documentation

◆ DistantLightKey() [1/4]

HPS::DistantLightKey::DistantLightKey ( )

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

◆ DistantLightKey() [2/4]

HPS::DistantLightKey::DistantLightKey ( Key const &  in_that)
explicit

This constructor creates a DistantLightKey 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 DistantLight key. Otherwise the copy will fail and the resulting DistantLightKey will be invalid.

Parameters
in_keyThe source Key to copy.

◆ DistantLightKey() [3/4]

HPS::DistantLightKey::DistantLightKey ( DistantLightKey const &  in_that)

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

Parameters
in_thatThe source DistantLightKey to copy.

◆ DistantLightKey() [4/4]

HPS::DistantLightKey::DistantLightKey ( DistantLightKey &&  in_that)

The move constructor creates a DistantLightKey by transferring the underlying impl of the rvalue reference to this DistantLightKey thereby avoiding a copy and allocation.

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

Member Function Documentation

◆ Consume()

void HPS::DistantLightKey::Consume ( DistantLightKit in_kit)

Completely replaces all settings on this DistantLightKey with those set on the specified kit and resets the kit.

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

◆ ObjectType()

HPS::Type HPS::DistantLightKey::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]

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

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

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

◆ operator=() [2/2]

DistantLightKey& HPS::DistantLightKey::operator= ( DistantLightKey &&  in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this DistantLightKey thereby avoiding a copy.

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

◆ Set()

void HPS::DistantLightKey::Set ( DistantLightKit const &  in_kit)

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

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

◆ SetCameraRelative()

DistantLightKey& HPS::DistantLightKey::SetCameraRelative ( bool  in_state)

Sets the camera-relative setting for this DistantLightKey.

Parameters
in_stateWhether the direction of this DistantLightKey is treated as being in object space or camera-relative space.
Returns
A reference to this DistantLightKey.
See also
SetDirection

◆ SetColor()

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

Sets the RGBA color to use for this DistantLightKey.

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

◆ SetColorByIndex()

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

Sets the color index to use for this DistantLightKey.

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

◆ SetDirection()

DistantLightKey& HPS::DistantLightKey::SetDirection ( HPS::Vector const &  in_vector)

Sets the direction in which this DistantLightKey lies. The rays emitted by this light will travel in the opposite direction of this vector.

Parameters
in_vectorThe direction in which this DistantLightKey lies. The vector will either be treated as being in object space or in camera-relative units depending on the setting passed SetCameraRelative.
Returns
A reference to this DistantLightKey.
See also
SetCameraRelative

◆ Show()

void HPS::DistantLightKey::Show ( DistantLightKit out_kit) const

Copy the contents of this DistantLightKey into the specified kit.

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

◆ ShowCameraRelative()

bool HPS::DistantLightKey::ShowCameraRelative ( bool &  out_state) const

Shows the camera-relative setting for this DistantLightKey.

Parameters
out_stateWhether the direction of this DistantLightKey is treated as being in object space or camera-relative space.
Returns
true if a camera-relative setting was specified, false otherwise.

◆ ShowColor()

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

Shows the color for this DistantLightKey.

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

◆ ShowDirection()

bool HPS::DistantLightKey::ShowDirection ( HPS::Vector out_vector) const

Shows the direction in which this DistantLightKey lies.

Parameters
out_vectorThe direction in which this DistantLightKey lies.
Returns
true if a direction was set, false otherwise.

◆ UnsetColor()

DistantLightKey& HPS::DistantLightKey::UnsetColor ( )

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

Returns
A reference to this DistantLightKey.

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