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::SubwindowControl Class Reference

#include <hps.h>

Inheritance diagram for HPS::SubwindowControl:
Collaboration diagram for HPS::SubwindowControl:

Public Member Functions

 SubwindowControl (SegmentKey &in_seg)
 Initializes a control tied to the segment in_seg. More...
 
 SubwindowControl (SubwindowControl const &in_that)
 Initializes a control tied to the same object as in_that. More...
 
 SubwindowControl (SubwindowControl &&in_that)
 The move constructor creates a SubwindowControl by transferring the underlying impl of the rvalue reference to this SubwindowControl thereby avoiding a copy and allocation. More...
 
SubwindowControloperator= (SubwindowControl &&in_that)
 The move assignment operator transfers the underlying impl of the rvalue reference to this SubwindowControl thereby avoiding a copy. More...
 
 ~SubwindowControl ()
 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
 
SubwindowControloperator= (SubwindowControl const &in_that)
 Share the underlying smart-pointer of the SubwindowControl source. More...
 
SubwindowControlSetSubwindow (Rectangle const &in_window_position, Subwindow::Type in_type=Subwindow::Type::Standard)
 Defines a portion of the containing window to act as a subwindow. More...
 
SubwindowControlSetSubwindow (Rectangle const &in_window_position, IntRectangle const &in_window_offsets, Subwindow::Type in_type=Subwindow::Type::Standard)
 Defines a portion of the containing window to act as a subwindow. More...
 
SubwindowControlSetBackground (Subwindow::Background in_bg_type, char const *in_definition_name="")
 Controls the type of background to be used for subwindows originating from this segment. More...
 
SubwindowControlSetBorder (Subwindow::Border in_border_type)
 Controls the type of border, if any, that should be drawn for subwindows originating from this segment. More...
 
SubwindowControlSetRenderingAlgorithm (Subwindow::RenderingAlgorithm in_hsra)
 Determines the algorithm used to remove objects (or parts of objects) that are hidden from view by other objects. More...
 
SubwindowControlSetModelCompareMode (bool in_state, SegmentKey const &in_source1=SegmentKey(), SegmentKey const &in_source2=SegmentKey())
 Sets 'model compare' rendering mode which displays a visual diff between the two source segments in this subwindow. More...
 
SubwindowControlSetModelCompareMode (SegmentKey const &in_source1, SegmentKey const &in_source2)
 Sets 'model compare' rendering mode which displays a visual diff between the two source segments in this subwindow. More...
 
SubwindowControlUnsetSubwindow ()
 Removes a subwindow setting. More...
 
SubwindowControlUnsetBackground ()
 Removes a subwindow background setting. More...
 
SubwindowControlUnsetBorder ()
 Removes a subwindow border setting. More...
 
SubwindowControlUnsetRenderingAlgorithm ()
 Removes a rendering algorithm setting. More...
 
SubwindowControlUnsetModelCompareMode ()
 Removes model compare setting. More...
 
SubwindowControlUnsetEverything ()
 Removes all settings from this object. More...
 
bool ShowSubwindow (Rectangle &out_subwindow_position, IntRectangle &out_subwindow_offsets, Subwindow::Type &out_subwindow_type) const
 Shows the subwindow setting. More...
 
bool ShowSubwindow (Rectangle &out_subwindow_position, Subwindow::Type &out_subwindow_type) const
 Shows the subwindow setting. More...
 
bool ShowBackground (Subwindow::Background &out_bg_type, UTF8 &out_definition_name) const
 Shows the window background setting. More...
 
bool ShowBorder (Subwindow::Border &out_border_type) const
 Shows the subwindow border setting. More...
 
bool ShowRenderingAlgorithm (Subwindow::RenderingAlgorithm &out_hsra) const
 Shows the rendering algorithm setting. More...
 
bool ShowModelCompareMode (bool &out_state, SegmentKey &out_source1, SegmentKey &out_source2) const
 Shows the model compare setting. 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::SubwindowControl
 

Private Member Functions

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

Detailed Description

The HPS::SubwindowControl class is a smart pointer that is tied to a database object. The HPS::SubwindowControl allows you to manipulate the various settings associated with subwindows, such as border, background, and priority. As the main Visualize window is also an implicit subwindow, this control also allows you to set the rendering algorithm. The rendering algorithm should only have a single setting for each window or subwindow. Setting disparate rendering algorithms in multiple places in your scene can lead to unexpected results.

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

Constructor & Destructor Documentation

◆ SubwindowControl() [1/4]

HPS::SubwindowControl::SubwindowControl ( SegmentKey in_seg)
explicit

Initializes a control tied to the segment in_seg.

◆ SubwindowControl() [2/4]

HPS::SubwindowControl::SubwindowControl ( SubwindowControl const &  in_that)

Initializes a control tied to the same object as in_that.

◆ SubwindowControl() [3/4]

HPS::SubwindowControl::SubwindowControl ( SubwindowControl &&  in_that)

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

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

◆ ~SubwindowControl()

HPS::SubwindowControl::~SubwindowControl ( )

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

◆ SubwindowControl() [4/4]

HPS::SubwindowControl::SubwindowControl ( )
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::SubwindowControl::ObjectType ( ) const
inlinevirtual

Reimplemented from HPS::Control.

◆ operator=() [1/2]

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

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

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

◆ operator=() [2/2]

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

Share the underlying smart-pointer of the SubwindowControl source.

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

◆ Reset()

◆ SetBackground()

SubwindowControl& HPS::SubwindowControl::SetBackground ( Subwindow::Background  in_bg_type,
char const *  in_definition_name = "" 
)

Controls the type of background to be used for subwindows originating from this segment.

This has no effect when applied to segments without a subwindow present.

Parameters
in_bg_typeThe type of background to be used for subwindows originating from this segment.
in_definition_namethe name of a definition to be used in the background. Only relevant if in_bg_type is Image or Cubemap.
Returns
A reference to this object.

◆ SetBorder()

SubwindowControl& HPS::SubwindowControl::SetBorder ( Subwindow::Border  in_border_type)

Controls the type of border, if any, that should be drawn for subwindows originating from this segment.

This has no effect when applied to segments without a subwindow present.

Parameters
in_border_typeThe type of border, if any, that should be drawn for subwindows originating from this segment.
Returns
A reference to this object.

◆ SetModelCompareMode() [1/2]

SubwindowControl& HPS::SubwindowControl::SetModelCompareMode ( bool  in_state,
SegmentKey const &  in_source1 = SegmentKey(),
SegmentKey const &  in_source2 = SegmentKey() 
)

Sets 'model compare' rendering mode which displays a visual diff between the two source segments in this subwindow.

Parameters
in_stateToggles compare mode on or off.
in_source1The first source model.
in_source2The second source model.
Returns
A reference to this object.

◆ SetModelCompareMode() [2/2]

SubwindowControl& HPS::SubwindowControl::SetModelCompareMode ( SegmentKey const &  in_source1,
SegmentKey const &  in_source2 
)

Sets 'model compare' rendering mode which displays a visual diff between the two source segments in this subwindow.

Parameters
in_source1The first source model.
in_source2The second source model.
Returns
A reference to this object.

◆ SetRenderingAlgorithm()

SubwindowControl& HPS::SubwindowControl::SetRenderingAlgorithm ( Subwindow::RenderingAlgorithm  in_hsra)

Determines the algorithm used to remove objects (or parts of objects) that are hidden from view by other objects.

This has no effect when applied to segments without a subwindow present.

Parameters
in_hsraThe algorithm used to identify and remove hidden surfaces.
Returns
A reference to this object.
See also
Rendering algorithm default value

◆ SetSubwindow() [1/2]

SubwindowControl& HPS::SubwindowControl::SetSubwindow ( Rectangle const &  in_window_position,
Subwindow::Type  in_type = Subwindow::Type::Standard 
)

Defines a portion of the containing window to act as a subwindow.

Window segments have an implicit subwindow of -1 to 1 in both x and y directions that cannot be changed. Other segments can be constrained to some portion of that space. Most other subwindow-related settings are only relevant if they are applied on a segment that also contains a subwindow.

Parameters
in_window_positionThe portion of the containing window that should be reserved for a subwindow. The subwindow is defined in the context of a rectangle extending out a single unit in each direction from the origin. For example, a subwindow rectangle defined as Rectangle(0, 1, -1, 0) would occupy the lower right quarter of the containing window.
in_typeThe type of subwindow to create.
Returns
A reference to this object.
See also
Subwindow default value

◆ SetSubwindow() [2/2]

SubwindowControl& HPS::SubwindowControl::SetSubwindow ( Rectangle const &  in_window_position,
IntRectangle const &  in_window_offsets,
Subwindow::Type  in_type = Subwindow::Type::Standard 
)

Defines a portion of the containing window to act as a subwindow.

Window segments have an implicit subwindow of -1 to 1 in both x and y directions that cannot be changed. Other segments can be constrained to some portion of that space. Most other subwindow-related settings are only relevant if they are applied on a segment that also contains a subwindow.

Parameters
in_window_positionThe portion of the containing window that should be reserved for a subwindow. The subwindow is defined in the context of a rectangle extending out a single unit in each direction from the origin. For example, a subwindow rectangle defined as Rectangle(0, 1, -1, 0) would occupy the lower right quarter of the containing window.
in_window_offsetsThe pixel-space offsets to apply to each side of the given window position.
in_typeThe type of subwindow to create.
Returns
A reference to this object.
See also
Subwindow default value

◆ ShowBackground()

bool HPS::SubwindowControl::ShowBackground ( Subwindow::Background out_bg_type,
UTF8 out_definition_name 
) const

Shows the window background setting.

Parameters
out_bg_typeThe type of background to be used for subwindows originating from this segment.
out_definition_namethe name of a definition to be used in the background.
Returns
true if the setting is valid, false otherwise.

◆ ShowBorder()

bool HPS::SubwindowControl::ShowBorder ( Subwindow::Border out_border_type) const

Shows the subwindow border setting.

Parameters
out_border_typeThe type of border, if any, that should be drawn for subwindows originating from this segment.
Returns
true if the setting is valid, false otherwise.

◆ ShowModelCompareMode()

bool HPS::SubwindowControl::ShowModelCompareMode ( bool &  out_state,
SegmentKey out_source1,
SegmentKey out_source2 
) const

Shows the model compare setting.

Parameters
out_stateThe model compare enabled state.
out_source1The first source model.
out_source2The second source model.
Returns
true if the setting is valid, false otherwise.

◆ ShowRenderingAlgorithm()

bool HPS::SubwindowControl::ShowRenderingAlgorithm ( Subwindow::RenderingAlgorithm out_hsra) const

Shows the rendering algorithm setting.

Parameters
out_hsraThe algorithm used to identify and remove hidden surfaces.
Returns
true if the setting is valid, false otherwise.

◆ ShowSubwindow() [1/2]

bool HPS::SubwindowControl::ShowSubwindow ( Rectangle out_subwindow_position,
IntRectangle out_subwindow_offsets,
Subwindow::Type out_subwindow_type 
) const

Shows the subwindow setting.

Parameters
out_subwindow_positionThe portion of the containing window that should be reserved for a subwindow.
out_subwindow_offsetsThe pixel-space offsets being applied to the subwindow position.
out_subwindow_typeThe type of subwindow to create.
Returns
true if the setting is valid, false otherwise.

◆ ShowSubwindow() [2/2]

bool HPS::SubwindowControl::ShowSubwindow ( Rectangle out_subwindow_position,
Subwindow::Type out_subwindow_type 
) const

Shows the subwindow setting.

Parameters
out_subwindow_positionThe portion of the containing window that should be reserved for a subwindow.
out_subwindow_typeThe type of subwindow to create.
Returns
true if the setting is valid, false otherwise.
Deprecated:
This function exists for compatibility and the other overload should be preferred in general usage.

◆ Type()

virtual HPS::Type HPS::SubwindowControl::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.

◆ UnsetBackground()

SubwindowControl& HPS::SubwindowControl::UnsetBackground ( )

Removes a subwindow background setting.

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

Returns
A reference to this object.

◆ UnsetBorder()

SubwindowControl& HPS::SubwindowControl::UnsetBorder ( )

Removes a subwindow border setting.

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

Returns
A reference to this object.

◆ UnsetEverything()

SubwindowControl& HPS::SubwindowControl::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 SubwindowKit::GetDefault().

Returns
A reference to this object.

◆ UnsetModelCompareMode()

SubwindowControl& HPS::SubwindowControl::UnsetModelCompareMode ( )

Removes model compare setting.

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

Returns
A reference to this object.

◆ UnsetRenderingAlgorithm()

SubwindowControl& HPS::SubwindowControl::UnsetRenderingAlgorithm ( )

Removes a rendering algorithm setting.

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

Returns
A reference to this object.

◆ UnsetSubwindow()

SubwindowControl& HPS::SubwindowControl::UnsetSubwindow ( )

Removes a subwindow setting.

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

Returns
A reference to this object.

Member Data Documentation

◆ staticType

const HPS::Type HPS::SubwindowControl::staticType = HPS::Type::SubwindowControl
static

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