Class AnnotationInfo
- Namespace
- ShadowDusk.Core
- Assembly
- ShadowDusk.Core.dll
A single FX annotation (a <key = value;> attached to a parameter or
technique), as the MgfxWriter serializes it. Exactly one of the typed
value fields is populated, selected by Type.
public sealed record AnnotationInfo : IEquatable<AnnotationInfo>
- Inheritance
-
AnnotationInfo
- Implements
- Inherited Members
Constructors
AnnotationInfo(string, byte, string?, float?, int?, bool?)
A single FX annotation (a <key = value;> attached to a parameter or
technique), as the MgfxWriter serializes it. Exactly one of the typed
value fields is populated, selected by Type.
public AnnotationInfo(string Name, byte Type, string? StringValue, float? FloatValue, int? IntValue, bool? BoolValue)
Parameters
NamestringThe annotation key.
TypebyteThe MGFX
EffectParameterTypeordinal that tells the reader which value field to read. Only the three annotation-bearing values occur here:2= Int32 (read IntValue),3= Single/float (read FloatValue),4= String (read StringValue).StringValuestringFloatValuefloat?IntValueint?BoolValuebool?The boolean value, when applicable; otherwise null.
Properties
BoolValue
The boolean value, when applicable; otherwise null.
public bool? BoolValue { get; init; }
Property Value
- bool?
FloatValue
public float? FloatValue { get; init; }
Property Value
IntValue
public int? IntValue { get; init; }
Property Value
- int?
Name
The annotation key.
public string Name { get; init; }
Property Value
StringValue
public string? StringValue { get; init; }
Property Value
Type
The MGFX EffectParameterType ordinal that tells the reader which value field to
read. Only the three annotation-bearing values occur here: 2 = Int32 (read
IntValue), 3 = Single/float (read FloatValue),
4 = String (read StringValue).
public byte Type { get; init; }