-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRangeFit.cs
46 lines (39 loc) · 1.18 KB
/
RangeFit.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using BCnEncoder.Shared;
namespace BurnoutImage
{
internal class RangeFit : ColourFit
{
public Vec3 Metric;
public Vec3 Start;
public Vec3 End;
public float BestError;
public RangeFit(ColourSet colours, CompressionFormat compression) : base(colours, compression)
{
bool colourMetricPerceptual = false;
// initialize the metric
bool perceptual = colourMetricPerceptual;
if (perceptual)
{
Metric = new Vec3(0.2126f, 0.7152f, 0.0722f);
} else
{
Metric = new Vec3(0);
}
// initialize the best error
BestError = float.MaxValue;
// cache some values
int count = Colours.Count;
Vec3[] values = Colours.Points;
float[] weights = Colours.Weights;
}
protected override void Compress3(byte[] block, int offset)
{
throw new NotImplementedException();
}
protected override void Compress4(byte[] block, int offset)
{
throw new NotImplementedException();
}
}
}