Hi Toni,
On Sun, 2006-07-16 at 16:46 +0200, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have a scene and two viewports. The viewports
> share the same root node. I'd like to render in
> one viewport certain geometries of the graph and
> in the other viewport other parts of the scene
> graph (e.g. in one viewport render the geometry and
> in the other the bounding box of those geometries).
>
> I thought about using my custon RenderAction and
> just skip the nodes I don“t want to render in the
> respective viewport. The problem is that it just
> crashes when I try to inherit from RenderAction.
> Here's the code:
>
> class myRenderAction : public RenderAction
> {
> public:
> myRenderAction():RenderAction(){};
> ResultE start(void){
> return RenderAction::start();
> };
> ResultE stop (ResultE res){
> return RenderAction::stop(res);
> };
> };
>
>
> ...
>
> // on the simple scene manager
> m_pMgr->setAction( new myRenderAction );
>
>
> What's wrong about that? Do I have to use fscEdit?
> Or is there another way to do what I have described above?
Deriving actions is a little more complicated...
But luckily there is a very easy way to do what you want to do. Just use
the travMask. Both Nodes and Viewports have a TravMask Field. Only Nodes
for which the logical and of both is non-0 will be rendered. So set the
objects for one Viewport to 1, the ones for the other to 2 and the same
for the Viewports themselves. Nodes with travMask 3 (or the default
0xffffffff) will be rendered in both.
Hope it helps
Dirk
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users