-
Notifications
You must be signed in to change notification settings - Fork 196
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
Add creating a line to class Builder #666
Conversation
I'm rather lost why a building a line segment is of value from vsg::Builder. It's really heavy way to implement the drawing of single line segment, and really not what I'd want any VSG user to be doing as it's just so inefficient. What is the purpose here? |
I have reflected on the need for generating lines and I think the right approach is to passing in a complete vsg::vec3Array or possibly a list of vsg::vec3Array to generate lines for. Creating primitives mesh might also be something you'd want to do in this way. Perhaps it could all be just done together. I am going to close this PR as I just don't feel it's useful for real world applications. If we want an API to make it lines and mesh geometries more easily then vsg::Builder might be a starting place, but to brain storm what this might be I think a Discussion thread would be the right place to do this. |
This means that when drawing lines it is necessary that
Or is there more to do ? |
What about normals and texture coordinates? When you create a line, they are calculated in createLine(), but if you use more than one line, I assume they have to be specified as well. Or can they be calculated completely in createLines() too ? |
All good questions, that I don't yet have quick answers to, I will need to sit down and ponder on the issue. vsg::Bulder was written specifically for primitives shapes like cubes, sphere etc, rather than free form meshes/points/lights so the StateInfo/GeometryInfo start creaking at the seams when we start trying to generalize them to this more general purpose. It may be that we need to have two builder classes - one for shapes, and one for free forms geometry setup. I need time to think about the topic though. |
Vulkan specifies several primitive types. Perhaps an additional |
May be PrimitiveGeometryInfo or GeometryInfoPrimitive ?
PrimitiveStateInfo or StateInfoPrimitive ? |
I see a current use for such a class in osg2vsg to avoid multiple implementations when converting osg geometry to vsg, since the necessary steps are basically the same. |
Description
The commit from this merge request add a method to the class vsg::Builder to draw a line similar to the other available primitives.
Fixes vsg-dev/osg2vsg#63 (partial)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: