HPS::EdgeAttributeControl Class Reference

#include <hps.h>

Inheritance diagram for HPS::EdgeAttributeControl:
HPS::Control HPS::Object

Public Member Functions

 EdgeAttributeControl (SegmentKey &in_seg)
 
 EdgeAttributeControl (EdgeAttributeControl const &in_that)
 
 EdgeAttributeControl (EdgeAttributeControl &&in_that)
 
HPS::Type ObjectType () const
 
EdgeAttributeControloperator= (EdgeAttributeControl &&in_that)
 
EdgeAttributeControloperator= (EdgeAttributeControl const &in_that)
 
EdgeAttributeControlSetHardAngle (float in_angle)
 
EdgeAttributeControlSetPattern (char const *in_pattern_name)
 
EdgeAttributeControlSetWeight (float in_weight, Edge::SizeUnits in_units=Edge::SizeUnits::ScaleFactor)
 
bool ShowHardAngle (float &out_angle) const
 
bool ShowPattern (UTF8 &out_pattern_name) const
 
bool ShowWeight (float &out_weight, Edge::SizeUnits &out_units) const
 
virtual HPS::Type Type () const
 
EdgeAttributeControlUnsetEverything ()
 
EdgeAttributeControlUnsetHardAngle ()
 
EdgeAttributeControlUnsetPattern ()
 
EdgeAttributeControlUnsetWeight ()
 
 ~EdgeAttributeControl ()
 
- 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::EdgeAttributeControl
 
- 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::EdgeAttributeControl class is a smart pointer that is tied to a database object. Using this control, you can manipulate the various attributes associated with geometry edges. Edges are present on any piece of facetted geometry.

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

Constructor & Destructor Documentation

◆ EdgeAttributeControl() [1/3]

HPS::EdgeAttributeControl::EdgeAttributeControl ( SegmentKey in_seg)
explicit

Initializes a control tied to the segment in_seg.

◆ EdgeAttributeControl() [2/3]

HPS::EdgeAttributeControl::EdgeAttributeControl ( EdgeAttributeControl const &  in_that)

Initializes a control tied to the same object as in_that.

◆ EdgeAttributeControl() [3/3]

HPS::EdgeAttributeControl::EdgeAttributeControl ( EdgeAttributeControl &&  in_that)

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

Parameters
in_thatAn rvalue reference to an EdgeAttributeControl to take the impl from.

◆ ~EdgeAttributeControl()

HPS::EdgeAttributeControl::~EdgeAttributeControl ( )

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

Member Function Documentation

◆ ObjectType()

HPS::Type HPS::EdgeAttributeControl::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]

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

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

Parameters
in_thatAn rvalue reference to an EdgeAttributeControl to take the impl from.
Returns
A reference to this EdgeAttributeControl.

◆ operator=() [2/2]

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

Share the underlying smart-pointer of the EdgeAttributeControl source.

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

◆ SetHardAngle()

EdgeAttributeControl& HPS::EdgeAttributeControl::SetHardAngle ( float  in_angle)

Sets the angle between adjacent faces necessary for the edge between them to be considered a hard edge.

Parameters
in_angleThe angle, in degrees, between the adjacent faces necessary for a hard edge.
Returns
A reference to this object.

◆ SetPattern()

EdgeAttributeControl& HPS::EdgeAttributeControl::SetPattern ( char const *  in_pattern_name)

Specifies the pattern of edges.

Parameters
in_patternThe name of a line pattern, defined in a portfolio that is accessible.
Returns
A reference to this object.
See also
Programming Guide: Line Patterns

◆ SetWeight()

EdgeAttributeControl& HPS::EdgeAttributeControl::SetWeight ( float  in_weight,
Edge::SizeUnits  in_units = Edge::SizeUnits::ScaleFactor 
)

Sets the weight of lines drawn in edge rendering.

Parameters
in_weightThe weight value for edges.
in_unitsThe units applied to in_weight.
Returns
A reference to this object.

◆ ShowHardAngle()

bool HPS::EdgeAttributeControl::ShowHardAngle ( float &  out_angle) const

Shows the weight of lines drawn in edge rendering.

Parameters
out_angleThe angle, in degrees, between the adjacent faces necessary for a hard edge.
Returns
true if the setting is valid, false otherwise.

◆ ShowPattern()

bool HPS::EdgeAttributeControl::ShowPattern ( UTF8 out_pattern_name) const

Shows the line pattern of the edges.

Parameters
out_patternThe name of a line pattern, defined in a portfolio that is accessible.
Returns
true if the setting is valid, false otherwise.

◆ ShowWeight()

bool HPS::EdgeAttributeControl::ShowWeight ( float &  out_weight,
Edge::SizeUnits out_units 
) const

Shows the weight of lines drawn in edge rendering.

Parameters
out_weightThe weight value for edges.
out_unitsThe units applied to in_weight.
Returns
true if the setting is valid, false otherwise.

◆ Type()

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

◆ UnsetEverything()

EdgeAttributeControl& HPS::EdgeAttributeControl::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 EdgeAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetHardAngle()

EdgeAttributeControl& HPS::EdgeAttributeControl::UnsetHardAngle ( )

Removes the hard edge angle setting. If the control is attached to a WindowKey this function restores the default value of this setting as specified by EdgeAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetPattern()

EdgeAttributeControl& HPS::EdgeAttributeControl::UnsetPattern ( )

Removes the line pattern setting for edges. If the control is attached to a WindowKey this function restores the default value of this setting as specified by EdgeAttributeKit::GetDefault().

Returns
A reference to this object.

◆ UnsetWeight()

EdgeAttributeControl& HPS::EdgeAttributeControl::UnsetWeight ( )

Removes the weight setting for edges. If the control is attached to a WindowKey this function restores the default value of this setting as specified by EdgeAttributeKit::GetDefault().

Returns
A reference to this object.

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