ContourLineKit

class HPS::ContourLineKit : public HPS::Kit

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.

Public Functions

ContourLineKit()

Initializes an empty kit.

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_that – An rvalue reference to a ContourLineKit to take the impl from.

ContourLineKit(ContourLineKit const &in_kit)

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

Parameters

in_kit – The source object to copy.

virtual bool Empty() const

Indicates whether this object has any values set on it.

Returns

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

bool Equals(ContourLineKit const &in_kit) const

Check if the source ContourLineKit is equivalent to this object.

Parameters

in_kit – The source ContourLineKit to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

inline virtual HPS::Type ObjectType() const

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.

bool operator!=(ContourLineKit const &in_kit) const

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

Parameters

in_kit – The source ContourLineKit to compare to this object.

Returns

true if the objects are not equivalent, false otherwise.

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_that – An rvalue reference to a ContourLineKit to take the impl from.

Returns

A reference to this ContourLineKit.

ContourLineKit &operator=(ContourLineKit const &in_kit)

Copies the source ContourLineKit into this object.

Parameters

in_kit – The source ContourLineKit to copy.

Returns

A reference to this object.

bool operator==(ContourLineKit const &in_kit) const

Check if the source ContourLineKit is equivalent to this object.

Parameters

in_kit – The source ContourLineKit to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

void Set(ContourLineKit const &in_kit)

Copies the source ContourLineKit into this object.

Parameters

in_kit – The source object to copy.

ContourLineKit &SetColors(RGBColor const &in_color)

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

Parameters

in_color – The color to be used for drawing all contour lines

Returns

A reference to this object.

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_colors – An array of colors to be used for drawing contour lines.

Returns

A reference to this object.

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_count – The number of elements in in_colors.

  • in_colors – An array of colors to be used for drawing contour lines.

Returns

A reference to this object.

ContourLineKit &SetLighting(bool in_state)

Controls whether contour lines are lit.

Parameters

in_state – Whether contour lines are lit.

Returns

A reference to this object.

ContourLineKit &SetPatterns(char const *in_pattern)

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

Parameters

in_pattern – The line pattern name, defined in an accessible portfolio, to be used for drawing all contour lines.

Returns

A reference to this object.

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_count – The number of elements in in_patterns.

  • in_patterns – An array of line pattern names, defined in an accessible portfolio, to be used for drawing contour lines.

Returns

A reference to this object.

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_patterns – An array of line pattern names, defined in an accessible portfolio, to be used for drawing contour lines.

Returns

A reference to this object.

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_interval – The number of units between contour lines.

  • in_offset – The starting point for contour lines.

Returns

A reference to this object.

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_positions – An array of explicit locations to draw contour lines.

Returns

A reference to this object.

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_count – The number of elements in in_positions.

  • in_positions – An array of explicit locations to draw contour lines.

Returns

A reference to this object.

ContourLineKit &SetVisibility(bool in_state)

Determines whether contour lines should be rendered.

Parameters

in_state – Whether contour lines should be rendered.

Returns

A reference to this object.

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_weight – The line weight to be used for drawing all contour lines.

  • in_units – The units associated with in_weight.

Returns

A reference to this object.

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_weights – An array of line weights to be applied to contour lines.

  • in_units – An array of line weight units used with the corresponding entry in in_weights.

Returns

A reference to this object.

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_count – The number of elements in both in_weights and in_units.

  • in_weights – An array of line weights to be applied to contour lines.

  • in_units – An array of line weight units used with the corresponding entry in in_weights.

Returns

A reference to this object.

void Show(ContourLineKit &out_kit) const

Copies this object into the given ContourLineKit.

Parameters

out_kit – The ContourLineKit to populate with the contents of this object.

bool ShowColors(RGBColorArray &out_colors) const

Shows the colors of contour lines.

Parameters

out_colors – An array of colors of contour lines

Returns

true if the setting is valid, false otherwise.

bool ShowLighting(bool &out_state) const

Shows whether contour lines should be lit.

Parameters

out_state – Whether contour lines should be lit.

Returns

true if the setting is valid, false otherwise.

bool ShowPatterns(UTF8Array &out_patterns) const

Shows the line patterns of contour lines.

Parameters

out_patterns – An array of line pattern names for contour lines.

Returns

true if the setting is valid, false otherwise.

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

Shows the positions of contour lines.

Parameters
  • out_mode – Whether the positions repeat at some interval or are an explicit list.

  • out_positions – If 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.

bool ShowVisibility(bool &out_state) const

Shows the visibility state of contour lines.

Parameters

out_state – Whether contour lines should be rendered.

Returns

true if the setting is valid, false otherwise.

bool ShowWeights(FloatArray &out_weights, LineSizeUnitsArray &out_units) const

Shows the line weights of contour lines.

Parameters
  • out_weights – An array of line weights for contour lines.

  • out_units – An array of line weight units, each is applied to the corresponding entry in out_weights

Returns

true if the setting is valid, false otherwise.

ContourLineKit &UnsetColors()

Removes the contour line colors setting.

Returns

A reference to this object.

ContourLineKit &UnsetEverything()

Removes all settings from this object.

Returns

A reference to this object.

ContourLineKit &UnsetLighting()

Removes the contour line lighting setting.

Returns

A reference to this object.

ContourLineKit &UnsetPatterns()

Removes the contour line patterns setting.

Returns

A reference to this object.

ContourLineKit &UnsetPositions()

Removes the contour line positions setting.

Returns

A reference to this object.

ContourLineKit &UnsetVisibility()

Removes the contour line visibility setting.

Returns

A reference to this object.

ContourLineKit &UnsetWeights()

Removes the contour line weights setting.

Returns

A reference to this object.

virtual ~ContourLineKit()

Destroy this kit.

Public Static Functions

static ContourLineKit GetDefault()

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.

Public Static Attributes

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