Skip to content

Conversation

Korijn
Copy link
Collaborator

@Korijn Korijn commented Dec 23, 2021

Closes #107
Closes #194

The idea is that you can visualize any world object immediately.

New API:

  • Geometry.bounding_box()
  • Geometry.bounding_sphere()
  • gfx.trimesh_geometry(mesh)
  • Matrix4.to_ndarray()
  • gfx.linalg.utils.transform(vectors, matrix)
  • gfx.linalg.utils.aabb_to_sphere(aabb)
  • gfx.linalg.utils.transform_aabb(aabb, matrix)
  • WorldObject.get_world_position()
  • WorldObject.get_world_bounding_box()
  • WorldObject.get_world_bounding_sphere()
  • Camera.show_object(target)
  • gfx.show(object)

New examples:

  • examples\show_util.py
    image
  • examples\show_stl.py
    image
  • examples\show_scene.py
    image

@Korijn Korijn mentioned this pull request Dec 23, 2021
@pygfx pygfx deleted a comment from almarklein Dec 24, 2021
@Korijn Korijn force-pushed the show-util-2-rebase branch from d3b8275 to 5d80b9d Compare December 24, 2021 16:49
@Korijn Korijn force-pushed the show-util-2-rebase branch from 5d80b9d to 3527b78 Compare December 24, 2021 16:52
@Korijn
Copy link
Collaborator Author

Korijn commented Dec 24, 2021

I think this is ready now!

@Korijn
Copy link
Collaborator Author

Korijn commented Dec 26, 2021

There were quite a lot of gotchas here, but it's working nicely now.

I guess it only falls apart when the near/far planes are too small for the scene you're showing. That can be addressed in #231

@Korijn Korijn merged commit f488647 into main Dec 26, 2021
@Korijn Korijn deleted the show-util-2-rebase branch December 26, 2021 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Camera look_at utility Simple viewer shortcut
2 participants