Remove unused methods.
This commit is contained in:
@ -307,15 +307,6 @@ void ColorBlock::boundsRangeAlpha(Color32 * start, Color32 * end) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ColorBlock::bestFitRange(Color32 * start, Color32 * end) const
|
|
||||||
{
|
|
||||||
nvDebugCheck(start != NULL);
|
|
||||||
nvDebugCheck(end != NULL);
|
|
||||||
|
|
||||||
Vector3 axis = bestFitLine().direction();
|
|
||||||
computeRange(axis, start, end);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Sort colors by abosolute value in their 16 bit representation.
|
/// Sort colors by abosolute value in their 16 bit representation.
|
||||||
void ColorBlock::sortColorsByAbsoluteValue()
|
void ColorBlock::sortColorsByAbsoluteValue()
|
||||||
{
|
{
|
||||||
@ -393,19 +384,6 @@ void ColorBlock::sortColors(const Vector3 & axis)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Get least squares line that best approxiamtes the points of the color block.
|
|
||||||
Line3 ColorBlock::bestFitLine() const
|
|
||||||
{
|
|
||||||
Array<Vector3> pointArray(16);
|
|
||||||
|
|
||||||
for(int i = 0; i < 16; i++) {
|
|
||||||
pointArray.append(Vector3(m_color[i].r, m_color[i].g, m_color[i].b));
|
|
||||||
}
|
|
||||||
|
|
||||||
return Fit::bestLine(pointArray);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Get the volume of the color block.
|
/// Get the volume of the color block.
|
||||||
float ColorBlock::volume() const
|
float ColorBlock::volume() const
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
#define NV_IMAGE_COLORBLOCK_H
|
#define NV_IMAGE_COLORBLOCK_H
|
||||||
|
|
||||||
#include <nvmath/Color.h>
|
#include <nvmath/Color.h>
|
||||||
#include <nvmath/Fitting.h> // Line3
|
|
||||||
|
|
||||||
namespace nv
|
namespace nv
|
||||||
{
|
{
|
||||||
@ -33,16 +32,13 @@ namespace nv
|
|||||||
void luminanceRange(Color32 * start, Color32 * end) const;
|
void luminanceRange(Color32 * start, Color32 * end) const;
|
||||||
void boundsRange(Color32 * start, Color32 * end) const;
|
void boundsRange(Color32 * start, Color32 * end) const;
|
||||||
void boundsRangeAlpha(Color32 * start, Color32 * end) const;
|
void boundsRangeAlpha(Color32 * start, Color32 * end) const;
|
||||||
void bestFitRange(Color32 * start, Color32 * end) const;
|
|
||||||
|
|
||||||
void sortColorsByAbsoluteValue();
|
void sortColorsByAbsoluteValue();
|
||||||
|
|
||||||
void computeRange(const Vector3 & axis, Color32 * start, Color32 * end) const;
|
void computeRange(const Vector3 & axis, Color32 * start, Color32 * end) const;
|
||||||
void sortColors(const Vector3 & axis);
|
void sortColors(const Vector3 & axis);
|
||||||
|
|
||||||
Line3 bestFitLine() const;
|
|
||||||
float volume() const;
|
float volume() const;
|
||||||
Line3 diameterLine() const;
|
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const Color32 * colors() const;
|
const Color32 * colors() const;
|
||||||
|
Reference in New Issue
Block a user