Hi everybody,
I'm trying to add a viewpoint to the viewpoint list and I can't sort it out.
Basically I capture the current position of the viewer, I create a viewpoint in an INodeObject, and all that works properly. But when I add the INode to the current scene, the new viewpoint is not displayed in the viewpoint list.
Here's the C++ code:
if (SUCCEEDED(Engine->CreateNodeFromString(ViewpointVrmlCode.AllocSysString(), &vpNode) &&SUCCEEDED(Engine->get_RootNodes(&nodes))
&&SUCCEEDED(nodes->Add(vpNode, NULL)))
return TRUE;
It always returns TRUE. I thought it could be just a matter of Refresh(), but it didn't work.
How can I add a new viewpoint, given that the get_Viewpoints list is read-only?
Do I have to refresh in some way the plugin controls to see the new viewpoint? How can I get the controls refreshed?
I'm working on VC++6/Cortona 4.1/Windows Vista.
Thanks in advance,
bye,
Andrea
|
|