Re: [osg-users] KeyboardEventHandler interferes with selection

2007-11-22 Thread Andreas.Richter
 The KeySwitchMatrixManipulator only handles events that havent'
 already been handled, and in your case you are signalling 
 that you've handled the event by returning true from your own 
 handler. Just return false and the key switch handler with 
 work with it just fine.

Many thanks, now it works fine!
--  
Andreas Richter
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] picking with wireframe...

2007-11-22 Thread Emmanuel Roche
Hi everyone...

just a few questions on the picking mechanism:

Imagine I want to pick objects in the scene, but some of them are in
wireframe mode... in this case I would like the object to be picked only if
I'm really on an edge (or maybe very close to an edge...). This doesn't seem
to be the default picking result obtained with something like
view-computeIntersections(...) as clicking in the middle of a wireframe
rendered face still give a collision.

Does anyany have any suggestion on how this would be best achieved ?
(Personaly I was thinking about making calculations using the local hit
point and the vertices of the colliding face to see how close the hit point
is from a given edge)

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


[osg-users] How to enable the auto-rotate affect on a TrackballManipulator, ( win32mfc )

2007-11-22 Thread Wu Xiaodong
Hi, Everyone:

  I am a total begginer user of OSG for 3 days.

  How can i enable the auto-rotate effect on a TrackballManipulator?

  I have attached a osgViewer::viewer to a window on Win32.( windiow+MFC
) by following code.
*
viewer = new osgViewer::Viewer;
osg::ref_ptrosg::GraphicsContext::Traits traits = new
osg::GraphicsContext::Traits;
traits-x = 0;
traits-y = 0;
traits-width = rc.Width();
traits-height = rc.Height();
.
/
osg::ref_ptrosgViewer::GraphicsWindowWin32::WindowData wdata = new
osgViewer::GraphicsWindowWin32::WindowData( GetSafeHwnd() );
traits-inheritedWindowData = wdata.get();
osg::ref_ptrosg::GraphicsContext gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
if ( gc.valid() ) {
viewer-getCamera()-setGraphicsContext(gc.get());
viewer-getCamera()-setViewport(new osg::Viewport(0,0, traits-width,
traits-height));
}

///
viewer-setSceneData( createGeode().get() );
viewer-setCameraManipulator(new osgGA::TrackballManipulator);
viewer-addEventHandler(new osgViewer::StatsHandler);
viewer-realize();

//
*
   but I cannot enable the Node viewer to auto-rotate just as the
demos in the tutorial on site of www.openscenegraph.orgon the events of
mouseButtonPress(x,y,1) or mouseButtonPress(x,y,3) and
mouseButtonRelease(x,y,1) or mouseButtonRelease(x,y,3).

  what's the problem in the code?  Thanks!

  xiaodong





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


Re: [osg-users] osgdot - a tool to generate a picture ofascenegraph'sstructure

2007-11-22 Thread Paul Melis
Hello Alberto,

Alberto Luaces wrote:

It doesn't compile out of the box on 64bit, because of the casts from pointer 
to 'unsigned int'. Changing those casts to 'unsigned long' works, but it is 
an ugly hack.
  

I could not come up with a better way to store an object's identity. 
The actual memory location where a node is stored is about the only 
fixed reference to it.
Perhaps defining a pointer type with

#ifdef 32 bit
typedef unsigned int pointer;
#elif 64
typedef unsigned long int pointer;
#endif

and then using the pointer type everywhere is a better solution.

Paul

El Thursday 15 November 2007 18:14:23 Mike Weiblen escribió:
  

whups, moved it to

http://osgtoy.svn.sourceforge.net/viewvc/osgtoy/osgtoy/trunk/application
s/osgdot/

-- mew



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Mike Weiblen
Sent: Thursday, November 15, 2007 10:58 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgdot - a tool to generate a
picture ofascenegraph'sstructure

  

-Original Message-
On Nov 15, 2007 4:35 PM, Mike Weiblen [EMAIL PROTECTED]

wrote:


Very cool!  Maybe whip up a plugin Writer wrapper around it,
permitting

osgconv cow.osg cow.dot

Then, what about enabling that osgdb_dot.dll plugin as a
  

Reader as well?



;-O
  

I love the sound of some one volunteering :-D


Heh, more than you think: I put the source in the osgToy SVN
for safekeeping and further refinement.  I'm glad to move it
to OSG core SVN later if you wish.

See
http://osgtoy.svn.sourceforge.net/viewvc/osgtoy/osgtoy/trunk/s
rc/osgToy/
osgdot.cpp

In the mean time, I'm glad to accept code submissions.  Pls
submit them via the osgToy SourceForge Tracker
http://sourceforge.net/tracker/?group_id=139833

cheers
-- mew
  



  



___
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 get the near(or far) plane

2007-11-22 Thread Robert Osfield
Hi Andreas,

viewer-getCamer()-getProjectionMatrix*() methods will give you the
projection matrix/and its settings.

Robert.

On Nov 22, 2007 10:50 AM,  [EMAIL PROTECTED] wrote:
 Hello.
 I need the near plane of the osgViewer::Viewer camera.
 The FAQ says:
 Q 21. If I let OpenSceneGraph calculate my near and far clipping planes, how 
 do I get them?
 A: This info is available through the cull visitor, so:
 sceneView-getCullVisitor()-getCalculatedNearPlane();
 sceneView-getCullVisitor()-getCalculatedFarPlane();

 Then I searched the mail list archive and found this in a respons to a 
 question about how to retrive the SceneView in osg 2.0:
 However, the SceneView is not accessible to osgViewer-based apps. osgViewer
 treats SceneView as an internal object, part of the implementation, which
 might go away in the future.

 The question is how can i get the near plane when using osg::Viewer?
 Can I use osg::Camera::getProjectionMatrixAsPerspective(...)?

 Andreas Lindmark

 =
 BLT Roll-Out Garage Flooring(R)
 Beautifies the garage in minutes and protects the floor for years.
 http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=46742104b51b3787b43a47c84733c172


 --
 Powered by Outblaze
 ___
 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 get the near(or far) plane

2007-11-22 Thread person1001
Hello.
I need the near plane of the osgViewer::Viewer camera. 
The FAQ says:
Q 21. If I let OpenSceneGraph calculate my near and far clipping planes, how 
do I get them?
A: This info is available through the cull visitor, so:
sceneView-getCullVisitor()-getCalculatedNearPlane();
sceneView-getCullVisitor()-getCalculatedFarPlane();

Then I searched the mail list archive and found this in a respons to a question 
about how to retrive the SceneView in osg 2.0:
However, the SceneView is not accessible to osgViewer-based apps. osgViewer
treats SceneView as an internal object, part of the implementation, which
might go away in the future.

The question is how can i get the near plane when using osg::Viewer?
Can I use osg::Camera::getProjectionMatrixAsPerspective(...)?

Andreas Lindmark

=
BLT Roll-Out Garage Flooring®
Beautifies the garage in minutes and protects the floor for years.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=46742104b51b3787b43a47c84733c172


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


Re: [osg-users] How to enable the auto-rotate affect on a TrackballManipulator, ( win32mfc )

2007-11-22 Thread Wu Xiaodong
Hi. Robert.

Thanks for ur respond, I have read the code osgAnimation. I used some
confused word to describe my problem. ( :( bad English, my native laguage is
Chinese ).

 What i want to know is that how the camera can  go along its latest
way(or path),

 For example, I drag the focus of camera ( trackball-manipulator ) from
left to right on a window, then the camera should go around  the trackball
of the scene from a position to anothion. when I release the button, the
camera can continue along its latest way( or path ) at a speed.  when i drag
from right to left, the camera go reversely and can go along with its new
path.

I failed to enable the camera continue along its latest way. when i
release the button, the scene ceased, too.

Thanks.


xiaodong



On Nov 22, 2007 5:42 PM, Robert Osfield [EMAIL PROTECTED] wrote:

 Hi Xiaodong,

 The TrackballManipulator is just for user interaction with the camera
 position, its does support throwing which is activated by the user
 releasing a mouse button while still moving the mouse.  It sounds like
 this is not what you want though.

 To general rotate objects in the scene the way to do is to place a
 Transform node of some type (i.e.
 osg::MatrixTransform/PositionAttitudeTransform) and then attached an
 osg::AnimationPathCallback to it, or to attach a
 osgUtil::TransformCallback the later is deprecated though.  With an
 AnimationPath you can define any combination of scaling, rotation and
 translation.  Have a look at the osganimation example.

 Robert.

 On Nov 22, 2007 9:34 AM, Wu Xiaodong [EMAIL PROTECTED] wrote:
 
  Hi, Everyone:
 
I am a total begginer user of OSG for 3 days.
 
How can i enable the auto-rotate effect on a TrackballManipulator?
 
I have attached a osgViewer::viewer to a window on Win32.(
 windiow+MFC
  ) by following code.
 
   viewer = new osgViewer::Viewer;
   osg::ref_ptrosg::GraphicsContext::Traits traits = new
  osg::GraphicsContext::Traits;
   traits-x = 0;
   traits-y = 0;
   traits-width = rc.Width();
   traits-height = rc.Height();
  .
 
 /
   osg::ref_ptrosgViewer::GraphicsWindowWin32::WindowData wdata = new
  osgViewer::GraphicsWindowWin32::WindowData( GetSafeHwnd() );
   traits-inheritedWindowData = wdata.get();
   osg::ref_ptrosg::GraphicsContext gc =
  osg::GraphicsContext::createGraphicsContext( traits.get());
   if ( gc.valid() ) {
  viewer-getCamera()-setGraphicsContext( gc.get());
   viewer-getCamera()-setViewport(new osg::Viewport(0,0, traits-width,
  traits-height));
   }
  
 
 
 ///
   viewer-setSceneData( createGeode().get() );
   viewer-setCameraManipulator(new osgGA::TrackballManipulator);
   viewer-addEventHandler(new osgViewer::StatsHandler);
   viewer-realize();
 
  //
 but I cannot enable the Node viewer to auto-rotate just as the
  demos in the tutorial on site of www.openscenegraph.orgon the events
 of
  mouseButtonPress(x,y,1) or mouseButtonPress(x,y,3) and
  mouseButtonRelease(x,y,1) or mouseButtonRelease(x,y,3).
 
what's the problem in the code?  Thanks!
 
xiaodong
 
 
 
 
 
 
  --
  xiaodong Wu.
 
  ___
  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] non-writable object....

2007-11-22 Thread Emmanuel Roche
It's me again :-)

Just a simple question again, concerning the plugins this time:

suppose I have a graph with some kind of nodes that should NOT be written to
file when I save the graph... I guess the only solution is to remove those
nodes before writing the file no ? I mean, there is no way to remove a
child in the writing process or to write an empty object in the file, I
guess ?

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


[osg-users] nodemask and traversals

2007-11-22 Thread Emmanuel Roche
hi again,


Just something about the nodemasks: suppose  i want to stop drawing an
object, all the examples I've seen say claeraly that I have to set
node-setNodeMask(0x0), but suppose now that I really want to change only
one bit in this mask: where should I look for the bit field against which
this mask is checked ? (and the overriding bit field I guess...)

I though only the first bit was checked, but it is not the case, as an
object with the mask 0x0010 is also drawn for instance...

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


Re: [osg-users] nodemask and traversals

2007-11-22 Thread Robert Osfield
Hi Manu,

You need to match the NodeMask bits to the TraversalMask bits for each
of the NodeVisitors.  The osg::Camera has  setCullMask method that you
can use for the case of the cull traversal.  Note Camera inherits from
osg::CullSettings which is where setCullMask is inherited from.

Robert.

On Nov 22, 2007 11:54 AM, Emmanuel Roche [EMAIL PROTECTED] wrote:
 hi again,


 Just something about the nodemasks: suppose  i want to stop drawing an
 object, all the examples I've seen say claeraly that I have to set
 node-setNodeMask(0x0), but suppose now that I really want to change only
 one bit in this mask: where should I look for the bit field against which
 this mask is checked ? (and the overriding bit field I guess...)

 I though only the first bit was checked, but it is not the case, as an
 object with the mask 0x0010 is also drawn for instance...

 Manu.


 ___
 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] non-writable object....

2007-11-22 Thread Robert Osfield
Hi Manu,

The .osg and .ive plugins don't have any support for switch off the
writing of specific nodes.

Robert.

On Nov 22, 2007 11:59 AM, Emmanuel Roche [EMAIL PROTECTED] wrote:
 It's me again :-)

 Just a simple question again, concerning the plugins this time:

 suppose I have a graph with some kind of nodes that should NOT be written to
 file when I save the graph... I guess the only solution is to remove those
 nodes before writing the file no ? I mean, there is no way to remove a
 child in the writing process or to write an empty object in the file, I
 guess ?

 Manu.
 ___
 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] nodemask and traversals

2007-11-22 Thread Ralph Kern
The nodeMask is checked against the cameras cullMask (see
osg::CullSettings::setCullMask()) . Any bit set in both masks will
result in the node been drawn.

Ralph

Emmanuel Roche schrieb:
 hi again,
 
 
 Just something about the nodemasks: suppose  i want to stop drawing an
 object, all the examples I've seen say claeraly that I have to set
 node-setNodeMask(0x0), but suppose now that I really want to change
 only one bit in this mask: where should I look for the bit field against
 which this mask is checked ? (and the overriding bit field I guess...)
 
 I though only the first bit was checked, but it is not the case, as an
 object with the mask 0x0010 is also drawn for instance...
 
 Manu.
 

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


Re: [osg-users] non-writable object....

2007-11-22 Thread Ralph Kern
Could you use a derived class without read/write support?

Ralph

Robert Osfield schrieb:
 Hi Manu,
 
 The .osg and .ive plugins don't have any support for switch off the
 writing of specific nodes.
 
 Robert.
 
 On Nov 22, 2007 11:59 AM, Emmanuel Roche [EMAIL PROTECTED] wrote:
 It's me again :-)

 Just a simple question again, concerning the plugins this time:

 suppose I have a graph with some kind of nodes that should NOT be written to
 file when I save the graph... I guess the only solution is to remove those
 nodes before writing the file no ? I mean, there is no way to remove a
 child in the writing process or to write an empty object in the file, I
 guess ?

 Manu.
 ___
 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 enable the auto-rotate affect on a TrackballManipulator, ( win32mfc )

2007-11-22 Thread Robert Osfield
Hi Xiaodong,

Is just that you can't throw i.e. when you release the mouse whilst
moving the camera just stops rather continuing with the same motion?

Robert.

On Nov 22, 2007 11:45 AM, Wu Xiaodong [EMAIL PROTECTED] wrote:
 Hi. Robert.

 Thanks for ur respond, I have read the code osgAnimation. I used some
 confused word to describe my problem. ( :( bad English, my native laguage is
 Chinese ).

  What i want to know is that how the camera can  go along its latest
 way(or path),

  For example, I drag the focus of camera ( trackball-manipulator ) from
 left to right on a window, then the camera should go around  the trackball
 of the scene from a position to anothion. when I release the button, the
 camera can continue along its latest way( or path ) at a speed.  when i drag
 from right to left, the camera go reversely and can go along with its new
 path.

 I failed to enable the camera continue along its latest way. when i
 release the button, the scene ceased, too.

 Thanks.


 xiaodong





 On Nov 22, 2007 5:42 PM, Robert Osfield [EMAIL PROTECTED] wrote:
  Hi Xiaodong,
 
  The TrackballManipulator is just for user interaction with the camera
  position, its does support throwing which is activated by the user
  releasing a mouse button while still moving the mouse.  It sounds like
  this is not what you want though.
 
  To general rotate objects in the scene the way to do is to place a
  Transform node of some type (i.e.
  osg::MatrixTransform/PositionAttitudeTransform) and then attached an
  osg::AnimationPathCallback to it, or to attach a
  osgUtil::TransformCallback the later is deprecated though.  With an
  AnimationPath you can define any combination of scaling, rotation and
  translation.  Have a look at the osganimation example.
 
  Robert.
 
 
 
 
  On Nov 22, 2007 9:34 AM, Wu Xiaodong [EMAIL PROTECTED] wrote:
  
   Hi, Everyone:
  
 I am a total begginer user of OSG for 3 days.
  
 How can i enable the auto-rotate effect on a TrackballManipulator?
  
 I have attached a osgViewer::viewer to a window on Win32.(
 windiow+MFC
   ) by following code.
  
viewer = new osgViewer::Viewer;
osg::ref_ptrosg::GraphicsContext::Traits traits = new
   osg::GraphicsContext::Traits;
traits-x = 0;
traits-y = 0;
traits-width = rc.Width();
traits-height = rc.Height();
   .
  
 /
osg::ref_ptrosgViewer::GraphicsWindowWin32::WindowData wdata = new
   osgViewer::GraphicsWindowWin32::WindowData( GetSafeHwnd() );
traits-inheritedWindowData = wdata.get();
osg::ref_ptrosg::GraphicsContext gc =
   osg::GraphicsContext::createGraphicsContext( traits.get());
if ( gc.valid() ) {
   viewer-getCamera()-setGraphicsContext( gc.get());
viewer-getCamera()-setViewport(new osg::Viewport(0,0, traits-width,
   traits-height));
}
   
  
  
 ///
viewer-setSceneData( createGeode().get() );
viewer-setCameraManipulator(new osgGA::TrackballManipulator);
viewer-addEventHandler(new osgViewer::StatsHandler);
viewer-realize();
  
   //
  but I cannot enable the Node viewer to auto-rotate just as the
   demos in the tutorial on site of www.openscenegraph.orgon the events
 of
   mouseButtonPress(x,y,1) or mouseButtonPress(x,y,3) and
   mouseButtonRelease(x,y,1) or mouseButtonRelease(x,y,3).
  
 what's the problem in the code?  Thanks!
  
 xiaodong
  
  
  
  
  
  
   --
   xiaodong Wu.
  
   ___
   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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG 2.2.0 on Windows ( Could not find plugin )

2007-11-22 Thread Samuele Pierattini
Hello,
i have install on my pc with Windwos XP SP2 osg2.0.0
(Win32 Binaries Zip file) This version is run ok.

Now i have installed version osg2.2.0 (Win32 Binaries Zip file and I 
tried even Win32 Binaries Installer), and unistalled osg2.0.0,  but when 
i run osgviewer cow.osg this is the response:
Warning: Could not find plugin to read objects from file cow.osg.
osgviewer: No data loaded

These are the environment variables that i have set:
set OSG_ROOT=C:\OpenSceneGraph
set 
OSG_FILE_PATH=%OSG_ROOT%\data;%OSG_ROOT%\data\Images;%OSG_ROOT%\data\fonts
set 
OSG_LIBRARY_PATH=C:\OpenSceneGraph\bin\osgPlugins-2.2.0;C:\OpenSceneGraph\bin;
set PATH=C:\OpenSceneGraph\bin;C:\OpenSceneGraph\bin\osgPlugins-2.2.0;

I have run the example also with the set OSG_NOTIFY_LEVEL=DEBUG
and this is the response:

C:\OpenSceneGraph\binosgviewer cow.osg
GraphicsContext::setWindowingSystemInterface() 00FCE2B8 10175E00
CullSettings::readEnvironmentalVariables()
Render::Render() 00FC30E8
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
_availableQueue.size()=2
DriveManipulator::_height set to ==1.5
CullSettings::readEnvironmentalVariables()
Render::Render() 014D7930
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
_availableQueue.size()=2
CullSettings::readEnvironmentalVariables()
Render::Render() 014DA038
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
CullSettings::readEnvironmentalVariables()
_availableQueue.size()=2
itr='C:\OpenSceneGraph\bin\osgPlugins-2.2.0'
FindFileInPath() : trying 
C:\OpenSceneGraph\bin\osgPlugins-2.2.0\osgPlugins-2.2.
0\osgdb_osg.dll ...
itr='C:\OpenSceneGraph\bin'
FindFileInPath() : trying 
C:\OpenSceneGraph\bin\osgPlugins-2.2.0\osgdb_osg.dll .
..
FindFileInPath() : USING 
C:\OpenSceneGraph\bin\osgPlugins-2.2.0\osgdb_osg.dll
DynamicLibrary::failed loading osgPlugins-2.2.0/osgdb_osg.dll
Warning: Could not find plugin to read objects from file cow.osg.
osgviewer: No data loaded
Viewer::~Viewer():: start destructor getThreads = 0
Viewer::~Viewer() end destrcutor getThreads = 0
Destructing osgViewer::View
Render::~Render() 014D7930
Render::~Render() 014DA038
Destructing osg::View
Render::~Render() 00FC30E8
Done destructing osg::View
GraphicsContext::setWindowingSystemInterface()  10175E00

This message for me is strange:
DynamicLibrary::failed loading osgPlugins-2.2.0/osgdb_osg.dll


There are problems with version osg2.2.0 on windwos or i have
commit errors?

Regards

-- 
Samuele Pierattini
ENEA FIM-INFOGER-BOL
E-Mail [EMAIL PROTECTED]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Creating shapes using Geometry

2007-11-22 Thread Renan Mendes
Hi, thanks for the interest in helping.

But the thing is: I need these shapes to be created from the osg::Geometry
class, as a matter of compatibility with another class. Do you know how to
create the specific shapes I told you about (sphere, cylinder and box)?
Thanks.

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


[osg-users] screen capture with multiple cameras

2007-11-22 Thread sherman wilcox
I want to capture my OSG screen and dump it to a jpeg or png file. My
understanding is to attach a callback to the main osgViewer camera and
perform a osg::Image::readPixels(...) from within the callback. That
works in the simple case. But, if I have a basic HUD that is itself a
camera alongside other nodes in the scenegraph, then I never see the
HUD in my osg::Image::readPixels call. That would make sense since my
callback is operating on the main camera and not my child node
camerabut leaves the question of how do I perform a complete
screen capture on a graph with multiple cameras?

Is there an example I missed?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Creating shapes using Geometry

2007-11-22 Thread Jean-Sébastien Guay
Hello Renan,

 But the thing is: I need these shapes to be created from the osg::Geometry
 class, as a matter of compatibility with another class. Do you know how to
 create the specific shapes I told you about (sphere, cylinder and box)?

Your question could be two things:

a) If you're asking how to specify vertex coordinates and indices in  
order to make a model in an osg::Geometry, then look at the tutorials  
that were mentioned. It's basically down to filling vertex and index  
arrays, and those tutorials have example code. You can also look at  
the osggeometry example.

b) If you're asking how to calculate the appropriate vertices and  
indices to make a sphere, a cylinder or a box, then it's a purely  
mathematical exercise. For a box it's simple... For a sphere and a  
cylinder, there are a few ways, I urge you to try it yourself (hint: a  
bunch of vectors going in different directions around the origin, when  
normalized, will give a coarse or fine approximation of a circle,  
depending on how many vectors you used).

If you're really in a hurry I'm sure I can dig up some old code, but  
really, it's an exercise that's given in any basic Computer Graphics  
course (and the old code I would give you is exactly that, the answers  
I gave to that exercise in my basic Computer Graphics course :-) ).

You could also load up Blender, make a sphere or a cylinder, and  
export it to .osg with osgExporter (or any other format you can read -  
or any other modeling tool you have). But doing it mathematically is  
pretty easy too.

Good luck,

J-S
-- 
__
Jean-Sebastien Guay [EMAIL PROTECTED]
 http://whitestar02.webhop.org/


This message was sent using IMP, the Internet Messaging Program.


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


Re: [osg-users] screen capture with multiple cameras

2007-11-22 Thread Berg, Michael
sherman wilcox wrote:
 I want to capture my OSG screen and dump it to a jpeg or png file. My
 understanding is to attach a callback to the main osgViewer camera and
 perform a osg::Image::readPixels(...) from within the callback. That
 works in the simple case. But, if I have a basic HUD that is itself a
 camera alongside other nodes in the scenegraph, then I never see the
 HUD in my osg::Image::readPixels call. That would make sense since my
 callback is operating on the main camera and not my child node
 camerabut leaves the question of how do I perform a complete
 screen capture on a graph with multiple cameras?
 
 Is there an example I missed?
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Sherman,

I recently ran into the same problem on this list.
Robert Osfield responded with some comments on how it might one-day be
done more cleanly, but that Until these methods are added, you'll need
to make do with a post draw callback on the last camera to be drawn.

If your HUD is the last camera drawn, set the post draw callback on your
HUD camera, and it will be a complete screen capture.

- Michael

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


Re: [osg-users] CMake Search Paths ?

2007-11-22 Thread Martin Spott
Hi Eric,

E. Wing wrote:

 1) Use the ccmake instead of cmake. It exists for this very reason and
 is the easiest, most reliable answer. (I constantly beg people to use
 this so we don't get these kinds of questions over and over.)

Well, this is the old story we've already had before the 2.0 release:
I guess quite a lot of people build stuff like OSG as part of a batch
or at least using a predefined script.
If you disallow these people to modify the required flags on the 'cmake'
command line, then you force all these people to create their very
private hack and it's no surprise that people ask why they have to do
so .

So, telling people about the shiny world of 'ccmake' and begging for
procedures that are _highly_impractical_ on many people's setup is one
thing, getting things with command line flags _really_ sorted out isn't
a bad option either. I'm very curious to know if the solutions, which
you've been proposing here, actually did the job.

Cheerio,
Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org