Skip to content

Inconsistent position vector type between me.Renderable and base shape objects #817

@obiot

Description

@obiot

Object pos type :

  • me.Ellipse : me.Vector2d
  • me.Polygon : me.Vector2d
  • me.Line : me.Vector2d
  • me.Rect : me.Vector2d
  • me.Renderable : me.ObscervableVector3d

Inheritance Chain :

  • me.Ellipse
  • me.Line <- me.Polygon
  • me.Renderable <- me.Rect <- me.Polygon

When attempting to clean the me.Renderable implementation, and removing the unnecessary bounds objets, this caused a lots of problems, because of the type mismatch.

Also, it might not be fully used (e.g. in the collision detection), and there will be still a mismatch as Renderables use a me.ObscervableVector3d object type, but all shapes should at least uses a me.Vector3d type for the position object.

Anyway clean way maybe to mutate a me.Vector3d object to a me.ObscervableVector3d one (using Object.assign?)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions