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

The HPS::SubwindowKit class is a user space object, useful for carrying a group of attribute settings related to subwindows. More...

#include <hps.h>

Inheritance diagram for HPS::SubwindowKit:
Collaboration diagram for HPS::SubwindowKit:

Public Member Functions

 SubwindowKit ()
 Initializes an empty kit. More...
 
 SubwindowKit (SubwindowKit const &in_kit)
 Copies the kit in_kit into this kit. More...
 
 SubwindowKit (SubwindowKit &&in_that)
 The move constructor creates a SubwindowKit by transferring the underlying impl of the rvalue reference to this SubwindowKit thereby avoiding a copy and allocation. More...
 
SubwindowKitoperator= (SubwindowKit &&in_that)
 The move assignment operator transfers the underlying impl of the rvalue reference to this SubwindowKit thereby avoiding a copy. More...
 
virtual ~SubwindowKit ()
 Destroy this kit. More...
 
HPS::Type ObjectType () const
 
void Set (SubwindowKit const &in_kit)
 Copies the source SubwindowKit into this object. More...
 
void Show (SubwindowKit &out_kit) const
 Copies this object into the given SubwindowKit. More...
 
SubwindowKitoperator= (SubwindowKit const &in_kit)
 Copies the source SubwindowKit into this object. More...
 
bool Empty () const
 Indicates whether this object has any values set on it. More...
 
bool Equals (SubwindowKit const &in_kit) const
 Check if the source SubwindowKit is equivalent to this object. More...
 
bool operator== (SubwindowKit const &in_kit) const
 Check if the source SubwindowKit is equivalent to this object. More...
 
bool operator!= (SubwindowKit const &in_kit) const
 Check if the source SubwindowKit is not equivalent to this object. More...
 
SubwindowKitSetSubwindow (Rectangle const &in_subwindow_position, Subwindow::Type in_subwindow_type=Subwindow::Type::Standard)
 Defines a portion of the containing window to act as a subwindow. More...
 
SubwindowKitSetSubwindow (Rectangle const &in_subwindow_position, IntRectangle const &in_subwindow_offsets, Subwindow::Type in_subwindow_type=Subwindow::Type::Standard)
 Defines a portion of the containing window to act as a subwindow. More...
 
SubwindowKitSetBackground (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...
 
SubwindowKitSetBorder (Subwindow::Border in_border_type)
 Controls the type of border, if any, that should be drawn for subwindows originating from this segment. More...
 
SubwindowKitSetRenderingAlgorithm (Subwindow::RenderingAlgorithm in_hsra)
 Determines the algorithm used to remove objects (or parts of objects) that are hidden from view by other objects. More...
 
SubwindowKitSetModelCompareMode (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...
 
SubwindowKitSetModelCompareMode (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...
 
SubwindowKitUnsetSubwindow ()
 Removes a subwindow setting. More...
 
SubwindowKitUnsetBackground ()
 Removes a subwindow background setting. More...
 
SubwindowKitUnsetBorder ()
 Removes a subwindow border setting. More...
 
SubwindowKitUnsetRenderingAlgorithm ()
 Removes a rendering algorithm setting. More...
 
SubwindowKitUnsetModelCompareMode ()
 Removes model compare setting. More...
 
SubwindowKitUnsetEverything ()
 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 HPS::Type Type () const
 This function returns the true type of the underlying object. 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

static SubwindowKit GetDefault ()
 Creates a SubwindowKit which contains the default settings. More...
 
template<typename T >
static intptr_t ClassID ()
 Unique identifier for this class. More...
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::SubwindowKit
 

Detailed Description

The HPS::SubwindowKit class is a user space object, useful for carrying a group of attribute settings related to subwindows.

Calling HPS::SubwindowKit::GetDefault() will return a kit with values found in this table.

Constructor & Destructor Documentation

◆ SubwindowKit() [1/3]

HPS::SubwindowKit::SubwindowKit ( )

Initializes an empty kit.

◆ SubwindowKit() [2/3]

HPS::SubwindowKit::SubwindowKit ( SubwindowKit const &  in_kit)

Copies the kit in_kit into this kit.

◆ SubwindowKit() [3/3]

HPS::SubwindowKit::SubwindowKit ( SubwindowKit &&  in_that)

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

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

◆ ~SubwindowKit()

virtual HPS::SubwindowKit::~SubwindowKit ( )
virtual

Destroy this kit.

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()

bool HPS::SubwindowKit::Empty ( ) const
virtual

Indicates whether this object has any values set on it.

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

Reimplemented from HPS::Object.

◆ Equals()

bool HPS::SubwindowKit::Equals ( SubwindowKit const &  in_kit) const

Check if the source SubwindowKit is equivalent to this object.

Parameters
in_kitThe source SubwindowKit to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

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

◆ GetDefault()

static SubwindowKit HPS::SubwindowKit::GetDefault ( )
static

Creates a SubwindowKit which contains the default settings.

The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.

Returns
A SubwindowKit with the default settings.

◆ 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::SubwindowKit::ObjectType ( ) const
inlinevirtual

Reimplemented from HPS::Kit.

Here is the call graph for this function:

◆ operator!=()

bool HPS::SubwindowKit::operator!= ( SubwindowKit const &  in_kit) const

Check if the source SubwindowKit is not equivalent to this object.

Parameters
in_kitThe source SubwindowKit to compare to this object.
Returns
true if the objects are not equivalent, false otherwise.

◆ operator=() [1/2]

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

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

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

◆ operator=() [2/2]

SubwindowKit& HPS::SubwindowKit::operator= ( SubwindowKit const &  in_kit)

Copies the source SubwindowKit into this object.

Parameters
in_kitThe source SubwindowKit to copy.
Returns
A reference to this object.

◆ operator==()

bool HPS::SubwindowKit::operator== ( SubwindowKit const &  in_kit) const

Check if the source SubwindowKit is equivalent to this object.

Parameters
in_kitThe source SubwindowKit to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

◆ Reset()

◆ Set()

void HPS::SubwindowKit::Set ( SubwindowKit const &  in_kit)

Copies the source SubwindowKit into this object.

Parameters
in_kitThe source object to copy.

◆ SetBackground()

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

SubwindowKit& HPS::SubwindowKit::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]

SubwindowKit& HPS::SubwindowKit::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]

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

SubwindowKit& HPS::SubwindowKit::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.

◆ SetSubwindow() [1/2]

SubwindowKit& HPS::SubwindowKit::SetSubwindow ( Rectangle const &  in_subwindow_position,
Subwindow::Type  in_subwindow_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_subwindow_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_subwindow_typeThe type of subwindow to create.
Returns
A reference to this object.

◆ SetSubwindow() [2/2]

SubwindowKit& HPS::SubwindowKit::SetSubwindow ( Rectangle const &  in_subwindow_position,
IntRectangle const &  in_subwindow_offsets,
Subwindow::Type  in_subwindow_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_subwindow_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_subwindow_offsetsThe pixel-space offsets to apply to each side of the given window position.
in_subwindow_typeThe type of subwindow to create.
Returns
A reference to this object.

◆ Show()

void HPS::SubwindowKit::Show ( SubwindowKit out_kit) const

Copies this object into the given SubwindowKit.

Parameters
out_kitThe SubwindowKit to populate with the contents of this object.

◆ ShowBackground()

bool HPS::SubwindowKit::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::SubwindowKit::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::SubwindowKit::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::SubwindowKit::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::SubwindowKit::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::SubwindowKit::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::Kit::Type ( ) const
inlinevirtualinherited

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::Object.

◆ UnsetBackground()

SubwindowKit& HPS::SubwindowKit::UnsetBackground ( )

Removes a subwindow background setting.

Returns
A reference to this object.

◆ UnsetBorder()

SubwindowKit& HPS::SubwindowKit::UnsetBorder ( )

Removes a subwindow border setting.

Returns
A reference to this object.

◆ UnsetEverything()

SubwindowKit& HPS::SubwindowKit::UnsetEverything ( )

Removes all settings from this object.

Returns
A reference to this object.

◆ UnsetModelCompareMode()

SubwindowKit& HPS::SubwindowKit::UnsetModelCompareMode ( )

Removes model compare setting.

Returns
A reference to this object.

◆ UnsetRenderingAlgorithm()

SubwindowKit& HPS::SubwindowKit::UnsetRenderingAlgorithm ( )

Removes a rendering algorithm setting.

Returns
A reference to this object.

◆ UnsetSubwindow()

SubwindowKit& HPS::SubwindowKit::UnsetSubwindow ( )

Removes a subwindow setting.

Returns
A reference to this object.

Member Data Documentation

◆ staticType

const HPS::Type HPS::SubwindowKit::staticType = HPS::Type::SubwindowKit
static

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