Commit bbd6e7d0 authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri 💬 Committed by Kitware Robot
Browse files

Merge topic 'composite_mapper2_fix' into release

2a151d4c New baselines for composite polydatamapper2
a0d45c08 Fix composite mapper tests after fixing block iteration
403285a8

 Fix composite mapper bug with block iteration

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Sebastien Jourdain's avatarSebastien Jourdain <sebastien.jourdain@kitware.com>
Acked-by: default avatarKen Martin <ken.martin@kitware.com>
Merge-request: !7130
parents d6bdb08a 2a151d4c
......@@ -165,9 +165,9 @@ int TestCompositePolyDataMapper2MixedGeometryCellScalars(int argc, char* argv[])
// modify the data to force a rebuild of OpenGL structs
// after rendering set one cylinder to white
mapper->SetBlockColor(40, 1.0, 1.0, 1.0);
mapper->SetBlockOpacity(40, 1.0);
mapper->SetBlockVisibility(40, 1.0);
mapper->SetBlockColor(54, 1.0, 1.0, 1.0);
mapper->SetBlockOpacity(54, 1.0);
mapper->SetBlockVisibility(54, 1.0);
timer->StartTimer();
win->Render();
......@@ -180,9 +180,9 @@ int TestCompositePolyDataMapper2MixedGeometryCellScalars(int argc, char* argv[])
for (int i = 0; i <= numFrames; i++)
{
ren->GetActiveCamera()->Elevation(15.0 / numFrames);
ren->GetActiveCamera()->Azimuth(-130.0 / numFrames);
ren->GetActiveCamera()->Zoom(pow(1.6, 1.0 / numFrames));
ren->GetActiveCamera()->Roll(0.0 / numFrames);
ren->GetActiveCamera()->Azimuth(-190.0 / numFrames);
ren->GetActiveCamera()->Zoom(pow(1.5, 1.0 / numFrames));
ren->GetActiveCamera()->Roll(5.0 / numFrames);
win->Render();
}
......
......@@ -165,9 +165,9 @@ int TestCompositePolyDataMapper2MixedGeometryEdges(int argc, char* argv[])
// modify the data to force a rebuild of OpenGL structs
// after rendering set one cylinder to white
mapper->SetBlockColor(40, 1.0, 1.0, 1.0);
mapper->SetBlockOpacity(40, 1.0);
mapper->SetBlockVisibility(40, 1.0);
mapper->SetBlockColor(54, 1.0, 1.0, 1.0);
mapper->SetBlockOpacity(54, 1.0);
mapper->SetBlockVisibility(54, 1.0);
timer->StartTimer();
win->Render();
......@@ -180,9 +180,9 @@ int TestCompositePolyDataMapper2MixedGeometryEdges(int argc, char* argv[])
for (int i = 0; i <= numFrames; i++)
{
ren->GetActiveCamera()->Elevation(15.0 / numFrames);
ren->GetActiveCamera()->Azimuth(-130.0 / numFrames);
ren->GetActiveCamera()->Zoom(pow(1.6, 1.0 / numFrames));
ren->GetActiveCamera()->Roll(0.0 / numFrames);
ren->GetActiveCamera()->Azimuth(-190.0 / numFrames);
ren->GetActiveCamera()->Zoom(pow(1.5, 1.0 / numFrames));
ren->GetActiveCamera()->Roll(5.0 / numFrames);
win->Render();
}
......
c8847c00475ef73475967ded5eed0d0889253d329e47d60439089700b21a666ad1a2312d0bd55b42ff6ecc524ec2a94f07bd6513b823ec60f1c2efec00cdcb4a
26a26f9b482ece1b1f847d235dce6591a0f74ecfcf808f23bf672b094cbc7e61efb7ce1fa29aae7adab41c2884f70fe1de0769cdf41b640ebeea80de26a3d565
3c0f5b89defe28e0a194cf67ee42d82e664f93888373e6c0f6329e01765216c547ec03c6137d7b3c75630e0b2981e90b03bafba5216c33f672bfc89175c4300b
177a7a65d5c9ed9a5258b0e01aefe935bc2f8bbe6b2c614c127ca84ecb6929b7029845a099a41b9047c1efaaf2c09e9d892bcfc108fe827bc19e74dc518cf52f
ebc6e64968ac8b90f20ac27fd460d95fca692411ffac6c65b0f9ba89958060c75a221d01266a4d2f784e32d555b9e1fbbdfea1c560fefa0ebcc2e7fbc241b962
59479a0a8eddf76f4ae21118194029dfa8c44dbef81755558fb7f3f73eaa70f062cabcea1d9f0f14cdd6dec958ceb025005ad0baecd28627c6dbb58b4e3929b0
c953c2d33cbe54b660b8466d7b21ac62aba358c14090b8d24471308835bab37b391dc6dcb1738839c5669fb1d64e2acd249e148e2757050b0cb1da29871d97fd
5e2ccb83f59d707af4e684ba36706f80f389508b92b3bec04bd5792eaa56968b697951b9eb75d1b6ccf66b21226d3cf200e80dcdf5c9272489e9b14a130dca32
bde7376a2a94383bfc0a48f4a0679b5e026863a5bcad96f542994eb6c8aa11d56826fb8bd423a30b8c6f7dfb32b3b2b320a32aa51698e81b1a6879fe42aea397
fb4ca4b6fa5cc5a19742c11ed21cf2b94e22624d456e2379a7dd4c8ef7230510e30c287d215b88adcc4a1a309846c1ad5ff5b602db0197b44549860fb64f8794
8f8a19e439734e12fd89b0965dc03be71b1f32838660fbd48d98d67d2152d4aa788d5e0a69374d057f87a59e9db12479aede7bd2ae6ea93720c6d24fb5dc75ab
e045b00ec033132a80fa3200e24eb84dfc63e9a63d2698b5ae916cbe0e19915a581e47a848e8d2718c3c98aa12979c63c246aa356e7bff6e75c3a58044079474
......@@ -375,10 +375,6 @@ vtkDataObject* vtkCompositeDataDisplayAttributes::DataObjectFromIndex(
return data;
}
}
else
{
++current_flat_index;
}
}
}
......
......@@ -101,17 +101,17 @@ int TestCompositePolyDataMapper2Spheres(int argc, char* argv[])
blocks[parent]->SetBlock(block, (block % 2) ? nullptr : child.GetPointer());
blocks[parent]->GetMetaData(block)->Set(vtkCompositeDataSet::NAME(), blockName.c_str());
// test not setting it on some
if (block % 11)
if (block % 7)
{
double r, g, b;
vtkMath::HSVToRGB(0.8 * block / nblocks, 0.2 + 0.8 * ((parent - levelStart) % 8) / 7.0,
vtkMath::HSVToRGB(0.8 * block / nblocks, 0.2 + 0.8 * ((parent - levelStart) % 4) / 3.0,
1.0, &r, &g, &b);
mapper->SetBlockColor(parent + numLeaves + 1, r, g, b);
mapper->SetBlockVisibility(parent + numLeaves, (block % 7) != 0);
mapper->SetBlockVisibility(parent + numLeaves, (block % 3) != 0);
vtkMath::HSVToRGB(0.2 + 0.8 * block / nblocks,
0.7 + 0.3 * ((parent - levelStart) % 8) / 7.0, 1.0, &r, &g, &b);
0.7 + 0.3 * ((parent - levelStart) % 4) / 3.0, 1.0, &r, &g, &b);
mapper2->SetBlockColor(parent + numLeaves + 1, r, g, b);
mapper2->SetBlockVisibility(parent + numLeaves, (block % 7) != 0);
mapper2->SetBlockVisibility(parent + numLeaves, (block % 3) != 0);
}
++numLeaves;
}
......
653fd577fdbbf71e3c08587617a88d95601e57ff5e4654300d0448b59c6cb226e43e4bb5c12380f3805c1c237f3b77b03746d4e6186fbed64f8f4f9c75d86fb1
5f0ba78fe7d54bc7747e3305639343b12e2d2c789f9ea5c6e90a1cc1fc05568acbd384699e5391f533328f33aba38d4256c0667fc029704b60c5c60b2ba633bd
898a87a22a8d1c009484a6127cdff8f4055542e60ce5836c737bd549d4f97af1a9fa110ae54a20148f054f3fdd37c982fa1111291e0fb598fab9d55f4e64c1c8
5372aeed03ac6342df4002c4eafe2e4cd4c73d01cde2e70cdbb36a90241970c779785831a398918293225e3ae4d8c3780f848875cfb6cde101f4b9bb6360c037
9747ee126aa106d60ebfd747828390ba4a7ff0a271cf54d920a1606bc3eb40ef1380c219e5987d8dc4c3fdb77ed86dc80a68442dfc7410aacdee7d966f23a348
dc15c4fbead617b6ac1336568db4a1822f1cad30a94d073e30fb370d0407fc59d2e08c21646f63aaae5c7c185ce827cfeff8e5567eb655e8011156c473cc9b92
1170a364b05794549c302d78279dbf7681dd4041820ff15a07ef67341e7e5a03767964b867fde2ad76627a565374405b9a7ce118b8497429d8d04aaaf8bdd296
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