fix projection plot tests

This commit is contained in:
Gavin Ridley 2021-12-16 18:02:14 -05:00
parent 76cc722090
commit a030aaa59d
5 changed files with 28 additions and 6 deletions

View file

@ -312,8 +312,8 @@ private:
Position camera_position_; // where camera is
Position look_at_; // point camera is centered looking at
Direction up_ {0.0, 0.0, 1.0}; // which way is up
bool wireframe_; // draw wireframe around ID boundaries (material or cell
// based on color_by)
bool wireframe_ {true}; // draw wireframe around ID boundaries (material or
// cell based on color_by)
/* The horizontal thickness, if using an orthographic projection.
* If set to zero, we assume using a perspective projection.

View file

@ -4,7 +4,7 @@
<surface id="1" type="z-cylinder" coeffs="0 0 2" />
<surface id="2" type="z-cylinder" coeffs="0 0 5" />
<surface id="3" type="z-cylinder" coeffs="0 0 10" boundary="vacuum" />
<surface id="4" type="y-plane" coeffs="5" boundary="vacuum" />
<surface id="4" type="y-plane" coeffs="5.001" boundary="vacuum" />
<surface id="5" type="z-plane" coeffs="-5" boundary="vacuum" />
<surface id="6" type="z-plane" coeffs="5" boundary="vacuum" />

View file

@ -13,11 +13,12 @@
<plot id="2" type="projection">
<look_at>0. 0. 0.</look_at>
<camera_position>20. 20. 20.</camera_position>
<camera_position>10. 10. 0.</camera_position>
<width>25 25</width>
<pixels>200 200</pixels>
<mask components="1 3" background="255 255 255" />
<field_of_view>90</field_of_view>
<filename>example1</filename>
</plot>
<plot id="3" color_by="material" type="projection">
@ -25,6 +26,27 @@
<camera_position>20. 20. 20.</camera_position>
<pixels>200 200</pixels>
<background>240 240 240</background>
<filename>example2.png</filename>
</plot>
<plot id="4" color_by="material" type="projection">
<look_at>0. 0. 0.</look_at>
<camera_position>0. 10.0 20.</camera_position>
<pixels>200 200</pixels>
<background>110 240 240</background>
<filename>example3.png</filename>
</plot>
<plot id="5" type="projection">
<look_at>0. 0. 0.</look_at>
<camera_position>10. 10. 10.</camera_position>
<width>25 25</width>
<pixels>200 200</pixels>
<orthographic_width>25.0</orthographic_width>
<filename>orthographic_example1</filename>
<color id="1" rgb="0 0 255" xs="10"/>
<color id="2" rgb="0 255 0" xs="0.1"/>
<color id="3" rgb="255 0 0" xs="1.0"/>
</plot>
</plots>

View file

@ -1 +1 @@
8231bc2d60bee9df464fbf3c5b2ea611dcd0f10232f6a9b04f58fc5226716acb31580578f74d194f8ab2df1848ea1556621bf997e1d1562d5eb8471def2a5f24
5fdff140078cd45efe7a507feeb06c00fa735820157a9a5a066905468b1052640c3b81065f968f6280c05eef7e9e4305a631e0e0aa2e467c9bd9d4f1a097ab09

View file

@ -56,5 +56,5 @@ class PlotTestHarness(TestHarness):
def test_plot():
harness = PlotTestHarness(('projection1.png', 'projection2.png', 'projection3.png'))
harness = PlotTestHarness(('plot_1.png', 'example1.png', 'example3.png', 'orthographic_example1.png'))
harness.main()