Commit f6df6c5e authored by Julien Wintz's avatar Julien Wintz
Browse files

Fix meta array node (Thx to Jeremie Labroquere).

parent f93d4ebb
......@@ -35,7 +35,9 @@
class dtkComposerNodeMetaVector3DArrayPrivate
{
public:
dtkComposerTransmitterEmitterVector< dtkContainerVector<dtkVector3DReal> > emitter_arrays;
dtkComposerTransmitterEmitterVector< dtkContainerVector<dtkVector3DReal> *> emitter_arrays;
dtkContainerVector< dtkContainerVector<dtkVector3DReal> *> arrays;
};
// /////////////////////////////////////////////////////////////////
......@@ -44,6 +46,8 @@ public:
dtkComposerNodeMetaVector3DArray::dtkComposerNodeMetaVector3DArray(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeMetaVector3DArrayPrivate)
{
d->emitter_arrays.setData(&d->arrays);
this->appendEmitter(&d->emitter_arrays);
}
......@@ -69,6 +73,5 @@ QString dtkComposerNodeMetaVector3DArray::outputLabelHint(int port)
void dtkComposerNodeMetaVector3DArray::run(void)
{
dtkContainerVector< dtkContainerVector<dtkVector3DReal> > arrays;
d->emitter_arrays.setData(&arrays);
d->arrays.clear();
}
......@@ -37,12 +37,12 @@
class dtkComposerNodeMetaVector3DArrayAppendPrivate
{
public:
dtkComposerTransmitterReceiverVector<dtkContainerVector<dtkVector3DReal> > receiver_arrays;
dtkComposerTransmitterReceiverVector<dtkContainerVector<dtkVector3DReal> *> receiver_arrays;
dtkComposerTransmitterReceiverVector<dtkVector3DReal> receiver_array;
dtkComposerTransmitterEmitterVector<dtkContainerVector<dtkVector3DReal> > emitter_arrays;
dtkComposerTransmitterEmitterVector<dtkContainerVector<dtkVector3DReal> *> emitter_arrays;
dtkContainerVector<dtkContainerVector<dtkVector3DReal> > *arrays;
dtkContainerVector<dtkContainerVector<dtkVector3DReal> *> *arrays;
};
// /////////////////////////////////////////////////////////////////
......@@ -75,7 +75,7 @@ void dtkComposerNodeMetaVector3DArrayAppend::run(void)
d->arrays = d->receiver_arrays.data();
d->arrays->append((*(d->receiver_array.data())));
d->arrays->append(d->receiver_array.constData());
d->emitter_arrays.setData(d->arrays);
}
......@@ -39,12 +39,12 @@
class dtkComposerNodeMetaVector3DArrayExtractorPrivate
{
public:
dtkComposerTransmitterReceiverVector< dtkContainerVector<dtkVector3DReal> > receiver_arrays;
dtkComposerTransmitterReceiver<dtkxarch_int> receiver_index;
dtkComposerTransmitterReceiverVector< dtkContainerVector<dtkVector3DReal> *> receiver_arrays;
dtkComposerTransmitterReceiver<qlonglong> receiver_index;
dtkComposerTransmitterEmitterVector<dtkVector3DReal> emitter_array;
dtkContainerVector<dtkVector3DReal> array;
dtkContainerVector<dtkVector3DReal> *array;
};
// /////////////////////////////////////////////////////////////////
......@@ -74,9 +74,9 @@ void dtkComposerNodeMetaVector3DArrayExtractor::run(void)
if (d->receiver_index.isEmpty())
return;
long long index = (*(d->receiver_index.data()));
qlonglong index = (*d->receiver_index.constData());
d->array = (*(d->receiver_arrays.data()))[index];
d->emitter_array.setData((&(d->array)));
d->emitter_array.setData(d->array);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment