On Nov 12, 2007 3:46 PM, Vladimir Shabanov <[EMAIL PROTECTED]> wrote:
> 2007/11/12, Jeremy L. Moles <[EMAIL PROTECTED]>:
> > On Mon, 2007-11-12 at 19:41 +0000, Robert Osfield wrote:
> > > Hi Jeremy,
> > >
> > > I wouldn't worry about users defined clip planes, or special texture
> > > matrix set up.  I suggest getting to grips with plain OpenGL modelview
> > > and projection matrices and how they work, the OSG's Camera view and
> > > projection matrices map directly to OpenGL's so docs on the web and
> > > OpenGL books on the topic of cameras should help you.  Once you grasp
> > > this stuff hopefully things will become second nature and the
> > > solutions will pop out of this better understanding.  I'm no great
> > > educator though, so I have to defer to other texts for this, but I do
> > > know that the time you invest in understanding modelview and
> > > projection matrices will repay you many time over throughout the rest
> > > of your career.
> >
> > :)
> >
> > Well, I wouldn't go so far as to say I don't have ANY understanding of
> > those concepts--it's just that translating your recommendation into
> > implementation isn't immediately obvious given both my understanding of
> > GL in general and my familiarity with OSG.
> >
> > At any rate, introducing clipping may solve the issue of not rendering
> > the undesirable portions of a piece of a geometry, but how does it
> > affect picking? Is it possible to pick objects that are clipped (this
> > seems to be the case from my small tests here, though I'm probably doing
> > something wrong)...
>
> As far as I understand no picking problems should appear when
> osg::Camera's viewport is set correcly.
>
> You don't need to remember math for these A,B,C,D. Just use
> osg::Plane( Vec3 normal, Vec3 point ) constructor. Something like
> Plane( Vec3( 1,0,0 ), Vec3( x1,y1,0) )
> Plane( Vec3( 0,1,0 ), Vec3( x1,y1,0) )
> Plane( Vec3( -1,0,0 ), Vec3( x2,y2,0) )
> Plane( Vec3( 0,-1,0 ), Vec3( x2,y2,0) )
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

I used clip planes for a sort of 2D/3D scrolling window (a sort of spreadsheet
with textures, text and some 3D models in cells).  The problem I ran into was
that once you have more than one scrolling window, you run into the limitation
of OSG not supporting re-use of OpenGL clipping planes without setting up
multiple render stages.  I think there may have been a patch submitted to allow
re-use of clip planes with multiple render bins, but I'm not sure of the status
of that.

Leif Delgass
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to