struct new in Git master
#include <Magnum/Shaders/MeshVisualizer.h>
MeshVisualizerMaterialUniform Material uniform for mesh visualizer shaders.
Describes material properties referenced from MeshVisualizerDrawUniform2D::
Constructors, destructors, conversion operators
- MeshVisualizerMaterialUniform(DefaultInitT = DefaultInit) explicit constexpr noexcept
- Construct with default parameters.
- MeshVisualizerMaterialUniform(NoInitT) explicit noexcept
- Construct without initializing the contents.
Public variables
- Color4 color
- Base object color.
- Color4 wireframeColor
- Wireframe color.
- Float wireframeWidth
- Wireframe width.
- Float colorMapOffset
- Color map offset.
- Float colorMapScale
- Color map offset.
- Float lineWidth
- Line width.
- Float lineLength
- Line length.
- Float smoothness
- Line smoothness.
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) -> MeshVisualizerMaterialUniform&
- Set the color field.
- auto setWireframeColor(const Color4& color) -> MeshVisualizerMaterialUniform&
- Set the wireframeColor field.
- auto setWireframeWidth(Float width) -> MeshVisualizerMaterialUniform&
- Set the wireframeWidth field.
- auto setColorMapTransformation(Float offset, Float scale) -> MeshVisualizerMaterialUniform&
- Set the colorMapOffset and colorMapScale fields.
- auto setLineWidth(Float width) -> MeshVisualizerMaterialUniform&
- Set the lineWidth field.
- auto setLineLength(Float length) -> MeshVisualizerMaterialUniform&
- Set the lineLength field.
- auto setSmoothness(Float smoothness) -> MeshVisualizerMaterialUniform&
- Set the smoothness field.
Function documentation
MeshVisualizerMaterialUniform& Magnum:: Shaders:: MeshVisualizerMaterialUniform:: setColor(const Color4& color)
Set the color field.
Returns | Reference to self (for method chaining) |
---|
MeshVisualizerMaterialUniform& Magnum:: Shaders:: MeshVisualizerMaterialUniform:: setWireframeColor(const Color4& color)
Set the wireframeColor field.
Returns | Reference to self (for method chaining) |
---|
MeshVisualizerMaterialUniform& Magnum:: Shaders:: MeshVisualizerMaterialUniform:: setWireframeWidth(Float width)
Set the wireframeWidth field.
Returns | Reference to self (for method chaining) |
---|
MeshVisualizerMaterialUniform& Magnum:: Shaders:: MeshVisualizerMaterialUniform:: setColorMapTransformation(Float offset,
Float scale)
Set the colorMapOffset and colorMapScale fields.
Returns | Reference to self (for method chaining) |
---|
MeshVisualizerMaterialUniform& Magnum:: Shaders:: MeshVisualizerMaterialUniform:: setLineWidth(Float width)
Set the lineWidth field.
Returns | Reference to self (for method chaining) |
---|
MeshVisualizerMaterialUniform& Magnum:: Shaders:: MeshVisualizerMaterialUniform:: setLineLength(Float length)
Set the lineLength field.
Returns | Reference to self (for method chaining) |
---|
MeshVisualizerMaterialUniform& Magnum:: Shaders:: MeshVisualizerMaterialUniform:: setSmoothness(Float smoothness)
Set the smoothness field.
Returns | Reference to self (for method chaining) |
---|
Variable documentation
Color4 Magnum:: Shaders:: MeshVisualizerMaterialUniform:: color
Base object color.
Default value is 0xffffffff_rgbaf
.
Used only if MeshVisualizerGL*D::
Color4 Magnum:: Shaders:: MeshVisualizerMaterialUniform:: wireframeColor
Wireframe color.
Default value is 0x000000ff_rgbaf
.
Used only if MeshVisualizerGL*D::
Float Magnum:: Shaders:: MeshVisualizerMaterialUniform:: wireframeWidth
Wireframe width.
The value is in screen space (depending on MeshVisualizerGL*D::1.0f
.
Used only if MeshVisualizerGL*D::
Float Magnum:: Shaders:: MeshVisualizerMaterialUniform:: colorMapOffset
Color map offset.
Together with colorMapScale forms an offset and scale applied to the input value coming either from the MeshVisualizerGL*D::gl_PrimitiveID
, resulting value is then used to fetch a color from a color map bound with MeshVisualizerGL*D::1.0f/512.0f
and 1.0/256.0f
, meaning that for a 256-entry colormap the first 256 values get an exact color from it and the next values will be either clamped to last color or repeated depending on the color map texture wrapping mode.
Used only if MeshVisualizerGL*D::
Float Magnum:: Shaders:: MeshVisualizerMaterialUniform:: colorMapScale
Color map offset.
See colorMapOffset for more information.
Used only by MeshVisualizerGL3D and only if MeshVisualizerGL*D::
Float Magnum:: Shaders:: MeshVisualizerMaterialUniform:: lineWidth
Line width.
The value is in screen space (depending on MeshVisualizerGL*D::1.0f
.
Used only by MeshVisualizerGL3D and only if MeshVisualizerGL3D::
Float Magnum:: Shaders:: MeshVisualizerMaterialUniform:: lineLength
Line length.
The value is in object space, default value is 1.0f
.
Used only by MeshVisualizerGL3D and only if MeshVisualizerGL3D::
Float Magnum:: Shaders:: MeshVisualizerMaterialUniform:: smoothness
Line smoothness.
The value is in screen space (depending on MeshVisualizerGL*D::2.0f
.
Used only if MeshVisualizerGL*D::