Struct DebugColor
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
A colour handed to a debug drawer, as 24-bit RGB plus a material hint.
public readonly record struct DebugColor : IEquatable<DebugColor>Implements
Inherited Members
Remarks
Box3D names its colours through an enum of 145 constants. That enum belongs to the C API and says nothing a renderer can use, so it is not what this layer hands out: what a renderer needs is the channels. The packed value is kept as well, because the high byte carries the Box3D.DebugColor.Material hint and dropping it would lose information the engine went to the trouble of sending.
Constructors
- DebugColor(uint)
-
Wraps a packed value, low 24 bits RGB and high byte the material.
- DebugColor(byte, byte, byte)
-
Builds a colour from channels, with the default material.
Properties
- B
-
Gets the blue channel.
- G
-
Gets the green channel.
- Material
-
Gets the surface appearance Box3D suggests.
- Packed
-
Gets the value exactly as Box3D encoded it.
- R
-
Gets the red channel.
Methods
- ToString()
-
Returns the colour as
#RRGGBB. - ToUnitRgb()
-
Gets the RGB channels as floats in 0..1, for a renderer that wants them that way.