Hi all,
I am using the following:
Vec3 normal = Vec3(0,1,0);
double offset = 0;
Plane GroundPlane = Plane(normal, offset);
It compiles and runs but I would like to see the calculations performed, please could someone point me to the source code of the Plane calculation?
Thanks,
Nicos
Simbody Plane Class - How can I see the source code calculations?
- Nicos Haralabidis
- Posts: 190
- Joined: Tue Aug 16, 2016 1:46 am
- Thomas Uchida
- Posts: 1790
- Joined: Wed May 16, 2012 11:40 am
Re: Simbody Plane Class - How can I see the source code calculations?
Here's how I found it:
1. Go to the Simbody doxygen documentation here: https://simtk.org/api_docs/simbody/3.5/
2. Search for "plane" in the "Search" box at the top and select the first result.
3. Go to the bottom of the "SimTK::Plane Class Reference" page and click the link to the ContactGeometry.h file (below "The documentation for this class was generated from the following file:").
4. Find "plane(" on this page.
1. Go to the Simbody doxygen documentation here: https://simtk.org/api_docs/simbody/3.5/
2. Search for "plane" in the "Search" box at the top and select the first result.
3. Go to the bottom of the "SimTK::Plane Class Reference" page and click the link to the ContactGeometry.h file (below "The documentation for this class was generated from the following file:").
4. Find "plane(" on this page.
- Nicos Haralabidis
- Posts: 190
- Joined: Tue Aug 16, 2016 1:46 am
Re: Simbody Plane Class - How can I see the source code calculations?
Hello Thomas,
That worked a treat - thanks!
I am looking at the following line which is meant to a return a Real variable:
return ~m_normal*pt - m_offset;
What purpose does the tilde (~) operator serve in this instance? I haven't come across this syntax before in a similar example and I can't seem to find an answer online.
Kind regards,
Nicos Haralabidis
That worked a treat - thanks!
I am looking at the following line which is meant to a return a Real variable:
return ~m_normal*pt - m_offset;
What purpose does the tilde (~) operator serve in this instance? I haven't come across this syntax before in a similar example and I can't seem to find an answer online.
Kind regards,
Nicos Haralabidis
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Simbody Plane Class - How can I see the source code calculations?
Hello,
~ is the operator for transpose.
-Ayman
~ is the operator for transpose.
-Ayman
- Thomas Uchida
- Posts: 1790
- Joined: Wed May 16, 2012 11:40 am
Re: Simbody Plane Class - How can I see the source code calculations?
Ayman is correct (of course). You may wish to refer to the Simbody User's Guide here: https://github.com/simbody/simbody/tree ... imbody/doc (SimbodyAndMolmodelUserGuide.pdf, Section 5.3.1: Operators).
- Nicos Haralabidis
- Posts: 190
- Joined: Tue Aug 16, 2016 1:46 am
Re: Simbody Plane Class - How can I see the source code calculations?
Thanks for your help Ayman and Thomas! It makes sense now! (dot product)