TransparencyControl
- class HPS.TransparencyControl : public HPS.Control
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.
Public Functions
- 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.
- HPS.TransparencyControl SetAlgorithm (HPS.Transparency.Algorithm in_algorithm)
Sets the algorithm to use when calculating transparency.
- Param in_algorithm
The algorithm to use.
- Return
a reference to this object.
- HPS.TransparencyControl SetDepthPeelingLayers (uint 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.
- Param in_layers
The number of layers to use when performing depth peeling.
- Return
a reference to this object.
- HPS.TransparencyControl SetDepthPeelingMinimumArea (float in_area, HPS.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.
- Param in_area
The amount of the screen a layer needs to occupy in order to process another layer.
- Param in_units
The units of the minimum area.
- Return
a reference to this object.
- HPS.TransparencyControl SetDepthPeelingPreference (HPS.Transparency.Preference in_preference)
Specifies whether quality or performance should be favored when performing depth peeling. Ignored in other transparency methods.
- Return
a reference to this object.
- 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.
- Param in_state
Whether transparent geometry should write into the Z-buffer.
- Return
a reference to this object.
- HPS.TransparencyControl SetMethod (HPS.Transparency.Method in_style)
Sets the method to use when blending transparent geometry.
- Param in_style
The method to use when blending transparent geometry.
- Return
a reference to this object.
- bool ShowAlgorithm (out HPS.Transparency.Algorithm out_algorithm)
Shows the algorithm to use when calculating transparency.
- Param out_algorithm
The algorithm to use.
- Return
true if the setting is valid, false otherwise.
- bool ShowDepthPeelingLayers (out uint out_layers)
Shows the number of layers to use when performing depth peeling.
- Param out_layers
The number of layers to use when performing depth peeling.
- Return
true if the setting is valid, false otherwise.
- bool ShowDepthPeelingMinimumArea (out float out_area, out HPS.Transparency.AreaUnits out_units)
Shows the amount of the screen a layer needs to occupy in order to process another layer when performing depth peeling.
- Param out_area
The amount of the screen a layer needs to occupy in order to process another layer.
- Param out_units
The units of the minimum area.
- Return
true if the setting is valid, false otherwise.
- bool ShowDepthPeelingPreference (out HPS.Transparency.Preference out_preference)
Shows the depth peeling preference.
- Param out_preference
Whether quality of performance should be favored when performing depth peeling.
- Return
true if the setting is valid, false otherwise.
- bool ShowDepthWriting (out bool out_state)
Shows whether transparent geometry should write into the Z-buffer.
- Param out_state
Whether transparent geometry should write into the Z-buffer.
- Return
true if the setting is valid, false otherwise.
- bool ShowMethod (out HPS.Transparency.Method out_style)
Shows the method to use when blending transparent geometry.
- Param out_style
The method to use when blending transparent geometry.
- Return
true if the setting is valid, false otherwise.
- TransparencyControl (HPS.SegmentKey in_seg)
Initializes a control tied to the segment in_seg.
- TransparencyControl (HPS.TransparencyControl in_that)
Initializes a control tied to the same object as in_that.
- 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().
- Return
A reference to this object.
- 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().
- Return
A reference to this object.
- 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().
- Return
A reference to this object.
- 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().
- Return
A reference to this object.
- 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().
- Return
A reference to this object.
- 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().
- Return
A reference to this object.
- 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().
- Return
A reference to this object.