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

Global geometric types and algorithms #58

Open
18 tasks
JonasGilg opened this issue Sep 20, 2019 · 3 comments
Open
18 tasks

Global geometric types and algorithms #58

JonasGilg opened this issue Sep 20, 2019 · 3 comments
Labels
discussion needed Further information is requested new feature A feature request or a general improvement idea

Comments

@JonasGilg
Copy link
Member

JonasGilg commented Sep 20, 2019

The Problem

Simple 2D/3D geometric types and algorithms related to them (intersections, areas, volumes, distances) are implemented multiple times throughout the application and scattered over plugins.

The Solution

Create a small glm based utility package that implements common geometric types and related functions.

The Alternatives

Instead of developing it beforehand, the types and algorithms can be created on demand in the core engine.
So each time a new geometric type gets created for some functionality in a plugin it should be put in the core engines utility namespace, where it can be reused by other plugins.

Common Types

2D

  • Circle
  • Rectangle
  • Square
  • Triangle
  • Line
  • Ray
  • Curve
  • Spline

3D

  • Sphere
  • AABB
  • Box
  • Cube
  • Polygon
  • Line
  • Ray
  • Curve
  • Spline
  • Plane
@JonasGilg JonasGilg added the new feature A feature request or a general improvement idea label Sep 20, 2019
@Schneegans
Copy link
Member

While it seems to be reasonable to unify the usage of geometry types, we should consider using ViSTA geometries (https://github.com/cosmoscout/vista/blob/develop/VistaCoreLibs/VistaMath/VistaGeometries.h).

What do you think?

@Schneegans Schneegans added the discussion needed Further information is requested label Sep 20, 2019
@JonasGilg
Copy link
Member Author

JonasGilg commented Sep 20, 2019

Aren't we trying to reduce dependencies on ViSTA as much as possible?
It is also incompatible with glm, and would introduce the whole VistaMath library in addition throughout the project.
We can maybe wrap the ViSTA types?

@JonasGilg
Copy link
Member Author

Or we could write it as a library and include it via externals. A little research concluded, that there is no geometry library based on glm available.
This might also profit other projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed Further information is requested new feature A feature request or a general improvement idea
Projects
None yet
Development

No branches or pull requests

2 participants