novel wrote: > Hi All, > > I created and opened a vrworld object from a wrl file using this code > vh=vrworld('F0.wrl'); > open(vh); > I have could also display the wrl content with the view command: > view(vh) > > Then I could figure out how to access the nodes of the wrl nodes such > as Transform and its children ( > I tried with get, but it returns an empty object > >>> x=get(vh,'Nodes') > x = vrnode object: 0-by-0 > > I wonder if anyone could help. The wrl model is a textured triangular > mesh mode. My goal is to retrieve the texture as it is mapped to the > triangular mesh.
To access nodes of a virtual world, these nodes must be named. So, in your WRL file, you must have "DEF SomeName Transform" instead of just "Transform". After you have the relevant nodes named, you access them by their name: