Hi All,
I am trying to get muscle path information out of a model via Matlab. I am able to get the path point set with something like:
aMuscleGeometry = aMuscle.getGeometryPath();
aPathPointSet = aMuscleGeometry.getPathPointSet();
and then can get information, e.g. body name and location, for muscle "n":
Body = aPathPointSet.get(n).getBodyName
Location = ArrayDouble.getValuesFromVec3(aPathPointSet.get(n).getLocation())
However, what I'd really like to get is the "current" muscle path, including wrapping points if present. I've tried using "getCurrentPath", i.e.:
CurrentPath = aMuscleGeometry.getCurrentPath(state);
This seems to work, but I can't figure out how to get actual path point information (body or location) at this point.
"CurrentPath.get(n).getLocation()" returns an error.
Unfortunately I'm not well versed in java. I suspect there's something very basic that I'm missing, but I haven't been able to figure out what. Thoughts?
Thanks,
Dennis
Getting muscle path information in Matlab
- Dennis Anderson
- Posts: 6
- Joined: Fri Aug 01, 2008 5:12 am
- Ayman Habib
- Posts: 2240
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Getting muscle path information in Matlab
Hi Dennis,
You should be looking at the Doxygen documentation for available methods that you can call (in Matlab pressing TAB should show possible completions. In the case of GeometryPath you'd need to call something like
Hope this helps,
-Ayman
You should be looking at the Doxygen documentation for available methods that you can call (in Matlab pressing TAB should show possible completions. In the case of GeometryPath you'd need to call something like
Code: Select all
currentPath = aMuscleGeometry.getCurrentPath(state);
currentPath.getitem(i).getLocation()
-Ayman
- Dennis Anderson
- Posts: 6
- Joined: Fri Aug 01, 2008 5:12 am
Re: Getting muscle path information in Matlab
Yes, this works, many thanks Ayman!
I knew I was missing something simple, and I had not picked up on the "Tab" trick either. That will certainly be helpful!
-Dennis
I knew I was missing something simple, and I had not picked up on the "Tab" trick either. That will certainly be helpful!
-Dennis