Public Member Functions | List of all members
HPS::TransparencyControl Class Reference

#include <hps.h>

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

Public Member Functions

 TransparencyControl (SegmentKey &in_seg)
 
 TransparencyControl (TransparencyControl const &in_that)
 
 TransparencyControl (TransparencyControl &&in_that)
 
TransparencyControloperator= (TransparencyControl &&in_that)
 
 ~TransparencyControl ()
 
HPS::Type ObjectType () const
 
TransparencyControloperator= (TransparencyControl const &in_that)
 
TransparencyControlSetMethod (Transparency::Method in_style)
 
TransparencyControlSetAlgorithm (Transparency::Algorithm in_algorithm)
 
TransparencyControlSetDepthPeelingLayers (unsigned int in_layers)
 
TransparencyControlSetDepthPeelingMinimumArea (float in_area, Transparency::AreaUnits in_units)
 
TransparencyControlSetDepthWriting (bool in_state)
 
TransparencyControlUnsetMethod ()
 
TransparencyControlUnsetAlgorithm ()
 
TransparencyControlUnsetDepthPeelingLayers ()
 
TransparencyControlUnsetDepthPeelingMinimumArea ()
 
TransparencyControlUnsetDepthWriting ()
 
TransparencyControlUnsetEverything ()
 
bool ShowMethod (Transparency::Method &out_style) const
 
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 ShowDepthWriting (bool &out_state) const
 
- Public Member Functions inherited from HPS::Object
Objectoperator= (Object const &other_object)
 
 Object (Object &&in_that)
 
Objectoperator= (Object &&in_that)
 
HPS::Type Type () const
 
virtual bool Empty () const
 
virtual void Reset ()
 
bool HasType (HPS::Type in_mask) const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 

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

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

Initializes a control tied to the segment in_seg.

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

Initializes a control tied to the same object as in_that.

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.
HPS::TransparencyControl::~TransparencyControl ( )

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

Member Function Documentation

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

This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.

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

Reimplemented from HPS::Control.

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.
TransparencyControl& HPS::TransparencyControl::operator= ( TransparencyControl const &  in_that)

Share the smart-pointer.

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.
TransparencyControl& HPS::TransparencyControl::SetDepthPeelingLayers ( unsigned int  in_layers)

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

Parameters
in_layersThe number of layers to use when performing depth peeling.
Returns
a reference to this object.
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.
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.
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.
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.
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.
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.
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.
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.
TransparencyControl& HPS::TransparencyControl::UnsetAlgorithm ( )

Removes the transparency algorithm setting.

Returns
A reference to this object.
TransparencyControl& HPS::TransparencyControl::UnsetDepthPeelingLayers ( )

Removes the depth peeling layers setting.

Returns
A reference to this object.
TransparencyControl& HPS::TransparencyControl::UnsetDepthPeelingMinimumArea ( )

Removes the depth peeling minimum area setting.

Returns
A reference to this object.
TransparencyControl& HPS::TransparencyControl::UnsetDepthWriting ( )

Removes the depth writing setting.

Returns
A reference to this object.
TransparencyControl& HPS::TransparencyControl::UnsetEverything ( )

Removes all settings from this object.

Returns
A reference to this object.
TransparencyControl& HPS::TransparencyControl::UnsetMethod ( )

Removes the transparency method setting.

Returns
A reference to this object.

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