-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Investigating fixed function pipelines, how RASC/RASA are set.
- Loading branch information
1 parent
4d51df2
commit 34220d2
Showing
11 changed files
with
1,272 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
FinModelUtility/Fin/src/language/equations/fixedFunctionOld/ColorInterfaces.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace fin.language.equations.fixedFunctionOld { | ||
public interface IColorNamedValue<TIdentifier> : INamedValue<TIdentifier>, | ||
IColorFactor { | ||
IColorValue ColorValue { get; } | ||
} | ||
|
||
public interface IColorInput<TIdentifier> : IColorNamedValue<TIdentifier> { | ||
IColorConstant DefaultValue { get; } | ||
IColorConstant? CustomValue { get; set; } | ||
} | ||
|
||
public interface IColorOutput<TIdentifier> : IColorNamedValue<TIdentifier> {} | ||
|
||
public enum ColorSwizzle { | ||
R, | ||
G, | ||
B, | ||
A, | ||
} | ||
|
||
public interface IColorNamedValueSwizzle<TIdentifier> : IScalarFactor { | ||
IColorNamedValue<TIdentifier> Source { get; } | ||
ColorSwizzle SwizzleType { get; } | ||
} | ||
|
||
|
||
public interface IColorValue { | ||
IColorExpression Add(IColorValue term1, params IColorValue[] terms); | ||
IColorExpression Subtract(IColorValue term1, params IColorValue[] terms); | ||
IColorTerm Multiply(IColorValue factor1, params IColorValue[] factors); | ||
IColorTerm Divide(IColorValue factor1, params IColorValue[] factors); | ||
|
||
IColorExpression Add(IScalarValue term1, params IScalarValue[] terms); | ||
IColorExpression Subtract(IScalarValue term1, params IScalarValue[] terms); | ||
IColorTerm Multiply(IScalarValue factor1, params IScalarValue[] factors); | ||
IColorTerm Divide(IScalarValue factor1, params IScalarValue[] factors); | ||
|
||
IScalarValue? Intensity { get; } | ||
IScalarValue R { get; } | ||
IScalarValue G { get; } | ||
IScalarValue B { get; } | ||
IScalarValue A { get; } | ||
IScalarValue? AOrNull { get; } | ||
} | ||
|
||
public interface IColorExpression : IColorValue { | ||
IReadOnlyList<IColorValue> Terms { get; } | ||
} | ||
|
||
public interface IColorTerm : IColorValue { | ||
IReadOnlyList<IColorValue> NumeratorFactors { get; } | ||
IReadOnlyList<IColorValue>? DenominatorFactors { get; } | ||
} | ||
|
||
public interface IColorFactor : IColorValue {} | ||
|
||
public interface IColorConstant : IColorFactor { | ||
double? IntensityValue { get; } | ||
double RValue { get; } | ||
double GValue { get; } | ||
double BValue { get; } | ||
double? AValue { get; } | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...elUtility/Fin/src/language/equations/fixedFunctionOld/FixedFunctionEquationsInterfaces.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace fin.language.equations.fixedFunctionOld { | ||
public interface IFixedFunctionEquations<TIdentifier> { | ||
IScalarConstant CreateScalarConstant(double v); | ||
|
||
IColorConstant CreateColorConstant( | ||
double r, | ||
double g, | ||
double b, | ||
double? a = null); | ||
|
||
IColorConstant CreateColorConstant( | ||
double intensity, | ||
double? a = null); | ||
|
||
IColorFactor CreateColor(IScalarValue r, | ||
IScalarValue g, | ||
IScalarValue b, | ||
IScalarValue? a = null); | ||
|
||
IColorFactor CreateColor(IScalarValue intensity, | ||
IScalarValue? a = null); | ||
|
||
|
||
IReadOnlyDictionary<TIdentifier, IScalarInput<TIdentifier>> | ||
ScalarInputs { get; } | ||
|
||
IScalarInput<TIdentifier> CreateScalarInput( | ||
TIdentifier identifier, | ||
IScalarConstant defaultValue); | ||
|
||
|
||
IReadOnlyDictionary<TIdentifier, IScalarOutput<TIdentifier>> | ||
ScalarOutputs { get; } | ||
|
||
IScalarOutput<TIdentifier> CreateScalarOutput( | ||
TIdentifier identifier, | ||
IScalarValue value); | ||
|
||
|
||
IReadOnlyDictionary<TIdentifier, IColorInput<TIdentifier>> | ||
ColorInputs { get; } | ||
|
||
IColorInput<TIdentifier> CreateColorInput( | ||
TIdentifier identifier, | ||
IColorConstant value); | ||
|
||
IReadOnlyDictionary<TIdentifier, IColorOutput<TIdentifier>> | ||
ColorOutputs { get; } | ||
|
||
IColorOutput<TIdentifier> CreateColorOutput( | ||
TIdentifier identifier, | ||
IColorValue value); | ||
} | ||
|
||
public interface INamedValue<TIdentifier> { | ||
TIdentifier Identifier { get; } | ||
} | ||
} |
Oops, something went wrong.