mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-01 21:16:01 +00:00
first buildable implementation of a render item object optimal matching algorithm.
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/personal/carm/represet@1207 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
#include "PresetMerge.hpp"
|
||||
#include "RenderItemMatcher.hpp"
|
||||
|
||||
|
||||
|
||||
void PipelineMerger::MergePipelines(const Pipeline & a, const Pipeline & b, Pipeline & out, float ratio)
|
||||
void PipelineMerger::MergePipelines(const Pipeline & a, const Pipeline & b, Pipeline & out, RenderItemMatcher & matcher, float ratio)
|
||||
{
|
||||
|
||||
double invratio = 1.0 - ratio;
|
||||
@ -12,6 +12,11 @@ void PipelineMerger::MergePipelines(const Pipeline & a, const Pipeline & b, Pipe
|
||||
out.screenDecay =lerp( b.screenDecay, a.screenDecay, ratio);
|
||||
out.drawables.clear();
|
||||
|
||||
double error = matcher(a.drawables, b.drawables);
|
||||
for (int i = 0; i < a.drawables.size();i++)
|
||||
for (int j = 0; j < b.drawables.size();j++)
|
||||
std::cerr << "[" << i << "][" << j << "]" << matcher.weight(i,j);
|
||||
|
||||
for (std::vector<RenderItem*>::const_iterator pos = a.drawables.begin();
|
||||
pos != a.drawables.end(); ++pos)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user