SelectionOptionsControl

class HPS::SelectionOptionsControl : public HPS::Control

The HPS::SelectionOptionsControl class is a smart pointer that is tied to a database object. It is used to set selection related options on a HPS::WindowKey. Options include the selection algorithm, granularity, internal limit, related limit, level, proximity, and sorting. Default values for the various fields of HPS::SelectionOptionsControl can be found here.

Public Functions

inline virtual HPS::Type ObjectType() const

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.

SelectionOptionsControl &operator=(SelectionOptionsControl &&in_that)

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

Parameters

in_that – An rvalue reference to a SelectionOptionsControl to take the impl from.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &operator=(SelectionOptionsControl const &in_that)

Share the underlying smart-pointer of the SelectionOptionsControl source.

Parameters

in_that – The SelectionOptionsControl source of the assignment.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl(SelectionOptionsControl &&in_that)

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

Parameters

in_that – An rvalue reference to a SelectionOptionsControl to take the impl from.

SelectionOptionsControl(SelectionOptionsControl const &in_that)

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

Parameters

in_that – The source SelectionOptionsControl to copy.

explicit SelectionOptionsControl(WindowKey const &in_window)

This constructor creates a SelectionOptionsControl object which is tied to the specified window.

Parameters

in_window – The window which this SelectionOptionsControl should operate on.

SelectionOptionsControl &SetAlgorithm(Selection::Algorithm in_algorithm)

Sets the type of selection algorithm to use. This setting has no effect on object space selections (i.e., select by shell, volume and ray).

See

Default value

Parameters

in_algorithm – The type of selection algorithm to use.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetDeferralExtentCullingRespected(bool in_state)

Sets whether to respect the deferral extent culling option during selection. If this value is set to false, the deferral extent culling option (see HPS::CullingControl) will be ignored.

See

Default value

Parameters

in_state – Whether to respect the deferral extent culling option during selection.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetDistanceCullingRespected(bool in_state)

Sets whether to respect the distance culling option during selection. If this value is set to false, the distance culling option (see HPS::CullingControl) will be ignored.

See

Default value

Parameters

in_state – Whether to respect the distance culling option during selection.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetExtentCullingRespected(bool in_state)

Sets whether to respect the extent culling option during selection. If this value is set to false, the extent culling option (see HPS::CullingControl) will be ignored.

See

Default value

Parameters

in_state – Whether to respect the extent culling option during selection.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetFaceCullingRespected(HPS::Culling::Face in_state)

Sets whether to respect the face culling option during selection. If this value is set to Off, the face culling option (see HPS::CullingControl) will be ignored.

See

Default value

Parameters

in_state – Whether to respect the back/front face culling option during selection.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetFrustumCullingRespected(bool in_state)

Sets whether to respect the frustum culling option during selection. If this value is set to false, the frustum culling option (see HPS::CullingControl) will be ignored.

See

Default value

Parameters

in_state – Whether to respect the frustum culling option during selection.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetGranularity(Selection::Granularity in_granularity)

Sets the selection granularity to use.

See

Default value

Parameters

in_granularity – The selection granularity to use.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetInternalLimit(size_t in_limit)

Sets the internal selection limit. The internal selection limit is the maximum number of subentities for shells and meshes that will be returned if performing subentity selection.

See

Default value

Parameters

in_limit – The internal selection limit.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetLevel(Selection::Level in_level)

Sets the level at which selection will occur.

See

Default value

Parameters

in_level – The level at which selection will occur.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetProximity(float in_proximity)

Sets the selection proximity in centimeters or object-relative-units (ORU), depending on the selection-routine being utilized. The selection proximity augments point-based or shell-based selections by also factoring in the area surrounding the selection-point or selection-shell.

For HPS::SelectionControl::SelectByPoint, this specifies the radius in centimeters around the selection within which objects will be returned as selected. The value must be positive.

For HPS::SelectionControl::SelectByShell, this specifies a distance in object-relative-units that determines whether a selection is performed. A positive proximity value will cause the selection algorithm to perform a selection when the distance between the two bodies is <= proximity, which means the bodies do not have to be touching in order for Visualize to perform a selection. If the proximity == 0, the bodies must be coincident or penetrating for a selection to occur. If proximity < 0, the shells must penetrate each other by at least that amount before a selection is performed.

Selection proximity is not relevant for other selection types.

When using HPS::SelectionControl::SelectByShell, false positives or negatives for selection may occur if the proximity and/or selection shells meet any of the following criteria:

  • The absolute value of a negative proximity is much larger than the actual intersection of the shells. An example would be a shell that represents a thin plate or a thinly-walled tube, and the specified proximity is larger than the thickness of the plate or tube.

  • Selection shells (“probes”) have vertices with complex intersections

  • Selection shells (“probes”) have concavities, especially multiple adjacent concavities.

See

Default value

See

Collision detection proximity

Parameters

in_proximity – The radius around the selection within which objects will be returned as selected.

Returns

A reference to this SelectionOptionsKit.

SelectionOptionsControl &SetRelatedLimit(size_t in_limit)

Sets the related selection limit. The related selection limit is the maximum number of items that will be returned as selected when performing a selection. A related selection limit of 0 would result in only the first item getting returned. If the value is greater than 0, this indicates the number of additional items beyond the first to return. The order of these additional items will depend on whether sorting is enabled (see SetSorting()).

See

Default value

See

SetSorting(Selection::Sorting)

Parameters

in_limit – Limit on the number of items that will be returned as selected when performing a selection.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetSorting(bool in_sorting)

Sets whether to sort selection results. This is only relevant if the related selection limit is greater than 0 (see SetRelatedLimit). Sorting works on an entity level. Subentity components like edges, vertices and faces are not sorted.

Deprecated:

This function exists for compatibility and SetSorting(Selection::Sorting) should be preferred in general usage.

See

Default value

Parameters

in_sorting – Whether to sort selection results. A value of true is equivalent to passing Selection::Sorting::Default to SetSorting(Selection::Sorting), and a value of false is equivalent to passing Selection::Sorting::Off to SetSorting(Selection::Sorting).

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetSorting(Selection::Sorting in_sorting)

Sets how selection results will be sorted.

This is only relevant if the related selection limit is greater than 0 (see SetRelatedLimit()). Sorting works on an entity level. Subentity components like edges, vertices, and faces are not sorted.

This option has no effect on SelectByShell.

For SelectByPoint, all values of the Selection::Sorting enum apply. Selection::Sorting::Default is an alias for Selection::Sorting::Proximity.

For all other selection types, Selection::Sorting::Proximity does not apply. Selection::Sorting::Default is an alias for Selection::Sorting::ZSorting.

See

Default value

See

Related limit in Programming Guide

See

SetRelatedLimit()

Parameters

in_sorting – The type of selection sorting to use.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetVectorCullingRespected(bool in_state)

Sets whether to respect the vector culling option during selection. If this value is set to false, the vector culling option (see HPS::CullingControl) will be ignored.

See

Default value

Parameters

in_state – Whether to respect the vector culling option during selection.

Returns

A reference to this SelectionOptionsControl.

SelectionOptionsControl &SetVolumeCullingRespected(bool in_state)

Sets whether to respect the volume culling option during selection. If this value is set to false, the volume culling option (see HPS::CullingControl) will be ignored.

See

Default value

Parameters

in_state – Whether to respect the volume culling option during selection.

Returns

A reference to this SelectionOptionsControl.

bool ShowAlgorithm(Selection::Algorithm &out_algorithm) const

Shows the selection algorithm for the associated window.

Parameters

out_algorithm – The selection algorithm for the associated window.

Returns

true if the selection algorithm is valid, false otherwise.

bool ShowDeferralExtentCullingRespected(bool &out_state) const

Shows the deferral extent culling respected state for the associated window.

Parameters

out_state – The deferral extent culling respected state.

Returns

true if the deferral extent culling respected state is valid, false otherwise.

bool ShowDistanceCullingRespected(bool &out_state) const

Shows the distance culling respected state for the associated window.

Parameters

out_state – The distance culling respected state.

Returns

true if the distance culling respected state is valid, false otherwise.

bool ShowExtentCullingRespected(bool &out_state) const

Shows the extent culling respected state for the associated window.

Parameters

out_state – The extent culling respected state.

Returns

true if the extent culling respected state is valid, false otherwise.

bool ShowFaceCullingRespected(HPS::Culling::Face &out_state) const

Shows the face culling respected state for the associated window.

Parameters

out_state – The face culling respected state [Off, Front, Back].

Returns

true if the distance culling respected state is valid, false otherwise.

bool ShowFrustumCullingRespected(bool &out_state) const

Shows the frustum culling respected state for the associated window.

Parameters

out_state – The frustum culling respected state.

Returns

true if the frustum culling respected state is valid, false otherwise.

bool ShowGranularity(Selection::Granularity &out_granularity) const

Shows the selection granularity for the associated window.

Parameters

out_granularity – The selection granularity for the associated window.

Returns

true if the selection granularity is valid, false otherwise.

bool ShowInternalLimit(size_t &out_limit) const

Shows the internal selection limit for the associated window.

Parameters

out_limit – The internal selection limit for the associated window.

Returns

true if the internal selection limit is valid, false otherwise.

bool ShowLevel(Selection::Level &out_level) const

Shows the selection level for the associated window.

Parameters

out_level – The selection level for the associated window.

Returns

true if the level is valid, false otherwise.

bool ShowProximity(float &out_proximity) const

Shows the selection proximity for the associated window.

Parameters

out_proximity – The selection proximity for the associated window.

Returns

true if the proximity is valid, false otherwise.

bool ShowRelatedLimit(size_t &out_limit) const

Shows the related selection limit for the associated window.

Parameters

out_limit – The related selection limit for the associated window.

Returns

true if the related selection limit is valid, false otherwise.

bool ShowSorting(Selection::Sorting &out_sorting) const

Shows the type of selection sorting for the associated window.

Parameters

out_sorting – The type of selection sorting to use for the associated window.

Returns

true if the selection sorting type is valid, false otherwise.

bool ShowVectorCullingRespected(bool &out_state) const

Shows the vector culling respected state for the associated window.

Parameters

out_state – The vector culling respected state.

Returns

true if the vector culling respected state is valid, false otherwise.

bool ShowVolumeCullingRespected(bool &out_state) const

Shows the volume culling respected state for the associated window.

Parameters

out_state – The volume culling respected state.

Returns

true if the volume culling respected state is valid, false otherwise.

SelectionOptionsControl &UnsetAlgorithm()

Removes the Algorithm setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetDeferralExtentCullingRespected()

Removes the Deferral Culling setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetDistanceCullingRespected()

Removes the distance Culling setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetEverything()

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

Returns

A reference to this object.

SelectionOptionsControl &UnsetExtentCullingRespected()

Removes the Extent Culling setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetFaceCullingRespected()

Removes the face Culling setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetFrustumCullingRespected()

Removes the Frustum Culling setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetGranularity()

Removes the Granularity setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetInternalLimit()

Removes the Internal Limit setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetLevel()

Removes the Selection Level setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetProximity()

Removes the Proximity setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetRelatedLimit()

Removes the Related Limit setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetSorting()

Removes the Sorting setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetVectorCullingRespected()

Removes the Vector Culling setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

SelectionOptionsControl &UnsetVolumeCullingRespected()

Removes the Volume Culling setting from this control. If the control is attached to a WindowKey this function restores the default setting as specified by SelectionOptionsKit::GetDefault().

Returns

A reference to this object.

~SelectionOptionsControl()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::SelectionOptionsControl