Textured planes for slices, cutting planes and projections #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a more straightforward implementation than #12 (which I will close in favor of this) that adds the ability to add 2d YTDataContainer objects (e.g.,
ds.slice
,ds.cutting
,ds.proj
) to a 3D scene. This implementation generates a frb and uses the data as a 2D texture.Given #13, this is probably most useful for plotting the results of a projection along with a volume rendering:
But there may be some cases where adding independent slices is advantageous. Another example (from
examples/plane_textures_multiple.py
) with projections on the bounding-box faces and a slice and cutting plane on the interior:There still seems to be some face culling or z-ordering issue that I haven't figured out yet: when added to an existing volume rendering, planes are not visible from all perspectives (e.g., when running
examples/amr_volume_rendering_with_planes.py
and rotating, planes with disappear/reappear). Adding aGL.glDisable(GL.GL_CULL_FACE)
fixes the issue (but I haven't committed that change, as there's probably a better way to fix it).