ParallelGraphics Forums
SDK
You are here: [Forums]::[General]::[SDK]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
Try RobinZone!
email:  password:
   General - SDK

Subject: [viewpoints] How to add a viewpoint on the fly?
Sender: Andrea B 3.07.07 09:02

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

 


[viewpoints] How to add a viewpoint on the fly? / Andrea B / 3.07.07 09:02
     Re: [viewpoints] How to add a viewpoint on the fly? / nalex@parallelgraphics.com / 4.07.07 07:46
         Re: [viewpoints] How to add a viewpoint on the fly / Andrea B / 4.07.07 11:38

Messages in thread: 3


© 1998-2007 ParallelGraphics. All rights reserved. Terms of use.