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 @@ ...@@ -35,7 +35,9 @@
class dtkComposerNodeMetaVector3DArrayPrivate class dtkComposerNodeMetaVector3DArrayPrivate
{ {
public: public:
dtkComposerTransmitterEmitterVector< dtkContainerVector<dtkVector3DReal> > emitter_arrays; dtkComposerTransmitterEmitterVector< dtkContainerVector<dtkVector3DReal> *> emitter_arrays;
dtkContainerVector< dtkContainerVector<dtkVector3DReal> *> arrays;
}; };
// ///////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////
...@@ -44,6 +46,8 @@ public: ...@@ -44,6 +46,8 @@ public:
dtkComposerNodeMetaVector3DArray::dtkComposerNodeMetaVector3DArray(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeMetaVector3DArrayPrivate) dtkComposerNodeMetaVector3DArray::dtkComposerNodeMetaVector3DArray(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeMetaVector3DArrayPrivate)
{ {
d->emitter_arrays.setData(&d->arrays);
this->appendEmitter(&d->emitter_arrays); this->appendEmitter(&d->emitter_arrays);
} }
...@@ -69,6 +73,5 @@ QString dtkComposerNodeMetaVector3DArray::outputLabelHint(int port) ...@@ -69,6 +73,5 @@ QString dtkComposerNodeMetaVector3DArray::outputLabelHint(int port)
void dtkComposerNodeMetaVector3DArray::run(void) void dtkComposerNodeMetaVector3DArray::run(void)
{ {
dtkContainerVector< dtkContainerVector<dtkVector3DReal> > arrays; d->arrays.clear();
d->emitter_arrays.setData(&arrays);
} }
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
class dtkComposerNodeMetaVector3DArrayAppendPrivate class dtkComposerNodeMetaVector3DArrayAppendPrivate
{ {
public: public:
dtkComposerTransmitterReceiverVector<dtkContainerVector<dtkVector3DReal> > receiver_arrays; dtkComposerTransmitterReceiverVector<dtkContainerVector<dtkVector3DReal> *> receiver_arrays;
dtkComposerTransmitterReceiverVector<dtkVector3DReal> receiver_array; 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) ...@@ -75,7 +75,7 @@ void dtkComposerNodeMetaVector3DArrayAppend::run(void)
d->arrays = d->receiver_arrays.data(); 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); d->emitter_arrays.setData(d->arrays);
} }
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
class dtkComposerNodeMetaVector3DArrayExtractorPrivate class dtkComposerNodeMetaVector3DArrayExtractorPrivate
{ {
public: public:
dtkComposerTransmitterReceiverVector< dtkContainerVector<dtkVector3DReal> > receiver_arrays; dtkComposerTransmitterReceiverVector< dtkContainerVector<dtkVector3DReal> *> receiver_arrays;
dtkComposerTransmitterReceiver<dtkxarch_int> receiver_index; dtkComposerTransmitterReceiver<qlonglong> receiver_index;
dtkComposerTransmitterEmitterVector<dtkVector3DReal> emitter_array; dtkComposerTransmitterEmitterVector<dtkVector3DReal> emitter_array;
dtkContainerVector<dtkVector3DReal> array; dtkContainerVector<dtkVector3DReal> *array;
}; };
// ///////////////////////////////////////////////////////////////// // /////////////////////////////////////////////////////////////////
...@@ -74,9 +74,9 @@ void dtkComposerNodeMetaVector3DArrayExtractor::run(void) ...@@ -74,9 +74,9 @@ void dtkComposerNodeMetaVector3DArrayExtractor::run(void)
if (d->receiver_index.isEmpty()) if (d->receiver_index.isEmpty())
return; return;
long long index = (*(d->receiver_index.data())); qlonglong index = (*d->receiver_index.constData());
d->array = (*(d->receiver_arrays.data()))[index]; 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