struct new in Git master
#include <Magnum/Ui/LineLayer.h>
LineLayerStyleUniform LineLayer style uniform
See the LineLayer class documentation for information about setting up an instance of the line layer and using it.
Instances of this class together with LineLayerCommonStyleUniform contain style properties that are used by the LineLayer shaders to draw the layer data, packed in a form that allows direct usage in uniform buffers. Total count of styles is specified with the LineLayer::
Constructors, destructors, conversion operators
- LineLayerStyleUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
- Construct with default values.
- LineLayerStyleUniform(const Color4& color, Float width, Float smoothness, Float miterLimit) constexpr noexcept
- Constructor.
- LineLayerStyleUniform(NoInitT) explicit noexcept
- Construct without initializing the contents.
Public variables
- Color4 color
- Line color.
- Float width
- Line width.
- Float smoothness
- Edge smoothness radius.
- Float miterLimit
- Miter limit.
Convenience setters
Provided to allow the use of method chaining for populating a structure in a single expression, otherwise equivalent to accessing the fields directly. Also guaranteed to provide backwards compatibility when packing of the actual fields changes.
- auto setColor(const Color4& color) -> LineLayerStyleUniform& constexpr
- Set the color field.
- auto setWidth(Float width) -> LineLayerStyleUniform& constexpr
- Set the width field.
- auto setSmoothness(Float smoothness) -> LineLayerStyleUniform& constexpr
- Set the smoothness field.
- auto setMiterLimit(Float limit) -> LineLayerStyleUniform& constexpr
- Set the miterLimit field.
- auto setMiterLengthLimit(Float limit) -> LineLayerStyleUniform&
- Set the miterLimit field to a length value.
- auto setMiterAngleLimit(Rad limit) -> LineLayerStyleUniform&
- Set the miterLimit field to an angle value.
Function documentation
LineLayerStyleUniform& Magnum:: Ui:: LineLayerStyleUniform:: setColor(const Color4& color) constexpr
Set the color field.
Returns | Reference to self (for method chaining) |
---|
LineLayerStyleUniform& Magnum:: Ui:: LineLayerStyleUniform:: setWidth(Float width) constexpr
Set the width field.
Returns | Reference to self (for method chaining) |
---|
LineLayerStyleUniform& Magnum:: Ui:: LineLayerStyleUniform:: setSmoothness(Float smoothness) constexpr
Set the smoothness field.
Returns | Reference to self (for method chaining) |
---|
LineLayerStyleUniform& Magnum:: Ui:: LineLayerStyleUniform:: setMiterLimit(Float limit) constexpr
Set the miterLimit field.
Returns | Reference to self (for method chaining) |
---|
For convenience it's recommended to use the setMiterLengthLimit() and setMiterAngleLimit() helpers instead of setting this value directly.
LineLayerStyleUniform& Magnum:: Ui:: LineLayerStyleUniform:: setMiterLengthLimit(Float limit)
Set the miterLimit field to a length value.
Returns | Reference to self (for method chaining) |
---|
Expects that limit
is greater than or equal to 1.0f
and finite.
LineLayerStyleUniform& Magnum:: Ui:: LineLayerStyleUniform:: setMiterAngleLimit(Rad limit)
Set the miterLimit field to an angle value.
Returns | Reference to self (for method chaining) |
---|
Expects that limit
is greater than 0.0_radf
.
Variable documentation
Color4 Magnum:: Ui:: LineLayerStyleUniform:: color
Line color.
Default value is 0xffffffff_srgbaf
. The color is further multiplied with per-data value supplied with LineLayer::
Float Magnum:: Ui:: LineLayerStyleUniform:: smoothness
Edge smoothness radius.
Compared to LineLayerCommonStyleUniform::0.0f
. Of the two, the larger value in pixels gets used.
Float Magnum:: Ui:: LineLayerStyleUniform:: miterLimit
Miter limit.
Limit at which a LineJoinStyle::
Represented as a cosine of the angle between two neighboring line segments, with LineJoinStyle::
For convenience it's recommended to use the setMiterLengthLimit() and setMiterAngleLimit() helpers instead of setting this value directly. Default value is 0.875f
, which corresponds to a length of 4.0f
and angle of approximately 28.955_degf
.