Re: [osg-users] Tagging triangles in the BSP

2008-11-08 Thread Jean-Sébastien Guay

Hello Andrew,


I hear that the OSG now supports BSP tree capability.


Perhaps what you heard was that OSG now supported intersection testing 
with a *kd-tree* structure? That would be true, but not BSP trees (yet).


I was wondering 
if this included functionality for tagging metadata onto the individual 
triangles in the BSP tree, or even onto the individual triangles in a 
Geode.  If so, what is the method?  If not, where would be a good place 
for us to attach such functionality?


Robert will be better placed to answer this, he implemented the 
functionality whereas I just dabbled with it (and other kd-tree 
implementations).


Sorry I can't help more.

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


[osg-users] How to bind a osgGA::TrackballManipulator to a scene node!

2008-11-08 Thread YangXiao
Hi everyone :
   How to bind a osgGA::TrackballManipulator to  a scene node! 
   
  Best Regards.
  YangXiao!
 

   
-
 雅虎邮箱,您的终生邮箱!___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] VPB: Superimposed or switch different textures possible?

2008-11-08 Thread Alejandro Aguilar Sierra
Hello:

Is it possible to switch between different textures over the same terrain?

Is it possible to superimpose different textures over the same terrain?

Thanks in advance,

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


Re: [osg-users] How to bind a osgGA::TrackballManipulator to a scene node!

2008-11-08 Thread Wang Rui
Hi YangXiao,

I think it should be binded to the scene viewer using setCameraManipulator()

Wang Rui
2008/11/8 YangXiao [EMAIL PROTECTED]

 Hi everyone :
  How to bind a osgGA::TrackballManipulator to  a scene node!

 Best Regards.
 YangXiao!


 --
 雅虎邮箱,您的终生邮箱! http://cn.mail.yahoo.com/


 ___
 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] osgCairo and osgPango on Windows : some progress

2008-11-08 Thread Jean-Sébastien Guay

Hi Jeremy,


Hey, I can't e-mail through work on the weekends, so I have to use gmail
off lists. :) Feel free to forward this back to the lists for
archival...


Done, see below :)

I'll probably end up sending you the changes tomorrow instead of today. 
Sorry about that, but since nobody uses it on Windows yet, it shouldn't 
be much of a problem...


J-S


The following random bytes came from Cubicool's keyboard :

On Sat, 2008-11-08 at 00:20 -0500, Jean-Sébastien Guay wrote:

Hi all, Hi Jeremy,


Hey, I can't e-mail through work on the weekends, so I have to use gmail
off lists. :) Feel free to forward this back to the lists for
archival...

As I mentioned a little while ago, I stopped trying to get osgCairo and 
osgPango working on Windows because of time constraints (it was just for 
a personal project, so it didn't have much priority)... Well I've gone 
back to it tonight, and have some progress to report.


First of all, there were some things missing for it to compile as a DLL 
on Windows, first and foremost an Export header where the correct symbol 
  for _dllexport and _dllimport was defined depending on whether you're 
compiling or using the DLL respectively. I added that, so now the libs 
(both osgCairo and osgPango) compile correctly as DLLs.


Along the way I also added a few things I consider important to the 
CMake config, like the d suffix for side-by-side debug and release 
builds, and fields in osgPango's config to specify where to find 
osgCairo's includes and libs.


I had to add a few libraries to get things to link, like osgDB for 
osgCairo and cairo, gobject and glib for osgPango (it's looking for 
_g_free, _g_object_ref, etc for some reason).


I also had to make a few fixes to files that seem to me like they 
wouldn't compile without the fixes, even on Linux... Which seems weird. 
I updated earlier tonight from the googlecode SVN for the respective 
projects, but perhaps there's some code in flux.


Also, the osgpangoanimation example looks for osgAnimation (which isn't 
in OSG yet, so there should be a CMake option to compile that example or 
not and fields to specify where osgAnimation is) and the 
osgpangoguiviewer example seems to use methods and data members in 
osgWidget which don't exist (or is it that they're on the osgWidget 
branch but not in the main OSG SVN yet?).


Yeah, these are built against the trunk Cedric and I use. :)

Note that at this point I'm just getting things to compile. I haven't 
actually run anything yet. Status report would read as follows:


osgCairo:
   * lib compiles100%
   * all examples compile100%

osgPango:
   * lib compiles100%
   * 3/5 examples compile 60%

I'll send all my changes tomorrow (I'm too tired to package that all up 
right now - it's past Midnight, and I've got swimming classes with my 
youngest very early tomorrow morning... :-) ). Jeremy, I seem to 
remember you prefer SVN diffs, contrary to OSG's standard policy, is 
that right? I'll send the changes in whatever format you prefer tomorrow.


Yes, please! :)

I'll also test some executions tomorrow, can you please give me a few 
command lines that would be good tests? I've seen some data in the SVN 
working copy, but I don't know how to use it.


Sure! osgcairoviewer will throw up a few Image surfaces demonstrating
various surface formats and what-have-you. osgpangoviewer has a lot of
arguments, but there's a very simple function in the source that handles
this and could probably explain it all pretty easy. Also, make sure you
run osgpangofonts first to see what Windows XP calls the installed
fonts. :)

What sets osgPango apart is that it's designed from step one to be
optimized and positioned for 2D display; that is, a glyph will never
occur at any kind of non-pixel-aligned coordinate. Furthermore, full
subpixel hinting is supported and the rendering backend is pluggable!
Basically, any way you can imagine a font being decorated can be
accomplished--or rather, anything you could do with 2 passes in
Cairo. :)

P. S. If I'm real lucky, Robert has expressed a VERY slight interest in
merging some small part of osgCairo into OSG itself, but we'll have to
see. At any rate, to know it works on Windows would help no matter
what. :)


Thanks,

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


Re: [osg-users] How to bind a osgGA::TrackballManipulator to a scene node!

2008-11-08 Thread Robert Osfield
Hi YangXia,

2008/11/8 YangXiao [EMAIL PROTECTED]:
 Hi everyone :
  How to bind a osgGA::TrackballManipulator to  a scene node!

Could you explain a bit more about what you are trying to achieve as
on its own the above sentence doesn't really provide enough info to
know what you are after, and there are range of different ways one
could interpret it.

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


Re: [osg-users] VPB: Superimposed or switch different textures possible?

2008-11-08 Thread Robert Osfield
Hi Alejandro,

The best way to manage swtiching between different textures over the
same terrain is use multiple texture units, and then if you blend
between them as required.  The osgTerrain::TerrainTile class supports
multiple osgTerrain::Layer(s) so you can attach multiple images as
multiple layers and these in turn map to multiple texture units.  You
can then manage the blending between them using
osgFX::MultiTextureControl node decorating the whole terrain.  The
osgmultitexturecontrol example shows this in action.

Robert.

On Sat, Nov 8, 2008 at 3:13 PM, Alejandro Aguilar Sierra
[EMAIL PROTECTED] wrote:
 Hello:

 Is it possible to switch between different textures over the same terrain?

 Is it possible to superimpose different textures over the same terrain?

 Thanks in advance,

 -- A.
 ___
 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] osgCairo and osgPango on Windows : some progress

2008-11-08 Thread Robert Osfield
Hi Guys,

On Sat, Nov 8, 2008 at 12:24 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 P. S. If I'm real lucky, Robert has expressed a VERY slight interest in
 merging some small part of osgCairo into OSG itself, but we'll have to
 see. At any rate, to know it works on Windows would help no matter
 what. :)

Just for clarification, last week I began looking at svg, pdf and
webkit integration with via Cairo, and osgCairo being the vehicle that
I used for much of this investigation work.  Offline I've been
discussing with Jeremy the various possibilities for Cairo integration
with the OSG.

After dabbling over the past week I'm still not sure of the best way
to progress, but am inclined towards just providing a light weight
CarioImage class in osgWidget.  The CairoImage class would provide the
glue between the cairo context, cairo surface and osg::Image, and then
have osgPlugins for pdf, svg and webkit extend this to provide the
advanced feature integration.

Cairo itself is useful beyond the needs of pdf, svg and webkit
integration, as osgPango illustrates, it's usefulness for certain
types of apps is pretty compelling, but as yet I'm not sure about
whether providing our own C++ wrappers for Cairo is the right
approach, or whether we should defer this to other libraries such as
the existing C++ wrappers for Cairo and just provide the minimal glue
required such as CairoImage.

In terms of porting the CairoImage class would be just be a non op if
users don't have Cairo installed on their machines, and the plugins
would be optional built as well, so you'll only need Cairo, WebKit,
Poppler, rsvg libs if you want the associated functionality.  Getting
this libs working under a Linux distribution will be trivial as most
modern distributions will have them all precompiled with dev headers
in the repositories only a click away, for Windows and OSX we'll have
to explore how easy it is to build.  J-S's work on getting osgPango
and osgCairo compiling all good prep for this ;-)

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


Re: [osg-users] VPB: Superimposed or switch different textures possible?

2008-11-08 Thread Ümit Uzun
Hi Alejando,

If you want to create expilicit LOD terrain image, the answer is YES. If you
want to change the texture of specified area by the distance of the viewer
you can create your terrain with using --levels parameters. With --levels
parameter you can define expected image in this levels.

osgdem ... ... ... --levels 6 7 expectedImage

This command says that, use expectedImage in 6-7 levels.

Best Regards.

2008/11/8 Alejandro Aguilar Sierra [EMAIL PROTECTED]

 Hello:

 Is it possible to switch between different textures over the same terrain?

 Is it possible to superimpose different textures over the same terrain?

 Thanks in advance,

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




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


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-08 Thread Cedric Pinson

Hi Jean-Sebastien,

It's really great, i would love to see osgCairo and osgPango in osg.
nice work

Cheers,
Cedric

Jean-Sébastien Guay wrote:

Hi all, Hi Jeremy,

As I mentioned a little while ago, I stopped trying to get osgCairo 
and osgPango working on Windows because of time constraints (it was 
just for a personal project, so it didn't have much priority)... Well 
I've gone back to it tonight, and have some progress to report.


First of all, there were some things missing for it to compile as a 
DLL on Windows, first and foremost an Export header where the correct 
symbol  for _dllexport and _dllimport was defined depending on whether 
you're compiling or using the DLL respectively. I added that, so now 
the libs (both osgCairo and osgPango) compile correctly as DLLs.


Along the way I also added a few things I consider important to the 
CMake config, like the d suffix for side-by-side debug and release 
builds, and fields in osgPango's config to specify where to find 
osgCairo's includes and libs.


I had to add a few libraries to get things to link, like osgDB for 
osgCairo and cairo, gobject and glib for osgPango (it's looking for 
_g_free, _g_object_ref, etc for some reason).


I also had to make a few fixes to files that seem to me like they 
wouldn't compile without the fixes, even on Linux... Which seems 
weird. I updated earlier tonight from the googlecode SVN for the 
respective projects, but perhaps there's some code in flux.


Also, the osgpangoanimation example looks for osgAnimation (which 
isn't in OSG yet, so there should be a CMake option to compile that 
example or not and fields to specify where osgAnimation is) and the 
osgpangoguiviewer example seems to use methods and data members in 
osgWidget which don't exist (or is it that they're on the osgWidget 
branch but not in the main OSG SVN yet?).


Note that at this point I'm just getting things to compile. I haven't 
actually run anything yet. Status report would read as follows:


osgCairo:
  * lib compiles100%
  * all examples compile100%

osgPango:
  * lib compiles100%
  * 3/5 examples compile 60%

I'll send all my changes tomorrow (I'm too tired to package that all 
up right now - it's past Midnight, and I've got swimming classes with 
my youngest very early tomorrow morning... :-) ). Jeremy, I seem to 
remember you prefer SVN diffs, contrary to OSG's standard policy, is 
that right? I'll send the changes in whatever format you prefer tomorrow.


I'll also test some executions tomorrow, can you please give me a few 
command lines that would be good tests? I've seen some data in the SVN 
working copy, but I don't know how to use it.


Thanks,

J-S


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


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


[osg-users] How to extract info from geotiff to warp image

2008-11-08 Thread Alejandro Aguilar Sierra
Hi,

I just created a texture for my terrain. How can I extract the
projection and georeferencial information from the terrain heighfile
in geotiff format to apply it to the texture? I guess I should use
gdalwarp.

Regards,

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


Re: [osg-users] VPB: Superimposed or switch different textures possible?

2008-11-08 Thread Alejandro Aguilar Sierra
Hi Robert and Umit,

How should I run the osgmultitexturecontrol example?

Regards,

-- A.


On Sat, Nov 8, 2008 at 11:14 AM, Robert Osfield
[EMAIL PROTECTED] wrote:
 Hi Alejandro,

 The best way to manage swtiching between different textures over the
 same terrain is use multiple texture units, and then if you blend
 between them as required.  The osgTerrain::TerrainTile class supports
 multiple osgTerrain::Layer(s) so you can attach multiple images as
 multiple layers and these in turn map to multiple texture units.  You
 can then manage the blending between them using
 osgFX::MultiTextureControl node decorating the whole terrain.  The
 osgmultitexturecontrol example shows this in action.

 Robert.

 On Sat, Nov 8, 2008 at 3:13 PM, Alejandro Aguilar Sierra
 [EMAIL PROTECTED] wrote:
 Hello:

 Is it possible to switch between different textures over the same terrain?

 Is it possible to superimpose different textures over the same terrain?

 Thanks in advance,

 -- A.
 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] 回复: Re: How to bind a osgG A::TrackballManipulator to a scene node!

2008-11-08 Thread YangXiao
Thanks Robert . 
  I means   to bind a osgGA::TrackballManipulator only  to 
a scene node, and others scene node i use PickHandler(). Can I achieve this 
function?
   
  YangXiao.


Robert Osfield [EMAIL PROTECTED] 写道:
  Hi YangXia,

2008/11/8 YangXiao :
 Hi everyone :
 How to bind a osgGA::TrackballManipulator to a scene node!

Could you explain a bit more about what you are trying to achieve as
on its own the above sentence doesn't really provide enough info to
know what you are after, and there are range of different ways one
could interpret it.

Robert.
___
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] rewrite glTexImage2D() with OSG

2008-11-08 Thread dmu_rhx
Hi!
I wrote a program with opengl, now I want to rewrite the program with OSG. 
But I don't know how to rewrite the following code:
 
glGenTextures(1, texture[l]); 
glBindTexture(GL_TEXTURE_2D, texture[l]);
glTexParameteri(GL_TEXTURE_2D,GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);   
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB_FLOAT16_ATI, WaterTexSize,   
WaterTexSize, 0, GL_RGBA, GL_FLOAT, pBuf);
 
This code generates a texture using the data saved in pBuf. How to rewrite 
this code with OSG? 
Thank you!
 RHX
 
 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org