It's me again...

I've examined the implementation a little more, and got two new
questions/comments.

1) Is it really possible to change the geometry from a
TriangleFunctor? I haven't examined the implementation carefully, but,
uh, things look "too const to be mutable". (Feel free to ignore
questions with such silly argumentes ;-))

2) Aren't the implementation of the methods 'begin()', 'end()', and
'vertex()' found in 'TriangleFunctor' generic enough to be transfered
to 'PrimitiveFunctor'? There is even a note in a comment in
'TriangleFunctor::begin()' that seems to suggest this.

Kind regards,

LMB

On 6/23/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
HI Leandro,

If you wanted to modify the data then you wouldn't want to do it to
temporary data.

Robert.

On 6/23/06, Leandro Motta Barros <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> Thanks for the answer. Actually, I already understood the meaning of
> 'treatVertexDataAsTemporary', my question was more from a
> 'TriangleFunctor' user point of view. I mean, whenever I want to use a
> 'TriangleFunctor', I have to implement 'operator()', and it receives a
> 'treatVertexDataAsTemporary' parameter. So, I was just wondering in
> which practical cases the value of  'treatVertexDataAsTemporary' would
> matter for me. In other words, why would someone ever write 'if
> (treatVertexDataAsTemporary) { ... } else { ... }' when implementing
> 'operator()'.
>
> Anyway, just curiosity...
>
> LMB
>
> On 6/23/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
> > HI Leandro,
> >
> > The 'treatVertexDataAsTemporary' variable is needed to distiguish
> > primtives that are passed in via the begin/vertex/end of
> > PrimiveFunctor, as it creates a temporary array then pretends that its
> > a traditional array data to help make things easier to handle in a
> > general way.
> >
> > Examples of data that trigger this path are things like
> > osg::ShapeDrawable where it only the fly generates the geometry, since
> > it never actually ever exists in array form, even for rendering (it
> > uses OpenGL slow paths + display lists).
> >
> > Robert
> >
> >
> > On 6/23/06, Leandro Motta Barros <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > I was taking a look at 'TriangleFunctor', and I have a question about
> > > it. It's more curiosity than a problem for me, but if anyone can
> > > answer...
> > >
> > > 'TriangleFunctor' calls 'T::operator()' for every triangle in the
> > > geometry, passing as parameters the three vertices and a fourth
> > > 'treatVertexDataAsTemporary' parameter. If I understood it correctly,
> > > this fourth parameter indicates whether these vertices are stored in
> > > "real" vertex arrays or if they were "faked", in a temporary vertex
> > > array. So, my question is: under which circumstances is this relevant?
> > >
> > > Thank you,
> > >
> > > LMB
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > http://www.openscenegraph.org/
> > >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to