HPS::PerformanceControl Class Reference

#include <hps.h>

Inheritance diagram for HPS::PerformanceControl:
HPS::Control HPS::Object

Public Member Functions

HPS::Type ObjectType () const
 
PerformanceControloperator= (PerformanceControl &&in_that)
 
PerformanceControloperator= (PerformanceControl const &in_that)
 
 PerformanceControl (SegmentKey &in_seg)
 
 PerformanceControl (PerformanceControl const &in_that)
 
 PerformanceControl (PerformanceControl &&in_that)
 
PerformanceControlSetDisplayLists (Performance::DisplayLists in_display_list=Performance::DisplayLists::Segment)
 
PerformanceControlSetStaticConditions (Performance::StaticConditions in_conditions)
 
PerformanceControlSetStaticModel (Performance::StaticModel in_model_type)
 
bool ShowDisplayLists (Performance::DisplayLists &out_display_list) const
 
bool ShowStaticConditions (Performance::StaticConditions &out_conditions) const
 
bool ShowStaticModel (Performance::StaticModel &out_model_type) const
 
virtual HPS::Type Type () const
 
PerformanceControlUnsetDisplayLists ()
 
PerformanceControlUnsetEverything ()
 
PerformanceControlUnsetStaticConditions ()
 
PerformanceControlUnsetStaticModel ()
 
 ~PerformanceControl ()
 
- Public Member Functions inherited from HPS::Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
 Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::PerformanceControl
 
- Static Public Attributes inherited from HPS::Control
static const HPS::Type staticType = HPS::Type::Control
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 
- Protected Member Functions inherited from HPS::Control
 Control (Control &&in_that)
 
Controloperator= (Control &&in_that)
 

Detailed Description

The HPS::PerformanceControl class is a smart pointer that is tied to a database object. This object is used to enable and disable performance-related attributes, such as display lists and static model.

This table lists default values for the various segment attributes accessible from HPS::PerformanceControl.

Constructor & Destructor Documentation

◆ PerformanceControl() [1/3]

HPS::PerformanceControl::PerformanceControl ( SegmentKey in_seg)
explicit

Initializes a control tied to the segment in_seg.

◆ PerformanceControl() [2/3]

HPS::PerformanceControl::PerformanceControl ( PerformanceControl const &  in_that)

Initializes a control tied to the same object as in_that.

◆ PerformanceControl() [3/3]

HPS::PerformanceControl::PerformanceControl ( PerformanceControl &&  in_that)

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

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

◆ ~PerformanceControl()

HPS::PerformanceControl::~PerformanceControl ( )

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

Member Function Documentation

◆ ObjectType()

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

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.

Reimplemented from HPS::Control.

◆ operator=() [1/2]

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

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

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

◆ operator=() [2/2]

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

Share the underlying smart-pointer of the PerformanceControl source.

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

◆ SetDisplayLists()

PerformanceControl& HPS::PerformanceControl::SetDisplayLists ( Performance::DisplayLists  in_display_list = Performance::DisplayLists::Segment)

Sets the display list state. Display lists enables the drivers to cache data in video card memory for improved rendering performance.

Parameters
in_display_listThe type of display lists, if any, that should be used.
Returns
A reference to this object.

◆ SetStaticConditions()

PerformanceControl& HPS::PerformanceControl::SetStaticConditions ( Performance::StaticConditions  in_conditions)

Sets the mode for processing conditional expressions inn a static tree.

Parameters
in_conditionsThe type of conditional processing that should be used.
Returns
A reference to this object.

◆ SetStaticModel()

PerformanceControl& HPS::PerformanceControl::SetStaticModel ( Performance::StaticModel  in_model_type)

Sets the static tree state. This will create a compiled draw tree for the scene which should result in better rendering performance. It is important to note that the compiled tree will need to be regenerated if a change occurs within the segment tree.

Parameters
in_model_typeThe type of static tree, if any, that should be used.
Returns
A reference to this object.

◆ ShowDisplayLists()

bool HPS::PerformanceControl::ShowDisplayLists ( Performance::DisplayLists out_display_list) const

Shows the display list state.

Parameters
out_display_listThe type of display lists, if any.
Returns
true if the setting is valid, false otherwise.

◆ ShowStaticConditions()

bool HPS::PerformanceControl::ShowStaticConditions ( Performance::StaticConditions out_conditions) const

Shows the static conditions state.

Parameters
out_conditionsThe type of conditional expression processing
Returns
true if the setting is valid, false otherwise.

◆ ShowStaticModel()

bool HPS::PerformanceControl::ShowStaticModel ( Performance::StaticModel out_model_type) const

Shows the static model state.

Parameters
out_model_typeThe type of static tree, if any
Returns
true if the setting is valid, false otherwise.

◆ Type()

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

Warning
This function must synchronize the database (by waiting for all pending database operations to complete) in order to know the type status of this object with certainty. Therefore this function can negatively impact performance. You should vigorously avoid using this function in high-traffic or peformance-critical areas of your code.
Returns
The true type of the object in question.

Reimplemented from HPS::Control.

◆ UnsetDisplayLists()

PerformanceControl& HPS::PerformanceControl::UnsetDisplayLists ( )

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

Returns
A reference to this object.

◆ UnsetEverything()

PerformanceControl& HPS::PerformanceControl::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 PerformanceKit::GetDefault().

Returns
A reference to this object.

◆ UnsetStaticConditions()

PerformanceControl& HPS::PerformanceControl::UnsetStaticConditions ( )

Removes the static condition state. setting as specified by PerformanceKit::GetDefault().

Returns
A reference to this object.

◆ UnsetStaticModel()

PerformanceControl& HPS::PerformanceControl::UnsetStaticModel ( )

Removes the static model state, releasing the compiled draw tree. If the control is attached to a WindowKey this function restores the default value of this setting as specified by PerformanceKit::GetDefault().

Returns
A reference to this object.

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