public RangeFit(ColourSet colours, DXTCompression 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; // get the covariance matrix /*Sym3x3 covariance = ComputeWeightedCovariance(count, values, weights); * * // compute the principle components * Vec3 principle = ComputePrincipleComponent(covariance); * * // get the min and max range as the codebook endpoints * Vec3 start = new Vec3(0.0f); * Vec3 end = new Vec3(0.0f); * if (count > 0) * { * float min, max; * * // compute the range * start = end = values[0]; * * }*/ }
public ClusterFit(ColourSet colours, DXTCompression compression) : base(colours, compression) { Order = new byte[16 * MaxIterations]; PointWeights = new Vec4[16]; }
public ColourFit(ColourSet colours, DXTCompression compression) { Colours = colours; Compression = compression; }