Do you have ReadVRML2_0.dll 64bit version ?
I got this error in Matlab 7.11
"Microsoft Visual C++ 2005 or 2008 is required to use this feature.
"
I think that is because of I am using Matlab 64bit version.
This code works well for MATLAB 7.0 but it is important that the wrl file defines each vertex and polygon on a new line; otherwise some vertices and polygons will be ignored! Confirm this by opening the wrl file in the MATLAB editor. In addition, I found that it may be necessary to modify the h file generation as follows (i.e. excluding the file extensions):
%Generate h-file (handle pointing to) the mfile
hReadVRML20 = @ReadVRML20;
%Save h-file to Current Directory
save hReadVRML20.h hReadVRML20;
loadlibrary('ReadVRML2_0','hReadVRML20');
chk = libisloaded('ReadVRML2_0');
if chk
disp('The dll loaded successfully')
else
disp('The dll was not loaded successfully')
end
%Now able to call the ReadVRML20(vrml_fn) m-file
o = ReadVRML20('my_file.wrl');
% plot the 3D world
x = o.Vertex(1,:);
y = o. Vertex (2,:);
z = o. Vertex (3,:);
tri = o.Face';
trimesh(tri,x,y,z,'edgecolor','black');
% Unload the library (after use) and free up the memory
unloadlibrary ReadVRML2_0