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

The HPS::ContourLineKit class is a user space object, useful for carrying a group of attribute settings. More...

#include <hps.h>

Inheritance diagram for HPS::ContourLineKit:
Collaboration diagram for HPS::ContourLineKit:

Public Member Functions

 ContourLineKit ()
 Initializes an empty kit. More...
 
 ContourLineKit (ContourLineKit const &in_kit)
 The copy constructor creates a new ContourLineKit object that contains the same settings as the source object. More...
 
 ContourLineKit (ContourLineKit &&in_that)
 The move constructor creates a ContourLineKit by transferring the underlying impl of the rvalue reference to this ContourLineKit thereby avoiding a copy and allocation. More...
 
ContourLineKitoperator= (ContourLineKit &&in_that)
 The move assignment operator transfers the underlying impl of the rvalue reference to this ContourLineKit thereby avoiding a copy. More...
 
virtual ~ContourLineKit ()
 Destroy this kit. More...
 
HPS::Type ObjectType () const
 
void Set (ContourLineKit const &in_kit)
 Copies the source ContourLineKit into this object. More...
 
void Show (ContourLineKit &out_kit) const
 Copies this object into the given ContourLineKit. More...
 
ContourLineKitoperator= (ContourLineKit const &in_kit)
 Copies the source ContourLineKit into this object. More...
 
bool Empty () const
 Indicates whether this object has any values set on it. More...
 
bool Equals (ContourLineKit const &in_kit) const
 Check if the source ContourLineKit is equivalent to this object. More...
 
bool operator== (ContourLineKit const &in_kit) const
 Check if the source ContourLineKit is equivalent to this object. More...
 
bool operator!= (ContourLineKit const &in_kit) const
 Check if the source ContourLineKit is not equivalent to this object. More...
 
ContourLineKitSetVisibility (bool in_state)
 Determines whether contour lines should be rendered. More...
 
ContourLineKitSetPositions (float in_interval, float in_offset)
 Controls the positioning of contour lines. More...
 
ContourLineKitSetPositions (FloatArray const &in_positions)
 Controls the positioning of contour lines. More...
 
ContourLineKitSetPositions (size_t in_count, float const in_positions[])
 Controls the positioning of contour lines. More...
 
ContourLineKitSetColors (RGBColorArray const &in_colors)
 Sets the colors to be used for drawing contour lines. More...
 
ContourLineKitSetColors (size_t in_count, RGBColor const in_colors[])
 Sets the colors to be used for drawing contour lines. More...
 
ContourLineKitSetColors (RGBColor const &in_color)
 Sets the color to be used for drawing all contour lines. More...
 
ContourLineKitSetPatterns (UTF8Array const &in_patterns)
 Sets the line patterns to be used for drawing contour lines. More...
 
ContourLineKitSetPatterns (size_t in_count, UTF8 const in_patterns[])
 Sets the line patterns to be used for drawing contour lines. More...
 
ContourLineKitSetPatterns (char const *in_pattern)
 Sets the line pattern to be used for drawing all contour lines. More...
 
ContourLineKitSetWeights (FloatArray const &in_weights, LineSizeUnitsArray const &in_units)
 Sets the line weights to be used for drawing contour lines. More...
 
ContourLineKitSetWeights (size_t in_count, float const in_weights[], Line::SizeUnits const in_units[])
 Sets the line weights to be used for drawing contour lines. More...
 
ContourLineKitSetWeights (float in_weight, Line::SizeUnits in_units=Line::SizeUnits::ScaleFactor)
 Sets the line weight to be used for drawing all contour lines. More...
 
ContourLineKitSetLighting (bool in_state)
 Controls whether contour lines are lit. More...
 
ContourLineKitUnsetVisibility ()
 Removes the contour line visibility setting. More...
 
ContourLineKitUnsetPositions ()
 Removes the contour line positions setting. More...
 
ContourLineKitUnsetColors ()
 Removes the contour line colors setting. More...
 
ContourLineKitUnsetPatterns ()
 Removes the contour line patterns setting. More...
 
ContourLineKitUnsetWeights ()
 Removes the contour line weights setting. More...
 
ContourLineKitUnsetLighting ()
 Removes the contour line lighting setting. More...
 
ContourLineKitUnsetEverything ()
 Removes all settings from this object. More...
 
bool ShowVisibility (bool &out_state) const
 Shows the visibility state of contour lines. More...
 
bool ShowPositions (ContourLine::Mode &out_mode, FloatArray &out_positions) const
 Shows the positions of contour lines. More...
 
bool ShowColors (RGBColorArray &out_colors) const
 Shows the colors of contour lines. More...
 
bool ShowPatterns (UTF8Array &out_patterns) const
 Shows the line patterns of contour lines. More...
 
bool ShowWeights (FloatArray &out_weights, LineSizeUnitsArray &out_units) const
 Shows the line weights of contour lines. More...
 
bool ShowLighting (bool &out_state) const
 Shows whether contour lines should be lit. 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 ContourLineKit GetDefault ()
 Creates a ContourLineKit 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::ContourLineKit
 

Detailed Description

The HPS::ContourLineKit class is a user space object, useful for carrying a group of attribute settings.

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

Constructor & Destructor Documentation

◆ ContourLineKit() [1/3]

HPS::ContourLineKit::ContourLineKit ( )

Initializes an empty kit.

◆ ContourLineKit() [2/3]

HPS::ContourLineKit::ContourLineKit ( ContourLineKit const &  in_kit)

The copy constructor creates a new ContourLineKit object that contains the same settings as the source object.

Parameters
in_kitThe source object to copy.

◆ ContourLineKit() [3/3]

HPS::ContourLineKit::ContourLineKit ( ContourLineKit &&  in_that)

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

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

◆ ~ContourLineKit()

virtual HPS::ContourLineKit::~ContourLineKit ( )
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::ContourLineKit::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::ContourLineKit::Equals ( ContourLineKit const &  in_kit) const

Check if the source ContourLineKit is equivalent to this object.

Parameters
in_kitThe source ContourLineKit 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 ContourLineKit HPS::ContourLineKit::GetDefault ( )
static

Creates a ContourLineKit 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 ContourLineKit 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::ContourLineKit::ObjectType ( ) const
inlinevirtual

Reimplemented from HPS::Kit.

Here is the call graph for this function:

◆ operator!=()

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

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

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

◆ operator=() [1/2]

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

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

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

◆ operator=() [2/2]

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

Copies the source ContourLineKit into this object.

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

◆ operator==()

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

Check if the source ContourLineKit is equivalent to this object.

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

◆ Reset()

◆ Set()

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

Copies the source ContourLineKit into this object.

Parameters
in_kitThe source object to copy.

◆ SetColors() [1/3]

ContourLineKit& HPS::ContourLineKit::SetColors ( RGBColorArray const &  in_colors)

Sets the colors to be used for drawing contour lines.

If there are more contour lines than colors, the array will be cycled through.

Parameters
in_colorsAn array of colors to be used for drawing contour lines.
Returns
A reference to this object.

◆ SetColors() [2/3]

ContourLineKit& HPS::ContourLineKit::SetColors ( size_t  in_count,
RGBColor const  in_colors[] 
)

Sets the colors to be used for drawing contour lines.

If there are more contour lines than colors, the array will be cycled through.

Parameters
in_countThe number of elements in in_colors.
in_colorsAn array of colors to be used for drawing contour lines.
Returns
A reference to this object.

◆ SetColors() [3/3]

ContourLineKit& HPS::ContourLineKit::SetColors ( RGBColor const &  in_color)

Sets the color to be used for drawing all contour lines.

Parameters
in_colorThe color to be used for drawing all contour lines
Returns
A reference to this object.

◆ SetLighting()

ContourLineKit& HPS::ContourLineKit::SetLighting ( bool  in_state)

Controls whether contour lines are lit.

Parameters
in_stateWhether contour lines are lit.
Returns
A reference to this object.

◆ SetPatterns() [1/3]

ContourLineKit& HPS::ContourLineKit::SetPatterns ( UTF8Array const &  in_patterns)

Sets the line patterns to be used for drawing contour lines.

If there are more contour lines than patterns, the array will be cycled through.

Parameters
in_patternsAn array of line pattern names, defined in an accessible portfolio, to be used for drawing contour lines.
Returns
A reference to this object.

◆ SetPatterns() [2/3]

ContourLineKit& HPS::ContourLineKit::SetPatterns ( size_t  in_count,
UTF8 const  in_patterns[] 
)

Sets the line patterns to be used for drawing contour lines.

If there are more contour lines than patterns, the array will be cycled through.

Parameters
in_countThe number of elements in in_patterns.
in_patternsAn array of line pattern names, defined in an accessible portfolio, to be used for drawing contour lines.
Returns
A reference to this object.

◆ SetPatterns() [3/3]

ContourLineKit& HPS::ContourLineKit::SetPatterns ( char const *  in_pattern)

Sets the line pattern to be used for drawing all contour lines.

Parameters
in_patternThe line pattern name, defined in an accessible portfolio, to be used for drawing all contour lines.
Returns
A reference to this object.

◆ SetPositions() [1/3]

ContourLineKit& HPS::ContourLineKit::SetPositions ( float  in_interval,
float  in_offset 
)

Controls the positioning of contour lines.

This variant creates them at regular intervals with an optional offset.

Parameters
in_intervalThe number of units between contour lines.
in_offsetThe starting point for contour lines.
Returns
A reference to this object.

◆ SetPositions() [2/3]

ContourLineKit& HPS::ContourLineKit::SetPositions ( FloatArray const &  in_positions)

Controls the positioning of contour lines.

This variant defines explicit locations that contour lines should appear at.

Parameters
in_positionsAn array of explicit locations to draw contour lines.
Returns
A reference to this object.

◆ SetPositions() [3/3]

ContourLineKit& HPS::ContourLineKit::SetPositions ( size_t  in_count,
float const  in_positions[] 
)

Controls the positioning of contour lines.

This variant defines explicit locations that contour lines should appear at.

Parameters
in_countThe number of elements in in_positions.
in_positionsAn array of explicit locations to draw contour lines.
Returns
A reference to this object.

◆ SetVisibility()

ContourLineKit& HPS::ContourLineKit::SetVisibility ( bool  in_state)

Determines whether contour lines should be rendered.

Parameters
in_stateWhether contour lines should be rendered.
Returns
A reference to this object.

◆ SetWeights() [1/3]

ContourLineKit& HPS::ContourLineKit::SetWeights ( FloatArray const &  in_weights,
LineSizeUnitsArray const &  in_units 
)

Sets the line weights to be used for drawing contour lines.

If there are more contour lines than weights, the array will be cycled through.

Parameters
in_weightsAn array of line weights to be applied to contour lines.
in_unitsAn array of line weight units used with the corresponding entry in in_weights.
Returns
A reference to this object.

◆ SetWeights() [2/3]

ContourLineKit& HPS::ContourLineKit::SetWeights ( size_t  in_count,
float const  in_weights[],
Line::SizeUnits const  in_units[] 
)

Sets the line weights to be used for drawing contour lines.

If there are more contour lines than weights, the array will be cycled through.

Parameters
in_countThe number of elements in both in_weights and in_units.
in_weightsAn array of line weights to be applied to contour lines.
in_unitsAn array of line weight units used with the corresponding entry in in_weights.
Returns
A reference to this object.

◆ SetWeights() [3/3]

ContourLineKit& HPS::ContourLineKit::SetWeights ( float  in_weight,
Line::SizeUnits  in_units = Line::SizeUnits::ScaleFactor 
)

Sets the line weight to be used for drawing all contour lines.

Parameters
in_weightThe line weight to be used for drawing all contour lines.
in_unitsThe units associated with in_weight.
Returns
A reference to this object.

◆ Show()

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

Copies this object into the given ContourLineKit.

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

◆ ShowColors()

bool HPS::ContourLineKit::ShowColors ( RGBColorArray out_colors) const

Shows the colors of contour lines.

Parameters
out_colorsAn array of colors of contour lines
Returns
true if the setting is valid, false otherwise.

◆ ShowLighting()

bool HPS::ContourLineKit::ShowLighting ( bool &  out_state) const

Shows whether contour lines should be lit.

Parameters
out_stateWhether contour lines should be lit.
Returns
true if the setting is valid, false otherwise.

◆ ShowPatterns()

bool HPS::ContourLineKit::ShowPatterns ( UTF8Array out_patterns) const

Shows the line patterns of contour lines.

Parameters
out_patternsAn array of line pattern names for contour lines.
Returns
true if the setting is valid, false otherwise.

◆ ShowPositions()

bool HPS::ContourLineKit::ShowPositions ( ContourLine::Mode out_mode,
FloatArray out_positions 
) const

Shows the positions of contour lines.

Parameters
out_modeWhether the positions repeat at some interval or are an explicit list.
out_positionsIf out_mode is Repeating, this will contain the interval and offset, in that order. Otherwise it will contain the explicit list specified.
Returns
true if the setting is valid, false otherwise.

◆ ShowVisibility()

bool HPS::ContourLineKit::ShowVisibility ( bool &  out_state) const

Shows the visibility state of contour lines.

Parameters
out_stateWhether contour lines should be rendered.
Returns
true if the setting is valid, false otherwise.

◆ ShowWeights()

bool HPS::ContourLineKit::ShowWeights ( FloatArray out_weights,
LineSizeUnitsArray out_units 
) const

Shows the line weights of contour lines.

Parameters
out_weightsAn array of line weights for contour lines.
out_unitsAn array of line weight units, each is applied to the corresponding entry in out_weights
Returns
true if the setting is valid, false otherwise.

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

◆ UnsetColors()

ContourLineKit& HPS::ContourLineKit::UnsetColors ( )

Removes the contour line colors setting.

Returns
A reference to this object.

◆ UnsetEverything()

ContourLineKit& HPS::ContourLineKit::UnsetEverything ( )

Removes all settings from this object.

Returns
A reference to this object.

◆ UnsetLighting()

ContourLineKit& HPS::ContourLineKit::UnsetLighting ( )

Removes the contour line lighting setting.

Returns
A reference to this object.

◆ UnsetPatterns()

ContourLineKit& HPS::ContourLineKit::UnsetPatterns ( )

Removes the contour line patterns setting.

Returns
A reference to this object.

◆ UnsetPositions()

ContourLineKit& HPS::ContourLineKit::UnsetPositions ( )

Removes the contour line positions setting.

Returns
A reference to this object.

◆ UnsetVisibility()

ContourLineKit& HPS::ContourLineKit::UnsetVisibility ( )

Removes the contour line visibility setting.

Returns
A reference to this object.

◆ UnsetWeights()

ContourLineKit& HPS::ContourLineKit::UnsetWeights ( )

Removes the contour line weights setting.

Returns
A reference to this object.

Member Data Documentation

◆ staticType

const HPS::Type HPS::ContourLineKit::staticType = HPS::Type::ContourLineKit
static

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