Skip to content

Feature Request: support for drawing glow::POINTS and glow::LINES #310

Answered by asny
donkeyteethUX asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, wanting fixed width lines makes a lot of sense. However, to me at least, that sounds like you want 2D lines, not 3D lines. My reasoning is that if you draw a line with fixed width, then you loose the third dimension, ie. you have no idea if a line is close or far away. So if I understand you correctly (please correct me if I'm wrong), you can use the Line struct for drawing 2D lines (se the shapes2D example). To find the end points of the line on the screen, you can use the uv_coordinates_at_position method on the Camera to get the uv coordinates on the screen for a given 3D position. To go to a pixel position, just multiply the uv coordinates with the width/height of the viewport a…

Replies: 6 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by donkeyteethUX
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@asny
Comment options

asny Jan 27, 2023
Maintainer

@donkeyteethUX
Comment options

@Nevsden
Comment options

@asny
Comment options

asny Feb 4, 2023
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #283 on January 11, 2023 19:52.