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

How to draw points as polygons #32

Open
crazydef opened this issue Feb 10, 2021 · 2 comments
Open

How to draw points as polygons #32

crazydef opened this issue Feb 10, 2021 · 2 comments

Comments

@crazydef
Copy link

Hi,

I've added my own type as follows:

  <Point Type="glm::vec&lt;*&gt;" Id="glm::vec">
    <Coordinates>
      <X>x</X>
      <Y>y</Y>
    </Coordinates>
  </Point>

which displays std::vector<glm::vec3> as a collection of points in the Geometry Watch, but I can't figure out how to display those points as a polygon. I was hoping that would happen automatically.

How can I do that?

@awulkiew
Copy link
Owner

awulkiew commented Mar 1, 2021

You'd have to have a separate class for that and add it as a Ring (polygon without holes), like that: https://github.com/awulkiew/graphical-debugging/blob/master/examples/cpp.xml#L204-L214

It's because containers of points can represent any point-based geometry, multi-point, linestring or polygon/ring. By default standard containers of points are represented as that, containers of points or multi-points. I guess this default behavior could be something that could be changed in the settings. So I can treat this issue as a feature request.

@crazydef
Copy link
Author

crazydef commented Mar 1, 2021

Yeah, I figured it to a certain degree a few days later. If I remember correctly I managed to get a class containing a vector of points to display as a polygon, but when I passed that vector to another function, the display switched to points. Which was quite frustrating at times. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants