pyvista.DataSetMapper.resolve#
- property DataSetMapper.resolve: str[ソース]#
グローバルフラグを設定または返すことで、Zバッファー分解を回避します。
一致するトポロジー(例えば、ポリゴンの上にある線)が、Zバッファの解像度(したがってレンダリングの問題)を避けるためにシフトされるかどうかを制御するグローバルフラグ。
オフでない場合は、2つの方法から選ぶことができる。polygon_offset`はグラフィックシステムのコールを使ってポリゴン、線、点を互いにずらす。shift_zbuffer`はレガシーメソッドで、頂点、線、ポリゴンを区別するためにzバッファを再マッピングするために使用されますが、常に許容できる結果を生成するわけではありません。この時点ではpolygon_offsetメソッド(またはnone)だけを使うべきです。
- 戻り値:
str
z-buffer resolutionを避けるためのグローバルフラグ。 off 、 polygon_offset `、 `shift_zbuffer のいずれかでなければなりません。
例
>>> import pyvista as pv >>> from pyvista import examples
>>> mesh = examples.download_tri_quadratic_hexahedron() >>> surface_sep = mesh.separate_cells().extract_surface( ... nonlinear_subdivision=4 ... ) >>> edges = surface_sep.extract_feature_edges() >>> surface = mesh.extract_surface(nonlinear_subdivision=4)
>>> plotter = pv.Plotter() >>> _ = plotter.add_mesh(surface, smooth_shading=True, split_sharp_edges=True) >>> actor = plotter.add_mesh(edges, color='k', line_width=3) >>> actor.mapper.resolve = 'polygon_offset' >>> plotter.show()