Re: [osg-users] bounding box issue

2008-09-25 Thread Gordon Tomlinson
http://www.vis-sim.com/osg/osg_faq_1.htm#f22

http://www.vis-sim.com/osg/osg_faq_1.htm#f17



__
Gordon Tomlinson 

[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
www.vis-sim.com www.gordontomlinson.com 
__

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gianluca
Natale
Sent: Thursday, September 25, 2008 5:19 AM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] bounding box issue

Actually I'm using the old Producer::camera,
and I cannot find such a way to disable the SMALL FEATURE
CULLING. Is there a way to do that with Producer, or
the default cannot be changed at all!

Thanks,
Gianluca


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gianluca
Natale
Sent: mercoledì 24 settembre 2008 16.28
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] bounding box issue

Thank you Robert,
I will try.

Gianluca.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: mercoledì 24 settembre 2008 16.02
To: OpenSceneGraph Users
Subject: Re: [osg-users] bounding box issue

Hi Gianluca,

The OSG by defaults has small feature culling enabled, try disabling this:

 viewer.getCamera()-setCullingMode(
   viewer.getCamera()-getCullingMode()  ~
osg::CullSettings::SMALL_FEATURE_CULLING);

Robert.

On Wed, Sep 24, 2008 at 2:52 PM, Gianluca Natale
[EMAIL PROTECTED] wrote:
 Hi All.
 I have this very strange issue related to bounding boxes.

 I derived a class MyDrawable, from osg::Drawable.

 And I'm trying to make some experiments with it.



 I have a model containing two objects:

 - a cylinder, made by a bunch of points, defined as an instance of
 MyDrawable;

 - an object made by just one vertex, defined as an instance of MyDrawable.



 When I try to draw the model, just the cylinder is shown.

 I implemented the method GetBoundingBox()in MyDrawable.

 So, obviously, it returns a void BB for the second drawable.

 Does it depend on the void BB?
 I mean, does OSG check the dimension of the BB of an object before
 drawing it, and discard the object if its BB, in screen coords, becomes
less
 than
 some threshold (expressed in pixels)?



 I suspect this behavior because, if I try to artificially enlarge the BB
of
 the second drawable,
 once I zoom in I can see it on the screen. And disappear when I zoom out
 again.

 Thank you in advance.
 Regards,

 Gianluca Natale



 ___
 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

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.7.1/1687 - Release Date: 9/23/2008
6:32 PM

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

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.7.1/1687 - Release Date: 9/23/2008
6:32 PM

___
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] bounding box issue

2008-09-25 Thread Gianluca Natale
Thank you Robert,
it does work!

Gianluca

P.S.=I will pass to newer OSG version ASAP.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: giovedì 25 settembre 2008 13.11
To: OpenSceneGraph Users
Subject: Re: [osg-users] bounding box issue

Hi Gianluca,

I don't recall the exact details, but you'll need to get the
OsgSceneHandler form the Producer::Camera, then from this get it's
osgUtil::SceneView and then CullingMode on this SceneView.  It's a bit
convoluted but it's possible.

You other route would be to just port to osgViewer, there are other
examples like this one that you'll find more straight forward when
using osgViewer than Producer as osgViewer doesn't need an abstraction
layer ontop the OSG to integrate it - it's all native OSG code.

Robert.

On Thu, Sep 25, 2008 at 10:18 AM, Gianluca Natale
[EMAIL PROTECTED] wrote:
 Actually I'm using the old Producer::camera,
 and I cannot find such a way to disable the SMALL FEATURE
 CULLING. Is there a way to do that with Producer, or
 the default cannot be changed at all!

 Thanks,
 Gianluca


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Gianluca
 Natale
 Sent: mercoledì 24 settembre 2008 16.28
 To: 'OpenSceneGraph Users'
 Subject: Re: [osg-users] bounding box issue

 Thank you Robert,
 I will try.

 Gianluca.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robert
 Osfield
 Sent: mercoledì 24 settembre 2008 16.02
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] bounding box issue

 Hi Gianluca,

 The OSG by defaults has small feature culling enabled, try disabling this:

  viewer.getCamera()-setCullingMode(
   viewer.getCamera()-getCullingMode()  ~
 osg::CullSettings::SMALL_FEATURE_CULLING);

 Robert.

 On Wed, Sep 24, 2008 at 2:52 PM, Gianluca Natale
 [EMAIL PROTECTED] wrote:
 Hi All.
 I have this very strange issue related to bounding boxes.

 I derived a class MyDrawable, from osg::Drawable.

 And I'm trying to make some experiments with it.



 I have a model containing two objects:

 - a cylinder, made by a bunch of points, defined as an instance of
 MyDrawable;

 - an object made by just one vertex, defined as an instance of
MyDrawable.



 When I try to draw the model, just the cylinder is shown.

 I implemented the method GetBoundingBox()in MyDrawable.

 So, obviously, it returns a void BB for the second drawable.

 Does it depend on the void BB?
 I mean, does OSG check the dimension of the BB of an object before
 drawing it, and discard the object if its BB, in screen coords, becomes
 less
 than
 some threshold (expressed in pixels)?



 I suspect this behavior because, if I try to artificially enlarge the BB
 of
 the second drawable,
 once I zoom in I can see it on the screen. And disappear when I zoom out
 again.

 Thank you in advance.
 Regards,

 Gianluca Natale



 ___
 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

 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com
 Version: 8.0.169 / Virus Database: 270.7.1/1687 - Release Date: 9/23/2008
 6:32 PM

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

 No virus found in this incoming message.
 Checked by AVG - http://www.avg.com
 Version: 8.0.169 / Virus Database: 270.7.1/1687 - Release Date: 9/23/2008
 6:32 PM

 ___
 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

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.7.2/1689 - Release Date: 9/24/2008
6:51 PM

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


[osg-users] bounding box issue

2008-09-24 Thread Gianluca Natale
Hi All.
I have this very strange issue related to bounding boxes.

I derived a class MyDrawable, from osg::Drawable.

And I'm trying to make some experiments with it.

 

I have a model containing two objects:

- a cylinder, made by a bunch of points, defined as an instance of
MyDrawable;

- an object made by just one vertex, defined as an instance of MyDrawable.

 

When I try to draw the model, just the cylinder is shown.

I implemented the method GetBoundingBox()in MyDrawable.

So, obviously, it returns a void BB for the second drawable.

Does it depend on the void BB?
I mean, does OSG check the dimension of the BB of an object before
drawing it, and discard the object if its BB, in screen coords, becomes less
than
some threshold (expressed in pixels)?

 

I suspect this behavior because, if I try to artificially enlarge the BB of
the second drawable,
once I zoom in I can see it on the screen. And disappear when I zoom out
again.

Thank you in advance.
Regards,

Gianluca Natale

 

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


Re: [osg-users] bounding box issue

2008-09-24 Thread Robert Osfield
Hi Gianluca,

The OSG by defaults has small feature culling enabled, try disabling this:

 viewer.getCamera()-setCullingMode(
   viewer.getCamera()-getCullingMode()  ~
osg::CullSettings::SMALL_FEATURE_CULLING);

Robert.

On Wed, Sep 24, 2008 at 2:52 PM, Gianluca Natale
[EMAIL PROTECTED] wrote:
 Hi All.
 I have this very strange issue related to bounding boxes.

 I derived a class MyDrawable, from osg::Drawable.

 And I'm trying to make some experiments with it.



 I have a model containing two objects:

 - a cylinder, made by a bunch of points, defined as an instance of
 MyDrawable;

 - an object made by just one vertex, defined as an instance of MyDrawable.



 When I try to draw the model, just the cylinder is shown.

 I implemented the method GetBoundingBox()in MyDrawable.

 So, obviously, it returns a void BB for the second drawable.

 Does it depend on the void BB?
 I mean, does OSG check the dimension of the BB of an object before
 drawing it, and discard the object if its BB, in screen coords, becomes less
 than
 some threshold (expressed in pixels)?



 I suspect this behavior because, if I try to artificially enlarge the BB of
 the second drawable,
 once I zoom in I can see it on the screen. And disappear when I zoom out
 again.

 Thank you in advance.
 Regards,

 Gianluca Natale



 ___
 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] bounding box issue

2008-09-24 Thread Gianluca Natale
Thank you Robert,
I will try.

Gianluca.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robert
Osfield
Sent: mercoledì 24 settembre 2008 16.02
To: OpenSceneGraph Users
Subject: Re: [osg-users] bounding box issue

Hi Gianluca,

The OSG by defaults has small feature culling enabled, try disabling this:

 viewer.getCamera()-setCullingMode(
   viewer.getCamera()-getCullingMode()  ~
osg::CullSettings::SMALL_FEATURE_CULLING);

Robert.

On Wed, Sep 24, 2008 at 2:52 PM, Gianluca Natale
[EMAIL PROTECTED] wrote:
 Hi All.
 I have this very strange issue related to bounding boxes.

 I derived a class MyDrawable, from osg::Drawable.

 And I'm trying to make some experiments with it.



 I have a model containing two objects:

 - a cylinder, made by a bunch of points, defined as an instance of
 MyDrawable;

 - an object made by just one vertex, defined as an instance of MyDrawable.



 When I try to draw the model, just the cylinder is shown.

 I implemented the method GetBoundingBox()in MyDrawable.

 So, obviously, it returns a void BB for the second drawable.

 Does it depend on the void BB?
 I mean, does OSG check the dimension of the BB of an object before
 drawing it, and discard the object if its BB, in screen coords, becomes
less
 than
 some threshold (expressed in pixels)?



 I suspect this behavior because, if I try to artificially enlarge the BB
of
 the second drawable,
 once I zoom in I can see it on the screen. And disappear when I zoom out
 again.

 Thank you in advance.
 Regards,

 Gianluca Natale



 ___
 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

No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.7.1/1687 - Release Date: 9/23/2008
6:32 PM

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