[osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread manish Choudhary
Hi,
I'm working on problem in which user develop composite  shape like building , 
hut , table etc. by arranging basic shape like cylinder,cube,hemisphere etc. 
using picking operation. 
Right now basic shape overlap each other , which is not required in my 
application . Therefore I need collision technique to avoid these overlap .

I also need corresponding set of intersection point where two object intersect 
during collision.  

So here are my questions : 
1. How to perform collision in OSG ? any tutorial 
2. How to get Intersection point where two object meet ? 

Can somebody please help me regarding this
... 

Thank you!

Cheers,
manish

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37640#37640





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


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread Sergey Polischuk
Hi,

Osg dont have this features, you should use another libraries for this (like 
physics simulation libraries).

Cheers,
Sergey.

16.03.2011, 13:36, manish Choudhary osgfo...@tevs.eu:
 Hi,
 I'm working on problem in which user develop composite  shape like building , 
 hut , table etc. by arranging basic shape like cylinder,cube,hemisphere etc.
 using picking operation.
 Right now basic shape overlap each other , which is not required in my 
 application . Therefore I need collision technique to avoid these overlap .

 I also need corresponding set of intersection point where two object 
 intersect during collision.

 So here are my questions :
 1. How to perform collision in OSG ? any tutorial
 2. How to get Intersection point where two object meet ?

 Can somebody please help me regarding this
 ...

 Thank you!

 Cheers,
 manish

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=37640#37640

 ___
 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] Multitexture in Shader

2011-03-16 Thread Sergey Polischuk
Hi, Linda

If it works in your code, you can take screenshots with 
osgViewer::ScreenCaptureHandler (in osgViewer/ViewerEventHandlers header) 
without using osgscreencapture stuff.

Cheers,
Sergey.

16.03.2011, 08:53, Linda Lee zenith...@hotmail.com:
 Hi,

 I did some testing.  The code seems to work properly until I try to put them 
 into the osgsceencapture sample to do sceenshot.  It seems that only the 
 first texture is successfully passed to the shader program.  Any idea why it 
 does not work?  Or is there a way to pass multiple textures into the shader 
 program and still able to work in the osgscreencapture code and to do 
 screenshot?

 Thank you!

 Cheers,
 Linda

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=37639#37639

 ___
 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] osgviewer.exe has stopped working

2011-03-16 Thread John Kyles
Hello! I have a slight problem that I believe is probably easily corrected I 
just do not know how to correct it at the moment and am hoping somewhere here 
may shed some light on the existing problem. I have two systems running 64bit 
Windows 7 OS. My osgviewer works and runs fine on system 1, the exact same 
copy/installation on system 2 however is not operating properly. I get the 
error osgviewer.exe has stopped working and that is all I get. I am curious 
if anyone knows why this would be happening and how to correct it? Thank you 
for the help/assistance.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37653#37653





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


[osg-users] Interest in new releases of 2.8.x?

2011-03-16 Thread Chris 'Xenon' Hanson
  As you may know, the 2.8.3 release dates from April 5, 2010, almost a year 
ago.

  It lacks a number of things people have wished to see, including the ability 
to build on
VC++2010. Changes for this have been recently posted.

  The 2.8 branch is held in high regard by a number of organizations who cannot 
track 2.9
for various reasons. As such, we should probably begin to seriously consider a 
new 2.8
release to incorporate critical things various people have needed.

  In private discussion with some of my colleagues, we've talked about the idea 
of
fielding a 2.8.3.1 solely to incorporate the VC++2010 build fixes. This would 
be binary
API and functionality identical to 2.8.3 and would ONLY incorporate changes to 
the build
process necessary to build on VC++2010. Building it on VC++2008 and ALL other 
platforms
should result in binaries identical to 2.8.3, so it's a drop in replacement for 
2.8.3.
This library would use all the same version numbers as 2.8.3.

  Discussion on the merits of this are requested.


  Beyond 2.8.3, we'd like to discuss a possible 2.8.4. Paul Martz, who 
spearheaded 2.8.3
has write permission to the OSG branch repo and is willing to commit patches 
made against
the branch, but doesn't have bandwidth to actually backport any changes or do 
any testing.
His role in a 2.8.4 release would solely be to tell and guide us on how to 
follow his process.

  So if a 2.8.4 release is going to happen, plan to either submit a patch 
against the
branch (as for any OSG change request), or contribute.

  First, I'd like to open discussion about whether a 2.8.4 release is warranted.

  Secondly, if you believe it is warranted, what features from trunk do you 
think are
CRITICAL to have in the 2.8 branch? Keep in mind, there's a 3.0 release coming 
someday. we
don't want to turn 2.8 INTO 2.9 or 3.0. There are breaking architectural 
changes (some
minor, some less so) between 2.8 and 2.9, and some organizations won't take a 
2.8.4 that
has big breaking changes.

  Thirdly, if there's a feature you want backported, you need to plan to either 
volunteer
to do it yourself, or contribute some funding for someone else to do it.

  Finally, we'll need people committed to testing the branch to see if it's 
ready for release.


  Discuss.


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgviewer.exe has stopped working

2011-03-16 Thread Robert Osfield
Hi John,

I'm not a windows dev so can't help with the specifics of Windows
issues, but I'd guess that even experienced Windows might be clutching
at straws guess what might be amiss.   Far more helpful to everyone is
details such as graphics hardware and drivers on the two machines.
Is one machine a dev system with different sets of libs on, etc.  Try
to think about all the various factors that might differentiate each
system and pass these on.

Robert.

On Wed, Mar 16, 2011 at 5:00 PM, John Kyles jo...@wildbluetech.com wrote:
 Hello! I have a slight problem that I believe is probably easily corrected I 
 just do not know how to correct it at the moment and am hoping somewhere here 
 may shed some light on the existing problem. I have two systems running 64bit 
 Windows 7 OS. My osgviewer works and runs fine on system 1, the exact same 
 copy/installation on system 2 however is not operating properly. I get the 
 error osgviewer.exe has stopped working and that is all I get. I am curious 
 if anyone knows why this would be happening and how to correct it? Thank you 
 for the help/assistance.

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=37653#37653





 ___
 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] Interest in new releases of 2.8.x?

2011-03-16 Thread Robert Osfield
Hi Chris,

I'm all for an 2.8.4 release.  It will require other members of the
community to manage the reelase though as I'm absolutely maxed out at
present.  There has been lots of discussion over the last couple of
years about having the community take a more active role in stable
release maintenaince, and there is a number of members of the
community that have write access to the branches portion of the
website, I'm afraid I can't recall all of them off the top of my head
- Paul Martz is obviously one of them ;-)

If you or others wish to take the reigns on making a 2.8.4 release
then I'd welcome this, and we can't get server admin, Jose Luis
Hidalgo, to add the required permissions.

The next step would be to merge any submissions that are specific to
the 2.8 branch.

Robert.

On Wed, Mar 16, 2011 at 5:13 PM, Chris 'Xenon' Hanson
xe...@alphapixel.com wrote:
  As you may know, the 2.8.3 release dates from April 5, 2010, almost a year 
 ago.

  It lacks a number of things people have wished to see, including the ability 
 to build on
 VC++2010. Changes for this have been recently posted.

  The 2.8 branch is held in high regard by a number of organizations who 
 cannot track 2.9
 for various reasons. As such, we should probably begin to seriously consider 
 a new 2.8
 release to incorporate critical things various people have needed.

  In private discussion with some of my colleagues, we've talked about the 
 idea of
 fielding a 2.8.3.1 solely to incorporate the VC++2010 build fixes. This would 
 be binary
 API and functionality identical to 2.8.3 and would ONLY incorporate changes 
 to the build
 process necessary to build on VC++2010. Building it on VC++2008 and ALL other 
 platforms
 should result in binaries identical to 2.8.3, so it's a drop in replacement 
 for 2.8.3.
 This library would use all the same version numbers as 2.8.3.

  Discussion on the merits of this are requested.


  Beyond 2.8.3, we'd like to discuss a possible 2.8.4. Paul Martz, who 
 spearheaded 2.8.3
 has write permission to the OSG branch repo and is willing to commit patches 
 made against
 the branch, but doesn't have bandwidth to actually backport any changes or do 
 any testing.
 His role in a 2.8.4 release would solely be to tell and guide us on how to 
 follow his process.

  So if a 2.8.4 release is going to happen, plan to either submit a patch 
 against the
 branch (as for any OSG change request), or contribute.

  First, I'd like to open discussion about whether a 2.8.4 release is 
 warranted.

  Secondly, if you believe it is warranted, what features from trunk do you 
 think are
 CRITICAL to have in the 2.8 branch? Keep in mind, there's a 3.0 release 
 coming someday. we
 don't want to turn 2.8 INTO 2.9 or 3.0. There are breaking architectural 
 changes (some
 minor, some less so) between 2.8 and 2.9, and some organizations won't take a 
 2.8.4 that
 has big breaking changes.

  Thirdly, if there's a feature you want backported, you need to plan to 
 either volunteer
 to do it yourself, or contribute some funding for someone else to do it.

  Finally, we'll need people committed to testing the branch to see if it's 
 ready for release.


  Discuss.


 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
 http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
 Contracting.
    There is no Truth. There is only Perception. To Perceive is to Exist. - 
 Xen
 ___
 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] Interest in new releases of 2.8.x?

2011-03-16 Thread Chris 'Xenon' Hanson
On 3/16/2011 11:21 AM, Robert Osfield wrote:
 I'm all for an 2.8.4 release.

  Excellent.

 It will require other members of the
 community to manage the reelase though as I'm absolutely maxed out at
 present.

  That was pretty much the initial assumption. ;)

 There has been lots of discussion over the last couple of
 years about having the community take a more active role in stable
 release maintenaince, and there is a number of members of the
 community that have write access to the branches portion of the
 website, I'm afraid I can't recall all of them off the top of my head
 - Paul Martz is obviously one of them ;-)
 If you or others wish to take the reigns on making a 2.8.4 release
 then I'd welcome this, and we can't get server admin, Jose Luis
 Hidalgo, to add the required permissions.

  Excellent.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Interest in new releases of 2.8.x?

2011-03-16 Thread David Glenn
I'm a bit confused here! Was there supposed to be a 3.0 release at some time, 
or was that the development release? 

Whatever became of that? 

I’m still using 2.8.2 because of requirement placed on me by my client but I 
somehow got lost out on the deference’s between the release and the what has 
been in development in the past 6 months. 

I kind of figured that a stable version of that development code would be the 
new released code by now, why not?

... 

D Glenn


D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37658#37658





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


Re: [osg-users] osgviewer.exe has stopped working

2011-03-16 Thread John Kyles
Yeah I understand, it's kind of a grasp in thin air, but this is the info on 
the two systems. The working one is a Macbook Pro running Bootcamp, the other 
one is a Mac Pro tower running Bootcamp. Hardware specs:

MBPro:
M 640 2.8 Ghz Intel Core i7
8 GB 1067 Mhz DDR3

MPro Tower:
X5650 2x2.66 Ghz Intel six core Intel Xeon
16 GB 1333 Mhz DDR3

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37659#37659





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


Re: [osg-users] Interest in new releases of 2.8.x?

2011-03-16 Thread Robert Osfield
Hi David,

On Wed, Mar 16, 2011 at 5:32 PM, David Glenn david.e.glenn@navy.mil wrote:
 I'm a bit confused here! Was there supposed to be a 3.0 release at some time, 
 or was that the development release?

 Whatever became of that?

3.0 is my personal focus, but I've been rather swamped with client
work in the last couple of months so haven't had a window to push out
3.0.   In the run up to 3.0 I'll be making more 2.9.x releases.

Maintaince releases of other stable releases, i,e, 2.6.x, or 2.8.x are
possible at any time of year, and are totally decoupled from the work
on developer releases, i.e. the 2.9.x branch and the effort to get 3.0
out the door.

 I’m still using 2.8.2 because of requirement placed on me by my client but I 
 somehow got lost out on the deference’s between the release and the what has 
 been in development in the past 6 months.

 I kind of figured that a stable version of that development code would be the 
 new released code by now, why not?

Not enough time in the day to do all the work I need to do ;-|

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


Re: [osg-users] osgviewer.exe has stopped working

2011-03-16 Thread Robert Osfield
Hi John,

What are the graphics running on each system?

Robert.

On Wed, Mar 16, 2011 at 5:45 PM, John Kyles jo...@wildbluetech.com wrote:
 Yeah I understand, it's kind of a grasp in thin air, but this is the info on 
 the two systems. The working one is a Macbook Pro running Bootcamp, the 
 other one is a Mac Pro tower running Bootcamp. Hardware specs:

 MBPro:
 M 640 2.8 Ghz Intel Core i7
 8 GB 1067 Mhz DDR3

 MPro Tower:
 X5650 2x2.66 Ghz Intel six core Intel Xeon
 16 GB 1333 Mhz DDR3

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=37659#37659





 ___
 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] osgviewer.exe has stopped working

2011-03-16 Thread Torben Dannhauer
Hi John,


basically your setup should work, I do the same on my cpomputers.

I have a big Xeon computer and a usual laptop (NV 310M). I compile OSG in 32 
and 64 bit on the xeon machine and transfer the compiled result to my laptop.

I do not know your setup in detail, but I can give you my checklist/ how I do 
it:
* Ich have the same folder structure on both machines (D:\OpenSceneGraph)
* I have the 3rdParty Package on both computer 
(D:\OpenSceneGraph\3rdParty_x86_x64)
* I have OSG in the same folder (D:\OpenSceneGraph\OpenSceneGraph-2.9.12_x86|64)
* I have set the Environment variables properly (added the 3rdparty bin folder 
and the OSG bin folder to the path)

On my Win7 64bit this is enough.

Have you checked the windows system log to get more information why osgViewer 
fails?
Have use opened osgViewer with DependencyWalker to check if osgViewer misses 
some dlls?

Good Luck!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37662#37662





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


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread Kim Bale
Try osgBullet: http://code.google.com/p/osgbullet/

I'm using it for collisions.

Regards,

Kim.

http://code.google.com/p/osgbullet/
2011/3/16 Sergey Polischuk pol...@yandex.ru

 Hi,

 Osg dont have this features, you should use another libraries for this
 (like physics simulation libraries).

 Cheers,
 Sergey.

 16.03.2011, 13:36, manish Choudhary osgfo...@tevs.eu:
  Hi,
  I'm working on problem in which user develop composite  shape like
 building , hut , table etc. by arranging basic shape like
 cylinder,cube,hemisphere etc.
  using picking operation.
  Right now basic shape overlap each other , which is not required in my
 application . Therefore I need collision technique to avoid these overlap .
 
  I also need corresponding set of intersection point where two object
 intersect during collision.
 
  So here are my questions :
  1. How to perform collision in OSG ? any tutorial
  2. How to get Intersection point where two object meet ?
 
  Can somebody please help me regarding this
  ...
 
  Thank you!
 
  Cheers,
  manish
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=37640#37640
 
  ___
  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


Re: [osg-users] Collision Detection and getting intersection point between two object

2011-03-16 Thread Paul Martz

On 3/16/2011 1:18 PM, Kim Bale wrote:

Try osgBullet: http://code.google.com/p/osgbullet/

I'm using it for collisions.


FYI The posted osgBullet roadmap is no longer valid. I am planning to do some 
significant work on this project later in the year, including breaking out the 
dependency on the collision and dynamics libraries so that osgBullet can be used 
for collision-only. This should be done by the end of the year (sorry -- lots of 
other work in the queue ahead of this).

   -Paul

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


[osg-users] [osgOcean] PositionAttitudeTransform and NodeTrackerManipulator seem confused (I helped)

2011-03-16 Thread tim paige
Hi,

I am using oceanExample, and modified the boat transform to use a 
PositionAttitudeTransform instead of the MatrixTransform just because I wanted 
to learn a bit more and eventually go underwater with my model and fly around 
with perspective...

I was successful at orienting my boat and getting it placed at the right level 
and heading, and then desired to make it move. I used the callback to update 
the y direction in the transform, and my boat casually drifts away into the 
sunset.

Code:

if(boat.valid())
{
boat-setNodeMask( scene-getOceanScene()-getNormalSceneMask() | 
scene-getOceanScene()-getReflectedSceneMask() | 
scene-getOceanScene()-getRefractedSceneMask() );

osg::ref_ptrosg::PositionAttitudeTransform boatTransform = new 
osg::PositionAttitudeTransform;
//Name that NODE!
boatTransform-setName(BOAT);
boatTransform-addChild(boat.get());

const osg::BoundingSphere bs = boat-getBound();
boatTransform-setPivotPoint(bs.center());

osg::Vec3 boatPosit(0,100,1.5); 
boatTransform-setPosition( boatPosit );
boatTransform-setAttitude(osg::Quat( osg::DegreesToRadians(90.0) , 
osg::Vec3(0,0,1) ));

boatTransform-setUpdateCallback( new 
BoatPositionCallback(scene-getOceanScene()) );

scene-getOceanScene()-addChild(boatTransform.get());   
}





Hey... I'm no good at flying after it with my clutzy mouse skills, so I 
wondered if I could get the camera to do the work for me.

Wanting to follow my boat into the sunset on it's perilous journey, I attempted 
to implement a FOLLOW_ME camera mode in the SceneEventHandler. I did what 
basics I could glean from whatever sources I could, and had limited success... 
At least I could see water. My boat was traveling perhaps with the camera, but 
I couldn't find it no matter what position and distance I placed it. I need 
some clues here... 


Code:

else if (_currentCameraMode == TRACKBALL)
{
osgGA::NodeTrackerManipulator* nt = new osgGA::NodeTrackerManipulator();
//Find that NODE!   
osg::Node* trackedNode = 
_scene-findNamedNode(BOAT,_scene-getScene());  
if(!trackedNode)
return false;
nt-setNode(trackedNode);
nt-setTrackNode(trackedNode);
nt-setTrackerMode(osgGA::NodeTrackerManipulator::NODE_CENTER_AND_AZIM);
nt-setAutoComputeHomePosition(true);
nt-setMinimumDistance(100);
nt-setDistance(100);
nt-setElevation(100);
_currentCameraMode = FOLLOW_ME;
//_viewer.getCamera()-setViewMatrixAsLookAt( osg::Vec3f(0.f,0.f,20.f), 
//  osg::Vec3f(0.f,0.f,20.f)+osg::Vec3f(0.f,1.f,0.f), 
osg::Vec3f(0,0,1) );  
_viewer.setCameraManipulator(nt);
_textHUD-setCameraText(FOLLOW_ME);
}




Please note the commented out setViewMatrixAsLookAt... did not know wether it 
should be used or not?

I was wondering if perhaps (again) that the nodeTrackerManipulator is 
incompatible with a node which uses a PositionAttitudeTransform?
The reason I ask is that my mouse controls the position of whatever (the boat 
and camera presumably) in a very radical means. The slightest touch of the 
mouse causes wild swings of height, perspective or distance. Once I can find 
the surface of the water zooom! What might be going on here?

Thank you!

Cheers,
tim
Code:




--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37665#37665





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


[osg-users] ref_ptr rules

2011-03-16 Thread Yasser Asmi
I am new to OSG and while I understand the general reference counting rules, I 
am having some trouble finding all the ref_ptr rules we should be following.  
For instance most examples in OSG do not use ref_ptr on objects and also do not 
free them.  Sometime, these objects (Geometry, Vec3Array etc) are passed to 
methods.  It is not clear if the methods are refcounting etc.  Stepping through 
the source is a way to find out but I am looking for general guidance.  Is 
there a resource that talks about it?

Thank you!

Cheers,
Yasser

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37666#37666





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


Re: [osg-users] ref_ptr rules

2011-03-16 Thread Sergey Polischuk
Hi, Yasser

osg ref_ptr's are intrusive, and object's reference count get's incremented 
every time you create ref_ptr to this object, and it decrease every time this 
ref_ptr destroyed. Inside osg all objects that keep pointers on other objects 
use ref_ptr's for that purpose, so if you pass simple pointer to some osg 
object it'll be refcounted correctly. You can not use delete on objects pointer 
that can be wrapped in ref_ptr because they have protected destructor and free 
when there are no more references to them. If you get pointer and need to be 
sure that it will be valid over time, you should create ref_ptr out of this 
pointer (thus increasing ref count) and keep it instead. In general if you 
create osg objects that can be wrapped into ref_ptr's you should make ref_ptr 
out of object's pointer at some point (though this can happen inside osg code 
if you pass pointer to some osg object which keeps it with ref_ptr) or they 
will not be destructed.

Cheers,
Sergey.

16.03.2011, 23:59, Yasser Asmi ya...@amazon.com:
 I am new to OSG and while I understand the general reference counting rules, 
 I am having some trouble finding all the ref_ptr rules we should be 
 following.  For instance most examples in OSG do not use ref_ptr on objects 
 and also do not free them.  Sometime, these objects (Geometry, Vec3Array etc) 
 are passed to methods.  It is not clear if the methods are refcounting etc.  
 Stepping through the source is a way to find out but I am looking for general 
 guidance.  Is there a resource that talks about it?

 Thank you!

 Cheers,
 Yasser

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=37666#37666

 ___
 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] ref_ptr rules

2011-03-16 Thread Yasser Asmi
Thanks.  That makes sense but I still have a question.

If I am createing a new OSG object in my code, say osg:Geometry, and I know it 
will be passed to a osg method at some point.  How do I know if I should or 
should not wrap it in ref_ptr?  I'd think we should wrap it.  But I have seen a 
lot of examples that do not.  I am concerned about memory leaks.  

Cheers,
Yasser

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37668#37668





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


[osg-users] Download details: Microsoft Visual Studio 2010 Service Pack 1 (Installer)

2011-03-16 Thread Chris 'Xenon' Hanson
  VC++2010 SP1 is apparently out now.

https://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5


  I have one client who really wants to use OSG on 2010 (64-bit even!) and I'm 
curious
about people's experiences with stability. Is 2010 generating good solid 
binaries from the
OSG codebase, or are there still issues that we'll need to see if the SP1 fixes?

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Where is the projectosgcal?

2011-03-16 Thread Jason Oramo
Hi,
   I am trying to create a scene in which I want to add 3d models of humans and 
could control the human. I find some material and someone says Cal3d would 
help. So I want to use Cal3d with OSG. but how to use I don't kown and there 
isn't a osgcal project in osg-2.80.
So I was hoping to get some pointers as to how I can proceed ?
Thank you!

Cheers,
Jason

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=37671#37671





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


Re: [osg-users] ref_ptr rules

2011-03-16 Thread Ulrich Hertlein
On 17/03/11 11:33 , Yasser Asmi wrote:
 Thanks.  That makes sense but I still have a question.
 
 If I am createing a new OSG object in my code, say osg:Geometry, and I know 
 it will be
 passed to a osg method at some point.  How do I know if I should or should 
 not wrap it
 in ref_ptr?  I'd think we should wrap it.  But I have seen a lot of examples 
 that do
 not.  I am concerned about memory leaks.

Most of the examples create OSG objects, pass them on to another OSG object 
(where it will
be reference counted) and do not care about them afterwards.

If you keep a reference to the object (as well as pass it on to another OSG 
object) then
you must use a ref_ptr, otherwise it can be deleted and you end up with a 
dangling object.

This is okay:
void createStuff(osg::Group* group)
{
// This is okay, the drawable will be owned by the group
osg::Geometry* drawable = new osg::Geometry();
group-addChild(drawable);
}

But this is not:
class Stuff
{
osg::Geometry* _drawable;

void createStuff(osg::Group* group)
{
// Bad things waiting to happen...
_drawable = new osg::Geometry();
group-addChild(_drawable);
}
}

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