- This topic has 2 replies, 2 voices, and was last updated 7 years, 7 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Getting Started › [SOLVED] How to figure out the available options of xml tags?
Tagged: 64_bits, documentation color alpha, SOFA_1608, Windows_10
Where can I find available attributes of several xml tags?
As an example: I have a visual node, defined as an OglModel loading a .stl file and with attribute color=”green”. Now I would like to make the model semi-transparent. I suppose that the possible attributes of OglModel can be found somewhere in the documentation, but it is not entirely clear to me yet. I fond the OglModel Class Reference at https://www.sofa-framework.org/api/SofaOpenglVisual/classsofa_1_1component_1_1visualmodel_1_1_ogl_model.html but it does not contain the “color” keyword. Its parent class does have a VisualModelImpl::setColor method, one with string input and one with four floats (r,g,b,a) and I suppose that the xml options get passed through that function somehow. While writing this post, I figure out the syntax by studying the cpp file itself and now I see that color=”1.0 0.0 1.0 0.5″ gives transparent purple (yay!). So this works by studying the code, but I still don’t have an overview of all available attributes.
Hey Vincent,
The possible attributes (called also data) are available in the API documentation.
We are currently working on a more accurate overview of all available attributes in SOFA (work led by @guillaumeparan).
Do not hesitate to improve (edit and pull-request) also the online documentation.
Thank you for sharing this post. Since it works, I will set the topic as resolved, alright?
Cheers,
Hugo
Thanks, yes I am understanding things better now! It just takes time to climb the steep learning curve. The many hundreds of examples are really helpful, these more than makes up for the missing pieces in the main documentation! Keep up the good work 🙂
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.