SpotlightKey

class HPS.SpotlightKey : public HPS.GeometryKey

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

Public Functions

void Consume (HPS.SpotlightKit in_kit)

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

Param in_kit

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

override void Dispose ()
override HPS.Type ObjectType ()

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).

Return

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

void Set (HPS.SpotlightKit in_kit)

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

Param in_kit

The kit from which to get the settings to replace on this 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.

See

SetPosition

See

SetTarget

Param in_state

Whether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetColor (HPS.RGBAColor in_rgba_color)

Sets the RGBA color to use for this SpotlightKey.

Param in_rgba_color

The RGBA color to use for this SpotlightKey.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetColorByIndex (float in_index)

Sets the color index to use for this SpotlightKey.

Param in_index

The color index to use for this SpotlightKey.

Return

A reference to this 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.

Param 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.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetInnerCone (float in_size)

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.

Param 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.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetInnerCone (float in_size, HPS.Spotlight.InnerConeUnits in_units)

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.

Param 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.

Param in_units

The units for the size of the inner cone for this SpotlightKey. Defaults to Spotlight.InnerConeUnits.Degrees.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetOuterCone (float in_size)

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.

Param 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.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetOuterCone (float in_size, HPS.Spotlight.OuterConeUnits in_units)

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.

Param 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.

Param in_units

The units for the size of the outer cone for this SpotlightKey. Defaults to Spotlight.OuterConeUnits.Degrees.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetPosition (HPS.Point in_position)

Sets the position of the light source for this SpotlightKey.

See

SetCameraRelative

Param 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.

Return

A reference to this SpotlightKey.

HPS.SpotlightKey SetTarget (HPS.Point in_target)

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

See

SetCameraRelative

Param 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.

Return

A reference to this SpotlightKey.

void Show (out HPS.SpotlightKit out_kit)

Copy the contents of this SpotlightKey into the specified kit.

Param out_kit

The kit to populate with the contents of this SpotlightKey.

bool ShowCameraRelative (out bool out_state)

Shows whether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space.

Param out_state

Whether the coordinates of the position and target for this SpotlightKey are treated as being in object space or camera-relative space.

Return

true if a camera-relative setting was set, false otherwise.

bool ShowColor (out HPS.Material.Type out_type, out HPS.RGBAColor out_rgba_color, out float out_index)

Shows the color for this SpotlightKey.

Param out_type

The type of color for the spotlight.

Param out_rgba_color

The RGBA color for the spotlight. This is only valid if out_type is Material.Type.RGBAColor.

Param out_index

The material index for the spotlight. This is only valid if out_type is Material.Type.MaterialIndex.

Return

true if a color was set, false otherwise.

bool ShowConcentration (out float out_concentration)

Shows the concentration for this SpotlightKey.

Param out_concentration

The concentration for this SpotlightKey.

Return

true if a concentration was set, false otherwise.

bool ShowInnerCone (out float out_size, out HPS.Spotlight.InnerConeUnits out_units)

Shows the inner cone for this SpotlightKey.

Param out_size

The size of the inner cone for this SpotlightKey.

Param out_units

The units for the size of the inner cone for this SpotlightKey.

Return

true if an inner cone was set, false otherwise.

bool ShowOuterCone (out float out_size, out HPS.Spotlight.OuterConeUnits out_units)

Shows the outer cone for this SpotlightKey.

Param out_size

The size of the outer cone for this SpotlightKey.

Param out_units

The units for the size of the outer cone for this SpotlightKey.

Return

true if an outer cone was set, false otherwise.

bool ShowPosition (out HPS.Point out_position)

Shows the position of the light source for this SpotlightKey.

Param out_position

The position of the light source for this SpotlightKey.

Return

true if a light source position was set, false otherwise.

bool ShowTarget (out HPS.Point out_target)

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

Param out_target

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

Return

true if a target was set, false otherwise.

SpotlightKey ()

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

SpotlightKey (HPS.Key in_that)

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.

SpotlightKey (HPS.SpotlightKey in_that)

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

Param in_that

The source SpotlightKey to copy.

HPS.SpotlightKey UnsetColor ()

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

Return

A reference to this SpotlightKey.