Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on_groundinto a Python utility #527

Open
dokempf opened this issue Feb 5, 2025 · 0 comments
Open

Turn on_groundinto a Python utility #527

dokempf opened this issue Feb 5, 2025 · 0 comments
Labels
python-api Related to the new Helios++ Python API sustainable h++ Part of the sustainable HELIOS++ project

Comments

@dokempf
Copy link
Collaborator

dokempf commented Feb 5, 2025

So far, this has been a platform setting. But the Python programming language makes this much better as a utility. I propose the following interface:

class PlatformSettings:
	def force_on_ground(self, scene: Scene):
		# Calculate how to get from current (x, y) to a scenepart
		# labelled as ground by following the direction vector.
		self.z = ...

An alternative API that requires redundant use of xand ywould e.g. be:

from helios.util import force_on_ground

settings = helios.PlatformSettings(
  x=x,
  y=y,
  z=force_on_ground(scene, x, y)
)
@dokempf dokempf added python-api Related to the new Helios++ Python API sustainable h++ Part of the sustainable HELIOS++ project labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python-api Related to the new Helios++ Python API sustainable h++ Part of the sustainable HELIOS++ project
Projects
None yet
Development

No branches or pull requests

1 participant