How do I control the access to my object properties created in the Simulink 3D Animation Toolbox 5.1 (R2009b)?
1 view (last 30 days)
Show older comments
I want to have access to the coordinates and geometry of my object, which has been described in my virtual world from the MATLAB command line. However, it appears I only have access to a finite set of the object properties.
Accepted Answer
MathWorks Support Team
on 18 Jan 2010
This enhancement has been incorporated in Release 2008b. For previous product releases, read below for any possible workarounds:
You must add the DEF statement in the VRML file wherever you want the ability to modify something from the MATLAB command line. For example, view the MATLAB file from the demo "Heat Transfer Visualization" (which changes the geometry of the object) with the following command:
edit vrheat.wrl
At line 50, "DEF IFS_Coords" has been added to define a node and name it IFS_Coords. You can then edit this property using the standard methods:
world = vrworld('vrheat.wrl')
open(world)
view(world);vrdrawnow
nodes(world)
ifscoordsnode = vrnode(world, 'IFS_Coords')
fields(ifscoordsnode)
ifscoordsnode.point
For an example of creating a virtual world in Simulink, please refer to "Creating a Sphere in a Virtual World" in the following help documentation;
<http://www.mathworks.com/access/helpdesk/help/toolbox/sl3d/f9-28061.html#f9-28118>
0 Comments
More Answers (0)
See Also
Categories
Find more on Import CAD and Robot Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!