HPS::TransparencyControl Class Reference

#include <hps.h>

Inheritance diagram for HPS::TransparencyControl:
HPS::Control HPS::Object

Public Member Functions

HPS::Type ObjectType () const
 
TransparencyControloperator= (TransparencyControl &&in_that)
 
TransparencyControloperator= (TransparencyControl const &in_that)
 
TransparencyControlSetAlgorithm (Transparency::Algorithm in_algorithm)
 
TransparencyControlSetDepthPeelingLayers (unsigned int in_layers)
 
TransparencyControlSetDepthPeelingMinimumArea (float in_area, Transparency::AreaUnits in_units)
 
TransparencyControlSetDepthPeelingPreference (Transparency::Preference in_preference)
 
TransparencyControlSetDepthWriting (bool in_state)
 
TransparencyControlSetMethod (Transparency::Method in_style)
 
bool ShowAlgorithm (Transparency::Algorithm &out_algorithm) const
 
bool ShowDepthPeelingLayers (unsigned int &out_layers) const
 
bool ShowDepthPeelingMinimumArea (float &out_area, Transparency::AreaUnits &out_units) const
 
bool ShowDepthPeelingPreference (Transparency::Preference &out_preference) const
 
bool ShowDepthWriting (bool &out_state) const
 
bool ShowMethod (Transparency::Method &out_style) const
 
 TransparencyControl (SegmentKey &in_seg)
 
 TransparencyControl (TransparencyControl const &in_that)
 
 TransparencyControl (TransparencyControl &&in_that)
 
virtual HPS::Type Type () const
 
TransparencyControlUnsetAlgorithm ()
 
TransparencyControlUnsetDepthPeelingLayers ()
 
TransparencyControlUnsetDepthPeelingMinimumArea ()
 
TransparencyControlUnsetDepthPeelingPreference ()
 
TransparencyControlUnsetDepthWriting ()
 
TransparencyControlUnsetEverything ()
 
TransparencyControlUnsetMethod ()
 
 ~TransparencyControl ()
 
- 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 ()
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::TransparencyControl
 
- Static Public Attributes inherited from HPS::Control
static const HPS::Type staticType = HPS::Type::Control
 
- 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 ()
 
- Protected Member Functions inherited from HPS::Control
 Control (Control &&in_that)
 
Controloperator= (Control &&in_that)
 

Detailed Description

The HPS::TransparencyControl class is a smart pointer that is tied to a database object. This object allows you to set and unset the algorithms used for calculating transparency. Some algorithms, such as depth peeling, have additional attributes, and those are also controlled using this class.

Default values for the various fields of HPS::TransparencyControl can be found here.

Constructor & Destructor Documentation

◆ TransparencyControl() [1/3]

HPS::TransparencyControl::TransparencyControl ( SegmentKey in_seg)
explicit

Initializes a control tied to the segment in_seg.

◆ TransparencyControl() [2/3]

HPS::TransparencyControl::TransparencyControl ( TransparencyControl const &  in_that)

Initializes a control tied to the same object as in_that.

◆ TransparencyControl() [3/3]

HPS::TransparencyControl::TransparencyControl ( TransparencyControl &&  in_that)

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

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

◆ ~TransparencyControl()

HPS::TransparencyControl::~TransparencyControl ( )

Releases a reference to the database object this control is tied to.

Member Function Documentation

◆ ObjectType()

HPS::Type HPS::TransparencyControl::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::Control.

◆ operator=() [1/2]

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

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

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

◆ operator=() [2/2]

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

Share the underlying smart-pointer of the TransparencyControl source.

Parameters
in_thatThe TransparencyControl source of the assignment.
Returns
A reference to this TransparencyControl.

◆ SetAlgorithm()

TransparencyControl& HPS::TransparencyControl::SetAlgorithm ( Transparency::Algorithm  in_algorithm)

Sets the algorithm to use when calculating transparency.

Parameters
in_algorithmThe algorithm to use.
Returns
a reference to this object.

◆ SetDepthPeelingLayers()

TransparencyControl& HPS::TransparencyControl::SetDepthPeelingLayers ( unsigned int  in_layers)

Sets the number of layers to use when performing depth peeling. Ignored in other transparency methods.

Warning
This setting will be limited by the depth peeling layer count set at the containing window / subwindow. If the count is lower than the containing window's count, excess render passes will be omitted.
Parameters
in_layersThe number of layers to use when performing depth peeling.
Returns
a reference to this object.

◆ SetDepthPeelingMinimumArea()

TransparencyControl& HPS::TransparencyControl::SetDepthPeelingMinimumArea ( float  in_area,
Transparency::AreaUnits  in_units 
)

Sets the amount of the screen a layer needs to occupy in order to process another layer when performing depth peeling. Ignored in other transparency methods.

Parameters
in_areaThe amount of the screen a layer needs to occupy in order to process another layer.
in_unitsThe units of the minimum area.
Returns
a reference to this object.

◆ SetDepthPeelingPreference()

TransparencyControl& HPS::TransparencyControl::SetDepthPeelingPreference ( Transparency::Preference  in_preference)

Specifies whether quality or performance should be favored when performing depth peeling. Ignored in other transparency methods.

Parameters
in_perferenceThe desired preference setting.
Returns
a reference to this object.

◆ SetDepthWriting()

TransparencyControl& HPS::TransparencyControl::SetDepthWriting ( bool  in_state)

Controls whether transparent geometry should write into the Z-buffer. Applies only when the transparency algorithm is NoSorting, ZSortNicest, or ZSortFastest.

Parameters
in_stateWhether transparent geometry should write into the Z-buffer.
Returns
a reference to this object.

◆ SetMethod()

TransparencyControl& HPS::TransparencyControl::SetMethod ( Transparency::Method  in_style)

Sets the method to use when blending transparent geometry.

Parameters
in_styleThe method to use when blending transparent geometry.
Returns
a reference to this object.

◆ ShowAlgorithm()

bool HPS::TransparencyControl::ShowAlgorithm ( Transparency::Algorithm out_algorithm) const

Shows the algorithm to use when calculating transparency.

Parameters
out_algorithmThe algorithm to use.
Returns
true if the setting is valid, false otherwise.

◆ ShowDepthPeelingLayers()

bool HPS::TransparencyControl::ShowDepthPeelingLayers ( unsigned int &  out_layers) const

Shows the number of layers to use when performing depth peeling.

Parameters
out_layersThe number of layers to use when performing depth peeling.
Returns
true if the setting is valid, false otherwise.

◆ ShowDepthPeelingMinimumArea()

bool HPS::TransparencyControl::ShowDepthPeelingMinimumArea ( float &  out_area,
Transparency::AreaUnits out_units 
) const

Shows the amount of the screen a layer needs to occupy in order to process another layer when performing depth peeling.

Parameters
out_areaThe amount of the screen a layer needs to occupy in order to process another layer.
out_unitsThe units of the minimum area.
Returns
true if the setting is valid, false otherwise.

◆ ShowDepthPeelingPreference()

bool HPS::TransparencyControl::ShowDepthPeelingPreference ( Transparency::Preference out_preference) const

Shows the depth peeling preference.

Parameters
out_preferenceWhether quality of performance should be favored when performing depth peeling.
Returns
true if the setting is valid, false otherwise.

◆ ShowDepthWriting()

bool HPS::TransparencyControl::ShowDepthWriting ( bool &  out_state) const

Shows whether transparent geometry should write into the Z-buffer.

Parameters
out_stateWhether transparent geometry should write into the Z-buffer.
Returns
true if the setting is valid, false otherwise.

◆ ShowMethod()

bool HPS::TransparencyControl::ShowMethod ( Transparency::Method out_style) const

Shows the method to use when blending transparent geometry.

Parameters
out_styleThe method to use when blending transparent geometry.
Returns
true if the setting is valid, false otherwise.

◆ Type()

virtual HPS::Type HPS::TransparencyControl::Type ( ) const
inlinevirtual

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.

Warning
This function must synchronize the database (by waiting for all pending database operations to complete) in order to know the type status of this object with certainty. Therefore this function can negatively impact performance. You should vigorously avoid using this function in high-traffic or peformance-critical areas of your code.
Returns
The true type of the object in question.

Reimplemented from HPS::Control.

◆ UnsetAlgorithm()

TransparencyControl& HPS::TransparencyControl::UnsetAlgorithm ( )

Removes the transparency algorithm setting. If the control is attached to a WindowKey this function restores the default value of this setting as specified by TransparencyKit::GetDefault().

Returns
A reference to this object.

◆ UnsetDepthPeelingLayers()

TransparencyControl& HPS::TransparencyControl::UnsetDepthPeelingLayers ( )

Removes the depth peeling layers setting. If the control is attached to a WindowKey this function restores the default value of this setting as specified by TransparencyKit::GetDefault().

Returns
A reference to this object.

◆ UnsetDepthPeelingMinimumArea()

TransparencyControl& HPS::TransparencyControl::UnsetDepthPeelingMinimumArea ( )

Removes the depth peeling minimum area setting. If the control is attached to a WindowKey this function restores the default value of this setting as specified by TransparencyKit::GetDefault().

Returns
A reference to this object.

◆ UnsetDepthPeelingPreference()

TransparencyControl& HPS::TransparencyControl::UnsetDepthPeelingPreference ( )

Removes the depth peeling preference setting. If the control is attached to a WindowKey this function restores the default value of this setting as specified by TransparencyKit::GetDefault().

Returns
A reference to this object.

◆ UnsetDepthWriting()

TransparencyControl& HPS::TransparencyControl::UnsetDepthWriting ( )

Removes the depth writing setting. If the control is attached to a WindowKey this function restores the default value of this setting as specified by TransparencyKit::GetDefault().

Returns
A reference to this object.

◆ UnsetEverything()

TransparencyControl& HPS::TransparencyControl::UnsetEverything ( )

Removes all settings from this object. If the control is attached to a WindowKey this function restores the default settings of this control as specified by TransparencyKit::GetDefault().

Returns
A reference to this object.

◆ UnsetMethod()

TransparencyControl& HPS::TransparencyControl::UnsetMethod ( )

Removes the transparency method setting. If the control is attached to a WindowKey this function restores the default value of this setting as specified by TransparencyKit::GetDefault().

Returns
A reference to this object.

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