[osg-users] Problem using osgGA::TerrainManipulator

2009-09-01 Thread Ragnar Hammarqvist
Hi All

I am trying to set up a map view using a TerrainManipulator. But when my 
aplication is running I nead to press space in order to get somhing in the 
view that makes sense. Whene I remove the TerrainManipulator the view shows me 
what it is supose to. I gues that Im using the TerreinManipulator wrong in som 
sens but I can not figure out what.

I have the folowing code running when the view is initialized:



osg::ref_ptrosgViewer::View pViewC2   = new osgViewer::View;

osg::Camera* pCamera = new osg::Camera;
pViewC2-setCamera(pCameraC2);
pViewC2-getCamera()-setComputeNearFarMode(osgUtil::CullVisitor::ComputeNearFarMode::COMPUTE_NEAR_FAR_USING_PRIMITIVES);
pViewC2-getCamera()-setGraphicsContext(m_pCanvasC2);
pViewC2-getCamera()-setViewport(0, 0, nWidth, nHeight);
pViewC2-addEventHandler(new osgViewer::StatsHandler);

m_pRootC2 = new osg::Group;
m_pRootC2-setDataVariance(osg::Object::DYNAMIC);
m_pRootC2-addChild(getScene()-getMapRoot().get());
pViewC2-setSceneData(m_pRootC2);

osgGA::TerrainManipulator* pCameraManipulator = newosgGA::TerrainManipulator();
pViewC2-addEventHandler(pCameraManipulator);
pViewC2-setCameraManipulator(pCameraManipulator);

osg::Viewport* pViewportC2 = pViewC2-getCamera()-getViewport();
double dAspectRatio = pViewportC2-aspectRatio();

pViewC2-getCamera()-setProjectionMatrixAsPerspective(45.0,dAspectRatio,
100.0, 10.0);

osg::Vec3d eyePos, centerPos, upVec;
//Get hold of the vectors from our system
pTerrain-getInitialMapCamViewAsLookat(eyePos, centerPos, upVec);

osg::Matrixd mapCamViewMatrix;
mapCamViewMatrix.makeLookAt(
eyePos, centerPos, upVec);

pViewC2-getCamera()-setViewMatrix(mapCamViewMatrix);

pCameraManipulator-setByMatrix(mapCamViewMatrix);
pCameraManipulator-setNode(m_pRootC2);
pCameraManipulator-setHomePosition(
eyePos, centerPos, upVec);


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


Re: [osg-users] Far Nodes - geometry as background

2009-09-01 Thread Eric Pouliquen
Hi Chris, and thanks for your answer !

I understand your solution. How did you manage the Zbuffer clearing ? By 
setting a clearMask on a ClearNode ?

And what do you think we can do if we want very far nodes as you said-like a 
moon ? Do we need to do a pre-render by rendering to a texture or is there a 
simpler way ? i've read some lines about a local camera, but I didn't really 
understand how to disable the framebuffer clearing after the local camera has 
rendered the scene (in fact doing multipass rendering).

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





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


Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi again, I still have this problem...

when I use this code,

Code:

{
osg::MatrixList matrixList = geode-getWorldMatrices();
}


A memory assert fails with visual 2009 in debug mode.
It is like a bad pointer has been passed in
Do I use this function on a bad way ? 
Does anyone have any ideas ?

Thanks a lot

Cheers,
Sebastien

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





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


Re: [osg-users] possible bug in osg reader/writer for PagedLOD nodes

2009-09-01 Thread Robert Osfield
Hi Alex,

If your PagedLOD has no preloaded children then you have to set
USER_DEFINED_CENTER otherwise it's completely undefined.  I don't know
at what point you think there is a bug, as the default value of
CenterMode is USE_BOUDNDING_SPHERE_CENTER, so there is no need to
write it out to the .osg file.

I would recommend that you fix your set up of your PagedOD set that
you set USER_DEFINED_CENTER and then define the center appropriately
for your data.

Robert.

On Tue, Sep 1, 2009 at 1:42 AM, Pecoraro, Alexander
Nalexander.n.pecor...@lmco.com wrote:
 I think there is a bug in the osg reader/writer for PagedLOD nodes. If you
 set the LOD::CenterMode to USE_BOUNDING_SPHERE_CENTER then it doesn’t get
 written to the output .osg file because the writer ignores its value unless
 it is set to USER_DEFINED_CENTER, in which case it just writes out the user
 defined center, but not the center mode (see LOD_writeLocalData() function
 in the osg plugin). This doesn’t cause a problem for regular LOD nodes
 because their bounds can be computed from their children, but if you have a
 PagedLOD node that has no children (because its children area loaded by the
 pager) then its not possible to compute a valid bounding sphere to use (and
 it won’t try to anyway because the center mode defaults to
 USER_DEFINED_CENTER). This is different than the way the ive writer works -
 when I write my PagedLOD nodes to the ive file format and then view them
 with the osgviewer it works fine, but when I write to osg the externally
 referenced files are never paged in because it thinks the center of the
 PagedLOD nodes is (0,0,0).



 Alex

 ___
 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] Problem using osgGA::TerrainManipulator

2009-09-01 Thread Robert Osfield
Hi Ragnar,

I'm not clear on what you are after, but at a guess you might need to
explictly call viewer-home() to set the camera manipulator position
to the appropriate place.

Robert.

On Tue, Sep 1, 2009 at 7:49 AM, Ragnar
Hammarqvistragnar.hammarqv...@foi.se wrote:
 Hi All

 I am trying to set up a map view using a TerrainManipulator. But when my 
 aplication is running I nead to press space in order to get somhing in the 
 view that makes sense. Whene I remove the TerrainManipulator the view shows 
 me what it is supose to. I gues that Im using the TerreinManipulator wrong in 
 som sens but I can not figure out what.

 I have the folowing code running when the view is initialized:



 osg::ref_ptrosgViewer::View pViewC2   = new osgViewer::View;

 osg::Camera* pCamera = new osg::Camera;
 pViewC2-setCamera(pCameraC2);
 pViewC2-getCamera()-setComputeNearFarMode(osgUtil::CullVisitor::ComputeNearFarMode::COMPUTE_NEAR_FAR_USING_PRIMITIVES);
 pViewC2-getCamera()-setGraphicsContext(m_pCanvasC2);
 pViewC2-getCamera()-setViewport(0, 0, nWidth, nHeight);
 pViewC2-addEventHandler(new osgViewer::StatsHandler);

 m_pRootC2 = new osg::Group;
 m_pRootC2-setDataVariance(osg::Object::DYNAMIC);
 m_pRootC2-addChild(getScene()-getMapRoot().get());
 pViewC2-setSceneData(m_pRootC2);

 osgGA::TerrainManipulator* pCameraManipulator = 
 newosgGA::TerrainManipulator();
 pViewC2-addEventHandler(pCameraManipulator);
 pViewC2-setCameraManipulator(pCameraManipulator);

 osg::Viewport* pViewportC2 = pViewC2-getCamera()-getViewport();
 double dAspectRatio = pViewportC2-aspectRatio();

 pViewC2-getCamera()-setProjectionMatrixAsPerspective(45.0,dAspectRatio,
                                100.0, 10.0);

 osg::Vec3d eyePos, centerPos, upVec;
 //Get hold of the vectors from our system
 pTerrain-getInitialMapCamViewAsLookat(eyePos, centerPos, upVec);

 osg::Matrixd mapCamViewMatrix;
 mapCamViewMatrix.makeLookAt(
        eyePos, centerPos, upVec);

 pViewC2-getCamera()-setViewMatrix(mapCamViewMatrix);

 pCameraManipulator-setByMatrix(mapCamViewMatrix);
 pCameraManipulator-setNode(m_pRootC2);
 pCameraManipulator-setHomePosition(
 eyePos, centerPos, upVec);


 Regards.
 Ragnar Hammarqvist @ FOI
 ___
 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] Far Nodes - geometry as background

2009-09-01 Thread Robert Osfield
Hi Eric,

On Tue, Sep 1, 2009 at 8:55 AM, Eric
Pouliquenepouliq...@silicon-worlds.fr wrote:
 Hi Chris, and thanks for your answer !

 I understand your solution. How did you manage the Zbuffer clearing ? By 
 setting a clearMask on a ClearNode ?

The easiest way is to use an osg::Camera node to decorate the
background drawing and draw order.  See the osghud example for code
that sets up a camera to post draws and overlay, the change you'll
want to do is make the RenderOrder PRE_RENDER, and the then set the
ClearMask on the viewer's master Camera to just clear the depth
buffer.

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


Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Robert Osfield
Hi Sebastien,

Either geode is a invalid pointer, or VS 2009 is buggy... as it's
known to be... :-)

Robert.

On Tue, Sep 1, 2009 at 9:09 AM, Sebastien Nerigoverse...@hotmail.com wrote:
 Hi again, I still have this problem...

 when I use this code,

 Code:

 {
 osg::MatrixList matrixList = geode-getWorldMatrices();
 }


 A memory assert fails with visual 2009 in debug mode.
 It is like a bad pointer has been passed in
 Do I use this function on a bad way ?
 Does anyone have any ideas ?

 Thanks a lot

 Cheers,
 Sebastien

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





 ___
 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] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi
The geode pointer is valid
And I have the same problem with visual 2008...

the assert fails while deallocating the matrix list (on the last bracket)
the assert is this one :

 windows has triggered a breakpoint in visualApp.exe
 this may due to a corruption of the heap


and the assert comment : 

 If this ASSERT fails, a bad pointer has been passed in. It may be
 totally bogus, or it may have been allocated from another heap.
 The pointer MUST come from the 'local' heap.


any ideas ?
thx

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





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


Re: [osg-users] Editing the Community/Contractors page

2009-09-01 Thread J.P. Delport

Hi,

I think Jose Luis Hidalgo is the one to speak to. I think he requested 
we CC him on list messages regarding the server (I've done it here...). 
Correct me if I'm wrong.


rgds
jp

Glenn Waldron wrote:

Hi,

The Community/Contractors wiki page does not seem to be editable, even
with a login. I was hoping to update my entry. I don't know who the
maintainer is but I'm hoping he or she can re-enable access. Thanks in
advance.

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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] Problem using osgGA::TerrainManipulator

2009-09-01 Thread Ragnar Hammarqvist
Hi Robert.

Thank for your rapid reply.
The viewer-home() call really did the trick =).

/Ragnar


-Ursprungligt meddelande-
Från: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] För Robert Osfield
Skickat: den 1 september 2009 10:13
Till: OpenSceneGraph Users
Ämne: Re: [osg-users] Problem using osgGA::TerrainManipulator

Hi Ragnar,

I'm not clear on what you are after, but at a guess you might need to explictly 
call viewer-home() to set the camera manipulator position to the appropriate 
place.

Robert.

On Tue, Sep 1, 2009 at 7:49 AM, Ragnar
Hammarqvistragnar.hammarqv...@foi.se wrote:
 Hi All

 I am trying to set up a map view using a TerrainManipulator. But when my 
 aplication is running I nead to press space in order to get somhing in the 
 view that makes sense. Whene I remove the TerrainManipulator the view shows 
 me what it is supose to. I gues that Im using the TerreinManipulator wrong in 
 som sens but I can not figure out what.

 I have the folowing code running when the view is initialized:



 osg::ref_ptrosgViewer::View pViewC2   = new osgViewer::View;

 osg::Camera* pCamera = new osg::Camera;
 pViewC2-setCamera(pCameraC2);
 pViewC2-getCamera()-setComputeNearFarMode(osgUtil::CullVisitor::Comp
 pViewC2-uteNearFarMode::COMPUTE_NEAR_FAR_USING_PRIMITIVES);
 pViewC2-getCamera()-setGraphicsContext(m_pCanvasC2);
 pViewC2-getCamera()-setViewport(0, 0, nWidth, nHeight); 
 pViewC2-addEventHandler(new osgViewer::StatsHandler);

 m_pRootC2 = new osg::Group;
 m_pRootC2-setDataVariance(osg::Object::DYNAMIC);
 m_pRootC2-addChild(getScene()-getMapRoot().get());
 pViewC2-setSceneData(m_pRootC2);

 osgGA::TerrainManipulator* pCameraManipulator = 
 newosgGA::TerrainManipulator();
 pViewC2-addEventHandler(pCameraManipulator);
 pViewC2-setCameraManipulator(pCameraManipulator);

 osg::Viewport* pViewportC2 = pViewC2-getCamera()-getViewport();
 double dAspectRatio = pViewportC2-aspectRatio();

 pViewC2-getCamera()-setProjectionMatrixAsPerspective(45.0,dAspectRat
 pViewC2-io,
                                100.0, 10.0);

 osg::Vec3d eyePos, centerPos, upVec;
 //Get hold of the vectors from our system
 pTerrain-getInitialMapCamViewAsLookat(eyePos, centerPos, upVec);

 osg::Matrixd mapCamViewMatrix;
 mapCamViewMatrix.makeLookAt(
        eyePos, centerPos, upVec);

 pViewC2-getCamera()-setViewMatrix(mapCamViewMatrix);

 pCameraManipulator-setByMatrix(mapCamViewMatrix);
 pCameraManipulator-setNode(m_pRootC2);
 pCameraManipulator-setHomePosition(
 eyePos, centerPos, upVec);


 Regards.
 Ragnar Hammarqvist @ FOI
 ___
 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] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Ulrich Hertlein

Hi Sebastien,

On 1/09/09 10:42 AM, Sebastien Nerig wrote:

The geode pointer is valid


And you're absolutely sure of that?  Is it a ref_ptr?

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


Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi Ulrich

no it is just a pointer inside a visitor.

here is a part of my code

void CPrintSceneGraphVisitor::apply(osg::Node node)
{
osg::Geode* geode = dynamic_castosg::Geode*( node);
if(geode)
{
 osg::MatrixList matrixList = geode-getWorldMatrices();
 const osg::Geode::DrawableList list = geode-getDrawableList();
 m_stream  drawable count :   list.size()  std::endl;
 ...
 }
}


Thank for your answer
Sebastien

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





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


Re: [osg-users] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Robert Osfield
Hi Sebastien,

Go search for reports of MS bugs w.r.t iterator debugging as there
have been discussions about this on osg-users, as well as
notifications about this on the MS websites.

Robert.

On Tue, Sep 1, 2009 at 10:39 AM, Sebastien Nerigoverse...@hotmail.com wrote:
 Hi Ulrich

 no it is just a pointer inside a visitor.

 here is a part of my code

 void CPrintSceneGraphVisitor::apply(osg::Node node)
 {
    osg::Geode* geode = dynamic_castosg::Geode*( node);
    if(geode)
    {
         osg::MatrixList matrixList = geode-getWorldMatrices();
         const osg::Geode::DrawableList list = geode-getDrawableList();
         m_stream  drawable count :   list.size()  std::endl;
         ...
     }
 }


 Thank for your answer
 Sebastien

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





 ___
 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] getParentalNodePaths() or getWorldMatrices() assert on deallocation in debug mode

2009-09-01 Thread Sebastien Nerig
Hi robert, thanks for your answer

But are you sure you are talking about an assert while deallocating memory of 
an osg matrix list (my case) ??
I found this on osg-user 
http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2009-May/027347.html,
 it talks about performance while iterating in debug mode.
Have you got any links ?

Thanks

Sebastien

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





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


[osg-users] aspect ratio question

2009-09-01 Thread Clay, Bruce
I started working with the OSG MFC sample on a Vista windows box.  When
I load a model into the window and rotate it, I notice that the aspect
ratio of the model changes.  When the model is vertical in the window it
appears shorter and fatter than expected yet closer to the expected
dimensions.  When I rotate the model to be horizontal it is stretched
out way too much.  Changing the shape of the window does not appear to
change the aspect ratio of the model.

 

Any thoughts as to what could cause the change in dimensions as we
rotate a model?

 

Bruce

 




This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this 
 
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Question about OSG scene loading

2009-09-01 Thread Loic Cayou
Hi all,

On my program, I use setSceneData(...) to load an heavy osg model (more than 
10mo).

I would like to know if I could be alerted when OSG have finished loading a 
model. My application is blocked while this time, and I want to make a 
progressBar to indicate loading progress.  

Thank you!

Regards,
Loic.

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





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


Re: [osg-users] [build] Inconsistent dll linkage

2009-09-01 Thread Paul Martz

Philip Lowman wrote:
You're getting a warning because DoomLikeManipulator is missing 
declspec declarations but publicly inheriting from a class that has 
them.  See the definition of OSGGA_EXPORT in include/osgGA/Export and 
do something similar for your code, perhaps KILLINGSPREE_EXPORT.  Oh 
wait, that's Unreal Tournament. :)
Wouldn't this only be necessary if he were making a DLL? If he's just 
making an executable, then his own custom manipulator shouldn't need 
declespec.


In fact, I'll guess that he has used the osgGA's export declaration in 
his own manipulator class, which would certainly be a bug in his code 
and easy to fix. Without seeing the code, though, it's hard to tell.


The fact that he can successfully build osgviewer shows that he has his 
VS project settings configured correctly, so the problem must be in his 
code comewhere.

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


Re: [osg-users] [build] Inconsistent dll linkage

2009-09-01 Thread Paul Martz

Hi Alex -- Does your class definition look like this?
class OSGGA_EXPORT DoomLikeManipulator : public MatrixManipulator

If so, try changing it to this:
class DoomLikeManipulator : public MatrixManipulator

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


Re: [osg-users] Question about OSG scene loading

2009-09-01 Thread Paul Martz




You can assign a callback to the Registry to be notified when a read
completes. Alternatively, you could derive a class from
OpenThreads::Thread to do the read in a thread, and you'll know it's
complete when isRunning() returns false.

Neither of these will really help you with making a progress bar,
though, which requires "percent complete" as an input. 

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466




Loic Cayou wrote:

  Hi all,

On my program, I use setSceneData(...) to load an heavy osg model (more than 10mo).

I would like to know if I could be alerted when OSG have finished loading a model. My application is blocked while this time, and I want to make a progressBar to indicate loading progress.  

Thank you!

Regards,
Loic.

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





___
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] OSGAnimationPath.

2009-09-01 Thread Danny Lesnik
Hi,

rPath-insert(16.0f , c0 ); 

The code waits for 16 seconds nd it was the problem. 

Thank you!

Cheers,
Danny

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





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


Re: [osg-users] Question about OSG scene loading

2009-09-01 Thread Loic Cayou

Alberto Luaces wrote:
 Hi Loic,
 
 you can try to follow this tutorial:
 
 http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/LoadingProgress
 
 Regards,
 
 Alberto
 

Hi Alberto,
I think it could be a solution, but the creator use an old version of osg, and 
I have so many problem to use it...  :( (Especially for osgDB class).

[quote=Paul Martz]
You can assign a callback to the Registry to be notified when a read completes. 
Alternatively, you could derive a class from OpenThreads::Thread to do the read 
in a thread, and you'll know it's complete when isRunning() returns false.

Neither of these will really help you with making a progress bar, though, which 
requires percent complete as an input. 
[/quote]
Hi Paul Martz,
I think I will try your solution, maybe I will derive a class from OpenThread.

But, i don't understand when you say that I can assign a callBack to the 
Registry  [Question] 

Thanks in advance,
regards.

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





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


Re: [osg-users] Far Nodes - geometry as background

2009-09-01 Thread Chris 'Xenon' Hanson
Eric Pouliquen wrote:
 Hi Chris, and thanks for your answer !
 I understand your solution. How did you manage the Zbuffer clearing ? By 
 setting a clearMask on a ClearNode ?

  I couldn't do it with an OSG primitive, so I just jammed a glClear() into the 
drawable's
draw implementation. Ugly, but effective.

 And what do you think we can do if we want very far nodes as you said-like 
 a moon ? Do we need to do a pre-render by rendering to a texture or is there 
 a simpler way ? i've read some lines about a local camera, but I didn't 
 really understand how to disable the framebuffer clearing after the local 
 camera has rendered the scene (in fact doing multipass rendering).

  See Robert's reply. At that point you really need multiple cameras in order 
to manage
the different depth zones. I think the osgdepthpartition example may be of 
interest to you
too.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
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] Question about OSG scene loading

2009-09-01 Thread Loic Cayou
If I use reimplementation of thread class, I must use:

Code:

virtual void OpenThreads::Thread::run()



and put my code in, I think.

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





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


Re: [osg-users] Z-buffer transparency / Alpha

2009-09-01 Thread Maxime BOUCHER

hybr wrote:
 Hi,
 
 If u didn't solved that yet - try 2 things:
 1st: when doing prerender - on root stateset set GL_DEPTH_TEST to ON|OVERRIDE 
 and  DEPTH attrib to LESS and turn it ON|OVERRIDE(seems like depth write 
 turned off for transparent objects by default, which is right thing in 
 general :D )
 2nd: when doing prerender - render depth with a shader and set there 
 gl_FragColor.a = 1.0;
 
 Cheers,
 Sergey

Hi,

 Thank you for digging :).

Good observation, GL_DEPTH_TEST influences the z-buffer (of course you would 
say...). 
Actually, when accessing a depth texture in a shader in GLSL 1.2 
if DEPTH_TEST is ON 
it has to be passed as a sampler(2D/Rect)Shadow
else as a sampler(2D/Rect).
This may help someone someday.

Actually, I had just forgot to check my texture units (I thought I had, but I 
had just begun and  not finished) and wrote z-buffer on a unit used transparent 
faces use.

I didn't want to push it on the top of the topics, but I have to reply to any 
help.

Cheers,


Max

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





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


Re: [osg-users] Multiple projective textures - Conditional per Pixel Multipass rendering

2009-09-01 Thread Johannes Schüth
Hi,

i will try uniform arrays as soon as i get to it. But the approach sounds quite 
good. 
Thank you.


Paul Martz wrote:
 I believe you can use a uniform array of samplers. This means the number of 
 texture can be arbitrary and therefore you don't need to recompile your 
 shader based on number of textures.
  


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





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


Re: [osg-users] possible bug in osg reader/writer for PagedLOD nodes

2009-09-01 Thread Alex Pecoraro
Hi Robert,

My PagedLOD node does have a preloaded child, but it is a ProxyNode that is set 
to load via the pager. So it doesn't have a valid bounding sphere either, but I 
was setting the initial bound on the PagedLOD node in order to get a valid 
bounding sphere when the file is loaded. I don't want/can't use 
USER_DEFINED_CENTER because when it is set to that the culling visitor, if I'm 
not mistaken, does not apply any transforms that might be sitting above the 
PagedLOD node. So I'd have to bake the transform into my user defined center, 
but when I am building the PagedLOD (for reasons I won't go into) I don't know 
the transform so I can't bake it in.

Anyway, the technique I described worked fine when I was working with ive 
files, but I switched to osg format just so I could read the text in the file 
for a test and I found that my file no longer worked. Its actually not a big 
deal to me because I pretty much only use the osg format for debugging, but I 
thought it be helpful to you and the rest of the community to know that the two 
formats don't work the same way in this case.

Thank you!

Cheers,
Alex

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





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


[osg-users] Proper way to set arbitrary viewpoint?

2009-09-01 Thread Lee Butler
Hi,

What's the appropriate way to set an arbitrary view programmatically when also 
using a camera manipulator?  In particular, I want to be able to load specific 
views from an external source.  These would ideally be specified as a 
combination of eyepoint, lookat, up vectors.

There was some discussion in another thread of using setHomePosition():

viewer.getCameraManipulator()-setHomePosition(...);
viewer.home(); 

Is this really the right approach?  I don't really want to make this a home 
position (no need to retain it), I just want to teleport to the specified view.


Thank you!

Cheers,
Lee

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





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


[osg-users] DelaunayTriangulator - DelaunayConstraint for convex shapes

2009-09-01 Thread Johannes Schüth
Hi,

i want to triangulate the following U character like shape.
[Image: http://jotschi.de/download/osg/delaunay_3.png ]

The DelaunayTriangulator generates this triangulated mesh. But as you can see 
the space in the middle of the U is also triangulated which i do not want.
[Image: http://jotschi.de/download/osg/delaunay_2.png ]

So i tried the DelaunayConstraint to add a constraint for all edges. Obviously 
i have no clue how to do this but i attach the image anyway. This doesn't seem 
to work:
[Image: http://jotschi.de/download/osg/delaunay_1.png ]

I used the following code:

Code:

osg::Group* root = new osg::Group();

osg::Vec3Array* v = new osg::Vec3Array;
v-resize(16);

//U
(*v)[0].set(500, 250, 0);
(*v)[1].set(500, 1000, 0);

(*v)[2].set(500, 1000, 0);
(*v)[3].set(1300, 1000, 0);

(*v)[4].set(1300, 1000, 0);
(*v)[5].set(1300, 250, 0);

(*v)[6].set(1300, 250, 0);
(*v)[7].set(1200, 250, 0);

(*v)[8].set(1200, 250, 0);
(*v)[9].set(1200, 900, 0);

(*v)[10].set(1200, 900, 0);
(*v)[11].set(650, 900, 0);

(*v)[12].set(650, 900, 0);
(*v)[13].set(650, 200, 0);

(*v)[14].set(650, 200, 0);
(*v)[15].set(500, 250, 0);



osg::ref_ptrosgUtil::DelaunayTriangulator trig =
new osgUtil::DelaunayTriangulator();
trig-setInputPointArray(v);



osg::ref_ptrosgUtil::DelaunayConstraint constraint =
new osgUtil::DelaunayConstraint;

constraint-setVertexArray(v);
constraint-addPrimitiveSet(new osg::DrawArrays(
osg::PrimitiveSet::LINE_LOOP, 0, 3));
trig-addInputConstraint(constraint.get());


trig-triangulate();
trig-removeInternalTriangles(constraint.get());

osg::Geometry* gm = new osg::Geometry;
gm-setVertexArray(v);
gm-addPrimitiveSet(trig-getTriangles());
osg::Vec4Array* colors = new osg::Vec4Array(1);
colors-push_back(osg::Vec4(1, 0, 1, 1));
gm-setColorArray(colors);
gm-setColorBinding(osg::Geometry::BIND_OVERALL);
osg::Geode* geode = new osg::Geode();
geode-addDrawable(gm);

// you do not need this function call to use this example
//forcedWireFrameModeOn(root);

root-addChild(geode);

/*
int nEdges = 16;
int i = 0;
while (i  nEdges) {

osg::Vec4 c = osg::Vec4(1., 1., 1., 1.);
root-addChild(drawEdge(c, (*v)[i], (*v)[i + 1]));

i += 2;
}
*/



Do you have any idea how to solve this problem? I just want to get a 
triangulated mesh from the imput of a shapes outline. (The input is not a point 
cloud)

Thank you!

Cheers,
Johannes

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





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


[osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Cory Riddell
Sorry for an off-topic post, but...

I recently updated my Visual Studio installation (VS2005) and found that
Microsoft had fixed some bugs in the C runtime. My CRT went from version
8.0.50727.762 to 8.0.50727.4053. Would this mean that I need to
recompile OSG? Is it safe for my app built with version .4053 to use OSG
build with version .762? Any rules of thumb for when I need to rebuild
my supporting libraries or contact vendors for updates of closed-source
libraries?

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


Re: [osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Tomlinson, Gordon
Generally it is recommend you build every thing with the same compiler
version ( it saves time in the long run ) 


Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Cory
Riddell
Sent: Tuesday, September 01, 2009 2:40 PM
To: OpenSceneGraph Users
Subject: [osg-users] OT: do I need to recompile OSG?

Sorry for an off-topic post, but...

I recently updated my Visual Studio installation (VS2005) and found that
Microsoft had fixed some bugs in the C runtime. My CRT went from version
8.0.50727.762 to 8.0.50727.4053. Would this mean that I need to
recompile OSG? Is it safe for my app built with version .4053 to use OSG
build with version .762? Any rules of thumb for when I need to rebuild
my supporting libraries or contact vendors for updates of closed-source
libraries?

Thanks,
Cory
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] DelaunayTriangulator - DelaunayConstraint for convex shapes

2009-09-01 Thread Glenn Waldron
Johannes,

If you just want to triangulate an outline, try the
osgUtil::Tessellator. First build an osg::Geometry as a line loop,
then do something like:

osgUtil::Tessellator tess;
tess.setTessellationType( osgUtil::Tessellator::TESS_TYPE_GEOMETRY );
tess.setWindingType( osgUtil::Tessellator::TESS_WINDING_POSITIVE );
tess.retessellatePolygons( *geometry );


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791



On Tue, Sep 1, 2009 at 2:30 PM, Johannes Schüthacco...@jotschi.de wrote:
 Hi,

 i want to triangulate the following U character like shape.
 [Image: http://jotschi.de/download/osg/delaunay_3.png ]

 The DelaunayTriangulator generates this triangulated mesh. But as you can see 
 the space in the middle of the U is also triangulated which i do not want.
 [Image: http://jotschi.de/download/osg/delaunay_2.png ]

 So i tried the DelaunayConstraint to add a constraint for all edges. 
 Obviously i have no clue how to do this but i attach the image anyway. This 
 doesn't seem to work:
 [Image: http://jotschi.de/download/osg/delaunay_1.png ]

 I used the following code:

 Code:

 osg::Group* root = new osg::Group();

 osg::Vec3Array* v = new osg::Vec3Array;
 v-resize(16);

 //U
 (*v)[0].set(500, 250, 0);
 (*v)[1].set(500, 1000, 0);

 (*v)[2].set(500, 1000, 0);
 (*v)[3].set(1300, 1000, 0);

 (*v)[4].set(1300, 1000, 0);
 (*v)[5].set(1300, 250, 0);

 (*v)[6].set(1300, 250, 0);
 (*v)[7].set(1200, 250, 0);

 (*v)[8].set(1200, 250, 0);
 (*v)[9].set(1200, 900, 0);

 (*v)[10].set(1200, 900, 0);
 (*v)[11].set(650, 900, 0);

 (*v)[12].set(650, 900, 0);
 (*v)[13].set(650, 200, 0);

 (*v)[14].set(650, 200, 0);
 (*v)[15].set(500, 250, 0);



 osg::ref_ptrosgUtil::DelaunayTriangulator trig =
 new osgUtil::DelaunayTriangulator();
 trig-setInputPointArray(v);



 osg::ref_ptrosgUtil::DelaunayConstraint constraint =
 new osgUtil::DelaunayConstraint;

 constraint-setVertexArray(v);
 constraint-addPrimitiveSet(new osg::DrawArrays(
 osg::PrimitiveSet::LINE_LOOP, 0, 3));
 trig-addInputConstraint(constraint.get());


 trig-triangulate();
 trig-removeInternalTriangles(constraint.get());

 osg::Geometry* gm = new osg::Geometry;
 gm-setVertexArray(v);
 gm-addPrimitiveSet(trig-getTriangles());
 osg::Vec4Array* colors = new osg::Vec4Array(1);
 colors-push_back(osg::Vec4(1, 0, 1, 1));
 gm-setColorArray(colors);
 gm-setColorBinding(osg::Geometry::BIND_OVERALL);
 osg::Geode* geode = new osg::Geode();
 geode-addDrawable(gm);

 // you do not need this function call to use this example
 //forcedWireFrameModeOn(root);

 root-addChild(geode);

 /*
 int nEdges = 16;
 int i = 0;
 while (i  nEdges) {

 osg::Vec4 c = osg::Vec4(1., 1., 1., 1.);
 root-addChild(drawEdge(c, (*v)[i], (*v)[i + 1]));

 i += 2;
 }
 */



 Do you have any idea how to solve this problem? I just want to get a 
 triangulated mesh from the imput of a shapes outline. (The input is not a 
 point cloud)

 Thank you!

 Cheers,
 Johannes

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





 ___
 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] OT: do I need to recompile OSG?

2009-09-01 Thread Cory Riddell
Hi Gordon,

Tomlinson, Gordon wrote:
 Generally it is recommend you build every thing with the same compiler
 version ( it saves time in the long run ) 
   

I started out thinking this is the obvious answer, but the more I think
about it, I'm not so sure. For example, OSG uses OpenGL from operating
system libraries or libraries supplied by my video card maker. These may
not even be compiled by a Microsoft compiler and there certainly isn't
any way for me to recompile them. This makes me think that it doesn't
really matter.

I would like to understand what the problem is with mixing object files
built against different versions of library files.

Cory

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


Re: [osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Chris 'Xenon' Hanson
Cory Riddell wrote:
 I started out thinking this is the obvious answer, but the more I think
 about it, I'm not so sure. For example, OSG uses OpenGL from operating
 system libraries or libraries supplied by my video card maker. These may
 not even be compiled by a Microsoft compiler and there certainly isn't
 any way for me to recompile them. This makes me think that it doesn't
 really matter.
 I would like to understand what the problem is with mixing object files
 built against different versions of library files.

  In this case, I believe it is acknowledged that the new patch does want stuff
recompiled. I don't know the details exactly, but it's using a different C/C++ 
runtime
(CRT) library which is causing havoc for developers.

  Libraries like OpenGL do not utilize the C/C++ runtime, rather they do 
without (things
like streams, or stdio) use the core Windows Win32 API functions. Most Windows 
system
libraries will be this way. Third-party libraries, especially those with 
poratability in
mind, avoid system-specifc APIs like Win32 wherever possible in favor of the 
portable
C/C++ runtime. but that means they are dependent on linking with the right 
version of CRT.

 Cory

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
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] DelaunayTriangulator - DelaunayConstraint for convex shapes

2009-09-01 Thread Johannes Schüth
Hi,

that worked like a charm :) Thank you very much for the quick answer. 

I attach the full example. Maybe this comes handy to someone else too :)


Code:

osg::Geometry* contourGeom = new osg::Geometry();
contourGeom-setVertexArray(v);
contourGeom-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_LOOP, 
0, v-size()));

osg::ref_ptrosgUtil::Tessellator tess = new osgUtil::Tessellator();

tess-setTessellationType( osgUtil::Tessellator::TESS_TYPE_GEOMETRY );  
tess-setWindingType( osgUtil::Tessellator::TESS_WINDING_POSITIVE );
tess-retessellatePolygons( *contourGeom );

osg::Geode* geode = new osg::Geode();
geode-addDrawable(contourGeom);
root-addChild(geode);
return root;



[Image: http://jotschi.de/download/osg/tessellate.png ]

Cheers,
Johannes

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





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


Re: [osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Cory Riddell




Chris,

Chris 'Xenon' Hanson wrote:

  Cory Riddell wrote:
  
  
I started out thinking this is the obvious answer, but the more I think
about it, I'm not so sure. For example, OSG uses OpenGL from operating
system libraries or libraries supplied by my video card maker. These may
not even be compiled by a Microsoft compiler and there certainly isn't
any way for me to recompile them. This makes me think that it doesn't
really matter.
I would like to understand what the problem is with mixing object files
built against different versions of library files.

  
  
  In this case, I believe it is acknowledged that the new patch does want stuff
recompiled. I don't know the details exactly, but it's using a different C/C++ runtime
(CRT) library which is causing havoc for developers.

  Libraries like OpenGL do not utilize the C/C++ runtime, rather they do without (things
like streams, or stdio) use the core Windows Win32 API functions. Most Windows system
libraries will be this way. Third-party libraries, especially those with poratability in
mind, avoid system-specifc APIs like Win32 wherever possible in favor of the portable
C/C++ runtime. but that means they are dependent on linking with the right version of CRT.
  


Ok, this actually makes a lot of sense to me. Now I wonder how I can
figure out if a particular library does depend on the CRT library. I've
had some luck doing:
 dumpbin /directives FOO.lib
but I'm thinking there is likely a better way.

For the OSG stuff posted on the downloads page for Microsoft systems,
versions 2.8.0, 2.81, and 2.8.2 are made for the .762 version of the
CRT and I'm guessing 2.8.3 will require .4053. You know, I'm surprised
any software ever works.

Cory


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


Re: [osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Chris 'Xenon' Hanson
Cory Riddell wrote:
 Ok, this actually makes a lot of sense to me. Now I wonder how I can
 figure out if a particular library does depend on the CRT library. I've
 had some luck doing:
   dumpbin /directives FOO.lib
 but I'm thinking there is likely a better way.

  If it uses the CRT as a DLL, Dependency Walker should tell you. Google it.

 For the OSG stuff posted on the downloads page for Microsoft systems,
 versions 2.8.0, 2.81, and 2.8.2 are made for the .762 version of the CRT
 and I'm guessing 2.8.3 will require .4053. You know, I'm surprised any
 software ever works.

  When Microsoft is involved, it frequently doesn't.

  This morass is one of the motivations behind the compile it yourself CMake 
project
being discussed for as many of OSG's thirdparty libs as possible.

 Cory

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
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] Proper way to set arbitrary viewpoint?

2009-09-01 Thread Jason Daly

Lee Butler wrote:

Hi,

What's the appropriate way to set an arbitrary view programmatically when also 
using a camera manipulator?  In particular, I want to be able to load specific 
views from an external source.  These would ideally be specified as a 
combination of eyepoint, lookat, up vectors.

There was some discussion in another thread of using setHomePosition():

viewer.getCameraManipulator()-setHomePosition(...);
viewer.home(); 


Is this really the right approach?  I don't really want to make this a home 
position (no need to retain it), I just want to teleport to the specified view.
  



Hi, Lee,

I think you can call setByMatrix() on the manipulator, so something like 
this should work:


matrix = osg::Matrix::lookAt(eye, center, up)
viewer.getCameraManipulator()-setByMatrix(matrix)


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


Re: [osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Cory Riddell




Chris 'Xenon' Hanson wrote:

  Cory Riddell wrote:
  
  
Ok, this actually makes a lot of sense to me. Now I wonder how I can
figure out if a particular library does depend on the CRT library. I've
had some luck doing:
  dumpbin /directives FOO.lib
but I'm thinking there is likely a better way.

  
  
  If it uses the CRT as a DLL, "Dependency Walker" should tell you. Google it.

And say a third party library has been compiled for the non-dll version
of the c runtime (I think this is libc or libcmt for the multi threaded
variant). If the third party library is a dll I may have problems
passing data between my app and the dll, correct? If the third party
library is a lib, then I'll just get a bunch of linker errors. Yikes!

Cory


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


Re: [osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Tomlinson, Gordon
Hi

In there wisdom MS decided it would be a good idea to use different CRT
( for C++ in debug use different memory allocators and dealocators ,
they through a lot of debug memory padding etc. etc. etc. etc. etc.
doing a Google will bring up lots of reference material on this.
( this is typically no an issue on UNIX and Linux systems, dang I miss
IRIX .. ). If an app was purely link with C lib its not an issues


Most of the OSG 3rd party requirements are typically built with C++ so
you need to ensure they are build with the same CRT and settings. Things
like libJpeg, png, tiff, gdal, collada, xerces, proj4, libxml geos,
boost etc

While first time round it can take a little time to assemble your OSG
3rdparty sources and set them up, in the long run it is worth it ( at
least for me ), for a commercial application I need to know that all the
libraries I use meet  the standard build requirments, and the only way
to ensure that is to build them myself




Gordon
Product Manager 3d
__
Gordon Tomlinson
Email  : gtomlinson @ overwatch.textron.com
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Cory
Riddell
Sent: Tuesday, September 01, 2009 3:03 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OT: do I need to recompile OSG?

Hi Gordon,

Tomlinson, Gordon wrote:
 Generally it is recommend you build every thing with the same compiler

 version ( it saves time in the long run )
   

I started out thinking this is the obvious answer, but the more I think
about it, I'm not so sure. For example, OSG uses OpenGL from operating
system libraries or libraries supplied by my video card maker. These may
not even be compiled by a Microsoft compiler and there certainly isn't
any way for me to recompile them. This makes me think that it doesn't
really matter.

I would like to understand what the problem is with mixing object files
built against different versions of library files.

Cory

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


Re: [osg-users] OT: do I need to recompile OSG?

2009-09-01 Thread Chris 'Xenon' Hanson
Cory Riddell wrote:
   If it uses the CRT as a DLL, Dependency Walker should tell you. Google 
 it.
 And say a third party library has been compiled for the non-dll version
 of the c runtime (I think this is libc or libcmt for the multi threaded
 variant). If the third party library is a dll I may have problems
 passing data between my app and the dll, correct? If the third party
 library is a lib, then I'll just get a bunch of linker errors. Yikes!

  Well, as old mapmakers used to write, Here There Be Dragons.

  USUALLY if you're not passing CRT-derived assets (allocated blocks of memory, 
file
handles, etc) between you app and the DLL, especially where one side allocates 
and one
frees, you might get by ok.

  But, you can also get burned.

  Build it all yourself where you can.

 Cory

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
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] OSGConv on VPB PagedLOD database

2009-09-01 Thread Chris 'Xenon' Hanson
  I just recently had to try to use OSGconv on a large databse built by VPB 
with hundreds
of individual .osg files. I was trying to convert it to .osg (with some 
transformation in
the middle). However, invoking it as

osgconv mysceensource.osg myscenedest.osg

  ONLY converts the top-level .osg file I list on the command-line, it doesn't 
traverse,
load, convert or save any of the children of all the PagedLOD files.

  Am I missing some special trick, or how would you go about doing this?

  I'm on Windows, so find and xargs aren't available unless I go install cygwin 
or something.


  Thanks in advance.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
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] tutorial Problem

2009-09-01 Thread Alex Gutheil
Hi,

oh great! 

Thank you!

Cheers,
Alex

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





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


Re: [osg-users] DelaunayTriangulator - DelaunayConstraint for convex shapes

2009-09-01 Thread Martin Beckett
If you need to do this with a complex model (1000s of points) the Delauney 
triangulator doesn't work very well.

I have a written a wrapper for Jonathon Shewchuk's Delauney code but that code 
is restricted to non-commercial use so I haven't submitted it.
If you can accept this and need a worlds best mesh generator mail me.

ps I hope to get round to wrapping their new streaming triangulator which is 
more freely licensed.

Cheers,
Martin

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





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


Re: [osg-users] [build] Inconsistent dll linkage

2009-09-01 Thread Philip Lowman
On Tue, Sep 1, 2009 at 10:39 AM, Paul Martz pma...@skew-matrix.com wrote:

 Philip Lowman wrote:

 You're getting a warning because DoomLikeManipulator is missing declspec
 declarations but publicly inheriting from a class that has them.  See the
 definition of OSGGA_EXPORT in include/osgGA/Export and do something similar
 for your code, perhaps KILLINGSPREE_EXPORT.  Oh wait, that's Unreal
 Tournament. :)

 Wouldn't this only be necessary if he were making a DLL? If he's just
 making an executable, then his own custom manipulator shouldn't need
 declespec.

 In fact, I'll guess that he has used the osgGA's export declaration in his
 own manipulator class, which would certainly be a bug in his code and easy
 to fix. Without seeing the code, though, it's hard to tell.


Paul,

I think you're right because I just tried something similar and that seems
to be the easiest way to reproduce this warning.  I think I had this
confused with another problem I had once.  Sorry for the noise.

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