Hoops Visualize HPS  version 2018-SP2
Hoops Visualize HPS 3D Rendering Engine
Looking for a senior C++ dev?
I'm looking for work. Hire me!
HPS::TransparencyControl Class Reference

The HPS::TransparencyControl class is a smart pointer that is tied to a database object. More...

#include <hps.h>

Inheritance diagram for HPS::TransparencyControl:
Collaboration diagram for HPS::TransparencyControl:

Public Member Functions

 TransparencyControl (SegmentKey &in_seg)
 Initializes a control tied to the segment in_seg. More...
 
 TransparencyControl (TransparencyControl const &in_that)
 Initializes a control tied to the same object as in_that. More...
 
 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. More...
 
TransparencyControloperator= (TransparencyControl &&in_that)
 The move assignment operator transfers the underlying impl of the rvalue reference to this TransparencyControl thereby avoiding a copy. More...
 
 ~TransparencyControl ()
 Releases a reference to the database object this control is tied to. More...
 
virtual HPS::Type Type () const
 This function returns the true type of the underlying object. More...
 
HPS::Type ObjectType () const
 
TransparencyControloperator= (TransparencyControl const &in_that)
 Share the underlying smart-pointer of the TransparencyControl source. More...
 
TransparencyControlSetMethod (Transparency::Method in_style)
 Sets the method to use when blending transparent geometry. More...
 
TransparencyControlSetAlgorithm (Transparency::Algorithm in_algorithm)
 Sets the algorithm to use when calculating transparency. More...
 
TransparencyControlSetDepthPeelingLayers (unsigned int in_layers)
 Sets the number of layers to use when performing depth peeling. More...
 
TransparencyControlSetDepthPeelingMinimumArea (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. More...
 
TransparencyControlSetDepthWriting (bool in_state)
 Controls whether transparent geometry should write into the Z-buffer. More...
 
TransparencyControlSetDepthPeelingPreference (Transparency::Preference in_preference)
 Specifies whether quality or performance should be favored when performing depth peeling. More...
 
TransparencyControlUnsetMethod ()
 Removes the transparency method setting. More...
 
TransparencyControlUnsetAlgorithm ()
 Removes the transparency algorithm setting. More...
 
TransparencyControlUnsetDepthPeelingLayers ()
 Removes the depth peeling layers setting. More...
 
TransparencyControlUnsetDepthPeelingMinimumArea ()
 Removes the depth peeling minimum area setting. More...
 
TransparencyControlUnsetDepthWriting ()
 Removes the depth writing setting. More...
 
TransparencyControlUnsetDepthPeelingPreference ()
 Removes the depth peeling preference setting. More...
 
TransparencyControlUnsetEverything ()
 Removes all settings from this object. More...
 
bool ShowMethod (Transparency::Method &out_style) const
 Shows the method to use when blending transparent geometry. More...
 
bool ShowAlgorithm (Transparency::Algorithm &out_algorithm) const
 Shows the algorithm to use when calculating transparency. More...
 
bool ShowDepthPeelingLayers (unsigned int &out_layers) const
 Shows the number of layers to use when performing depth peeling. More...
 
bool 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. More...
 
bool ShowDepthWriting (bool &out_state) const
 Shows whether transparent geometry should write into the Z-buffer. More...
 
bool ShowDepthPeelingPreference (Transparency::Preference &out_preference) const
 Shows the depth peeling preference. More...
 
virtual bool Empty () const
 Indicates whether this object has any values set on it. More...
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
bool HasType (HPS::Type in_mask) const
 This function indicates whether this Object has the given Type mask. More...
 
intptr_t GetClassID () const
 Returns a unique identifier that is shared by all objects of the same class. More...
 
intptr_t GetInstanceID () const
 Returns an identifier that can be used to identify which instance of a class an object is. More...
 

Static Public Member Functions

template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::TransparencyControl
 

Private Member Functions

 TransparencyControl ()
 Private default constructor to prevent instantiation without a segment. More...
 

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/4]

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

Initializes a control tied to the segment in_seg.

◆ TransparencyControl() [2/4]

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

Initializes a control tied to the same object as in_that.

◆ TransparencyControl() [3/4]

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.

◆ TransparencyControl() [4/4]

HPS::TransparencyControl::TransparencyControl ( )
private

Private default constructor to prevent instantiation without a segment.

Member Function Documentation

◆ ClassID()

template<typename T >
static intptr_t HPS::Object::ClassID ( )
inlinestaticinherited

Unique identifier for this class.

Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.

◆ Empty()

virtual bool HPS::Object::Empty ( ) const
inlinevirtualinherited

Indicates whether this object has any values set on it.

Returns
true if no values are set on this object, false otherwise.

Reimplemented in HPS::STL::ImportResultsKit, HPS::STL::ImportOptionsKit, HPS::OBJ::ImportResultsKit, HPS::OBJ::ImportOptionsKit, HPS::Hardcopy::File::ExportOptionsKit, HPS::Stream::ExportOptionsKit, HPS::Stream::ImportResultsKit, HPS::Stream::ImportOptionsKit, HPS::PointCloud::ImportOptionsKit, HPS::PointCloud::ImportResultsKit, HPS::UpdateOptionsKit, HPS::HighlightSearchOptionsKit, HPS::HighlightOptionsKit, HPS::SelectionOptionsKit, HPS::SearchOptionsKit, HPS::CutGeometryGatheringOptionsKit, HPS::ShapeKit, HPS::ShaderKit, HPS::Shader::ImportOptionsKit, HPS::ImageKit, HPS::Image::ImportOptionsKit, HPS::Image::ExportOptionsKit, HPS::TextureOptionsKit, HPS::LinePatternKit, HPS::LinePatternParallelKit, HPS::LinePatternOptionsKit, HPS::GlyphKit, HPS::ApplicationWindowOptionsKit, HPS::OffScreenWindowOptionsKit, HPS::StandAloneWindowOptionsKit, HPS::GridKit, HPS::PolygonKit, HPS::MeshKit, HPS::ShellKit, HPS::ShellRelationResultsKit, HPS::ShellRelationOptionsKit, HPS::ShellOptimizationOptionsKit, HPS::TextKit, HPS::EllipticalArcKit, HPS::EllipseKit, HPS::TrimKit, HPS::NURBSSurfaceKit, HPS::NURBSCurveKit, HPS::SpotlightKit, HPS::InfiniteLineKit, HPS::CuttingSectionKit, HPS::CircularWedgeKit, HPS::CircularArcKit, HPS::CircleKit, HPS::SphereKit, HPS::CylinderKit, HPS::DistantLightKit, HPS::MarkerKit, HPS::LineKit, HPS::AttributeLockKit, HPS::FontInfoState, HPS::WindowInfoKit, HPS::DebuggingKit, HPS::SubwindowKit, HPS::ContourLineKit, HPS::VisualEffectsKit, HPS::TransformMaskKit, HPS::PostProcessEffectsKit, HPS::DrawingAttributeKit, HPS::HiddenLineAttributeKit, HPS::PerformanceKit, HPS::NURBSSurfaceAttributeKit, HPS::MaterialKit, HPS::MaterialMappingKit, HPS::MatrixKit, HPS::CurveAttributeKit, HPS::EdgeAttributeKit, HPS::LineAttributeKit, HPS::TextAttributeKit, HPS::CuttingSectionAttributeKit, HPS::CylinderAttributeKit, HPS::LightingAttributeKit, HPS::SphereAttributeKit, HPS::MarkerAttributeKit, HPS::CullingKit, HPS::ColorInterpolationKit, HPS::TransparencyKit, HPS::SelectabilityKit, HPS::CameraKit, HPS::VisibilityKit, HPS::BoundingKit, HPS::SegmentOptimizationOptionsKit, HPS::Publish::ExportOptionsKit, HPS::Publish::TextFieldKit, HPS::Publish::SignatureFieldKit, HPS::Publish::DropDownListKit, HPS::Exchange::TessellationOptionsKit, HPS::Publish::ListBoxKit, HPS::Exchange::ExportSTEPOptionsKit, HPS::Exchange::ExportParasolidOptionsKit, HPS::Publish::RadioButtonKit, HPS::Exchange::ExportIGESOptionsKit, HPS::Exchange::ExportXMLOptionsKit, HPS::Publish::CheckBoxKit, HPS::Exchange::ExportU3DOptionsKit, HPS::Exchange::ExportSTLOptionsKit, HPS::Publish::ButtonKit, HPS::Exchange::ExportPRCOptionsKit, HPS::Publish::LinkKit, HPS::Exchange::ExportJTOptionsKit, HPS::Publish::SlideTableKit, HPS::Exchange::ExportACISOptionsKit, HPS::Publish::TableKit, HPS::Exchange::Export3MFOptionsKit, HPS::Publish::ImageKit, HPS::Publish::TextKit, HPS::Exchange::ModelFileImportOptionsKit, HPS::Publish::ViewKit, HPS::Exchange::TranslationOptionsKit, HPS::Publish::ArtworkKit, HPS::Publish::AnnotationKit, HPS::ComponentPath, HPS::Exchange::ImportOptionsKit, HPS::Parasolid::ExportOptionsKit, HPS::Exchange::NURBSConversionOptionsKit, HPS::Parasolid::LineTessellationKit, HPS::Exchange::Configuration, HPS::Publish::PageKit, HPS::Parasolid::FacetTessellationKit, HPS::Publish::DocumentKit, HPS::Parasolid::ImportOptionsKit, HPS::DWG::ImportOptionsKit, HPS::OOC::ImportOptionsKit, HPS::Sketchup::ImportOptionsKit, and HPS::Sketchup::ImportResultsKit.

◆ GetClassID()

intptr_t HPS::Object::GetClassID ( ) const
inherited

Returns a unique identifier that is shared by all objects of the same class.

Returns
A unique value shared by all objects of the same class.

◆ GetInstanceID()

intptr_t HPS::Object::GetInstanceID ( ) const
inherited

Returns an identifier that can be used to identify which instance of a class an object is.

Different keys and controls will return the same value if they are backed by the same database resource.

Returns
A value unique to an instance of an object and all objects that are backed by the same database resource.

◆ HasType()

bool HPS::Object::HasType ( HPS::Type  in_mask) const
inherited

This function indicates whether this Object has the given Type mask.

Parameters
in_maskThe Type mask to check against this Object.
Returns
true if this Object has the given Type mask, false otherwise.

◆ ObjectType()

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

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.

◆ Reset()

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

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.

Member Data Documentation

◆ staticType

const HPS::Type HPS::TransparencyControl::staticType = HPS::Type::TransparencyControl
static

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