[osg-users] How to count polygons in view

2008-12-07 Thread oren david
Hello again,
I tried your suggestions and got no where, we are to present our work
at CERME6 (http://cerme6.univ-lyon1.fr/) due to Jan.,28th - Feb.,1 ,
2009, we are working pretty intensive in developing our uniques math
alograthim, again we are using OSG as our graphic engine. I really
need more specific info about finding the number of polygon on screen
on each frame. We are using this number with other data as an
approximation of the distance of the camera (using the current
heading, not the global distance. I mean my camera can point somewhere
with the distance of 300, but the camera is really 2 meters from the
surface behind )from the surface, well we have some really cool
functions with crazy presentation.
sorry to bother you, If you know of any OSG in Israel that will be coll.
thank you
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to count polygons in view

2008-12-07 Thread Robert Osfield
Hi Oren,

Is there a reason why you aren't following my recommendation of not to
start are new thread when asking the same question?   Threading of
topics is essential for anyone trying to follow topics be it right
now, or in the future when trying to find answers to their own
questions.  This includes people who might be trying to support you -
how would they know what's already been suggested to you???

I consider your constant spamming of the list with separate topics a
misuse of this community resource and If you continue this misuse it
in this way I will simply unsubscribe you as it really isn't fair on
the rest of the community trying to support someone who doesn't follow
good mailing list etiquette.   This is the third time I have asked you
to change you conduct, and this is the last time I will ask, next time
I will unsubscribe you.

Robert.

On Sun, Dec 7, 2008 at 2:50 PM, oren david [EMAIL PROTECTED] wrote:
 Hello again,
 I tried your suggestions and got no where, we are to present our work
 at CERME6 (http://cerme6.univ-lyon1.fr/) due to Jan.,28th - Feb.,1 ,
 2009, we are working pretty intensive in developing our uniques math
 alograthim, again we are using OSG as our graphic engine. I really
 need more specific info about finding the number of polygon on screen
 on each frame. We are using this number with other data as an
 approximation of the distance of the camera (using the current
 heading, not the global distance. I mean my camera can point somewhere
 with the distance of 300, but the camera is really 2 meters from the
 surface behind )from the surface, well we have some really cool
 functions with crazy presentation.
 sorry to bother you, If you know of any OSG in Israel that will be coll.
 thank you
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to count polygons in view

2008-12-07 Thread Robert Osfield
Have you ever do a reply to  It's a pretty basic mail facility.

Just look at the subject line of ALL other threads, everyone else on
the mailing is able to do it just fine.  You seen to be special in
your inability to use mail.

On Sun, Dec 7, 2008 at 4:43 PM, oren david [EMAIL PROTECTED] wrote:
 Dear Robert,
 instead of throwing around accuses, maybe there is something wrong I'm
 doing. i'm not used to this old fashion mailing list.
 sorry for the mess I'd love to know where I'm wrong.
 Good order is essential to everyone on this mailing list, I'm with you
 on this one
 Oren David
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to count polygons in view

2008-12-03 Thread oren david
Hello all,I'm a new around here. So far I've managed to get around but I'm
stuck on a simple task. How many polygon do I have on screen right now.
I saw the post
http://groups.google.com/group/osg-users/browse_thread/thread/6e2894a28daa2f68/435314f8a1ffafc3?hl=enlnk=gstq=number+polygon#435314f8a1ffafc3
But I just can't make it work.
I did some thing like that:

osg::viewer viewer;
.
.
.
.
.
RenderStage *rs = new RenderStage;
rs-setCamera(viewer.getCamera());

but nothing updates
any 1???
thank YoU.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to count polygons in view

2008-12-03 Thread Vincent Bourdier
Hi,

Maybe you can have a look on osg sources, on osgViewer and statistics...
If you make a new viewer, press 's' and see the statistics... it can gives
you an idea of what you can obtain.

An other way can be to do it manually : with a nodecallback or a
cullcallback, you can check if a node is in the frutum or not. After that,
just count the visible node polygons...

Vincent.

2008/12/3 oren david [EMAIL PROTECTED]

 Hello all,I'm a new around here. So far I've managed to get around but I'm
 stuck on a simple task. How many polygon do I have on screen right now.
 I saw the post
 http://groups.google.com/group/osg-users/browse_thread/thread/6e2894a28daa2f68/435314f8a1ffafc3?hl=enlnk=gstq=number+polygon#435314f8a1ffafc3
 But I just can't make it work.
 I did some thing like that:

 osg::viewer viewer;
 .
 .
 .
 .
 .
 RenderStage *rs = new RenderStage;
 rs-setCamera(viewer.getCamera());

 but nothing updates
 any 1???
 thank YoU.

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to count polygons in view

2008-12-03 Thread oren david
Well, I need the polygons counts not the node counts. maybe I can count
drawables or something like that.
According the post I mentioned OSG has something built-in for it
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to count polygons in view

2008-12-03 Thread Robert Osfield
Hi Oren,

Could you *please* use the same threads that you've already started.
Starting up new threads to ask practically the same question over and
over is really bad use of the osg mailing list.  This is the second
time I've had to suggest this to you.

Also could please read the replies to your others posts - answers to
your questions have been supplied.  You will need also need to show a
little initiative, you have all source code to the OSG.

Robert.

On Wed, Dec 3, 2008 at 11:12 AM, oren david [EMAIL PROTECTED] wrote:
 Well, I need the polygons counts not the node counts. maybe I can count
 drawables or something like that.
 According the post I mentioned OSG has something built-in for it

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to count polygons in view

2008-12-03 Thread Jean-Sébastien Guay

Hello David,

I will repeat what Robert already said, please use the Reply button in 
your mail client instead of starting a new message each time. This helps 
people keep track of what has been said before, and also allows you to 
keep the relevant parts of the previous message to give context to your 
replies, like this:


Well, I need the polygons counts not the node counts. maybe I can count 
drawables or something like that.

According the post I mentioned OSG has something built-in for it


If you use a cull callback to know if a node was culled or not, you will 
know how many polygons are not culled, since if a Geode is not culled, 
then all its Drawables are not culled, and thus you can count the number 
of polygons in each Drawable.


Also Vincent gave you an excellent suggestion, you can check out the 
code for the osgViewer::StatsHandler, it does exactly this and more. For 
an example, press 's' 4 times in osgviewer, and you will see what I 
mean. Move the camera around (to see part of the model or none of it in 
the view) and you will see the polygon counts change.


Hope this helps,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org