[osg-users] problem in camera rotation

2009-09-07 Thread Akilan Thangamani
Hi,

I understand that this  problem has already been discussed . But as I was not 
able
to understand clearly I post my simple camera rotation problem., I written a 
code

osg::ref g_camera=new  osg:::camera;
g_camera->setProjectionMatrix(osg::Matrix::ortho2D(0,1,0,1));
g_camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
g_camera->setViewMatrix(osg::Matrix::Identity());
g_camera->setClearMask(GL_DEPTH_BUFFER_BIT);
g_camera->setRenderOrder(osg::camera::POST_RENDER);
g_camera->setAllowEventFocus(true);
g_camera->addChild(create_geometry()); //create_geometry() fn will return  a 
geode with //a drawable added
..
..
...
osgViewer::Viewer viewer;
viewer.setSceneData(g_camera.get());
.
while(!viewer.done())
{
if(isKey_R_pressed){

..
osg::Matrixd vmat=g_camera->getViewMatrix(); //here i get the camera thru 
traversal
vmat.makeRotate(osg::DegreesToRadians(45.),osg::osg::Vec3f(1.,0.,0.));
g_camera->setViewMatrix(vmat);

.}
viewer.frame();
}
}
I dont understand how  my geometry is not getting rotated? 
What is the problem in this?


}
}




Thank you!

Cheers,
Akilan

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





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


Re: [osg-users] crash if using osgDB::readNodeFile from a thread different of update

2009-09-07 Thread Robert Osfield
Hi Cedric,

I wouldn't have though my change will have introduced a new threading
issue, perhaps just revealed on old one though.  I've just done a
review of the Registry methods that access the cache and I can't find
any points where the Registr::_objectCacheMutex isn't locked before
access of the Registr::_objectCache map.

This leaves me without a lead w.r.t looking at how the viewer might be
reading from the cache at the same time as it's being cleared.   Could
you explain at what point this problem is occurring?

Robert.

On Mon, Sep 7, 2009 at 6:18 PM, Cedric Pinson wrote:
> Hi Robert,
>
> I had a crash in my application because i use osgDB::readFile from
> another thread than Viewer.
> In fact there is a short window if the cache is cleared while another
> thread reference the data.
> osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExternalReferences(*getFrameStamp());
> osgDB::Registry::instance()->removeExpiredObjectsInCache(*getFrameStamp());
>
> Here the revision and the diff code on the link.
> [svn r10520] Moved the updating and expiry of the Registry object cache
> from DatabasePager into osgViewer::Viewer/CompositeViewer
> http://hg.plopbyte.net/osg-trunk/diff/85a3231b7b00/src/osgViewer/Viewer.cpp
>
>
> It's possible i had the problem before this commit, but i would just
> want to put it on the mailing list if other people have similar problem.
>
> For explanation this how i use it:
> for each player (10)
> I fetch the url http://a.com/node.osg -> the first time it will be
> downloaded then for other i will use the value in the cache registry
> (throw the readNodeFile).
> I clone the data in cache because i have to setup specific stuff by
> player so i can't modify the original data fetched in cache, i want to
> keep the data in cache clean.
>
>
> The reference count is 1 except when i get the pointer and clone it, so
> the
> osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExternalReferences(*getFrameStamp());
> does not update the timestamp and finally will delete the value in
> cache.
>
> I changed the expiry time to a very big value, but i would prefer to
> have a consistent fix. I guess i should keep the pointer on a kind of
> registry in my application.
>
>
> Cheers,
> Cedric
>
> -
> +33 659 598 614  Cedric Pinson mailto:cedric.pin...@plopbyte.net
> http://www.plopbyte.net
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with a program in osg qsg

2009-09-07 Thread Jean-Sébastien Guay

Hi Brett, Kim,


I am actually trying the program of callback in osg quick start guide which 
rotates the cow using a node callback.

when I change code viewer.run() to 
while(!viewer.done())

{
viewer.frame();
} 


I am unable to see the models on the screen.What is the diffrence between the 
two??


Please check you've done viewer.realize(). 
viewer.run() includes realizing step.


Actually, osgViewer::ViewerBase::frame() will call realize() if it 
hasn't been called yet. So that's not the problem.


You can check the source code (in this case osgViewer::ViewerBase 
contains run() and frame() methods, and osgViewer::Viewer overrides the 
run() method) to see exactly what the difference is.


In your case, the difference you're seeing is simply that 
osgViewer::run() automatically adds an osgGA::TrackballManipulator to 
the viewer, while just calling viewer.frame() yourself doesn't.


  int Viewer::run()
  {
  if (!getCameraManipulator() && getCamera()->getAllowEventFocus())
  {
  setCameraManipulator(new osgGA::TrackballManipulator());
  }

  setReleaseContextAtEndOfFrameHint(false);

  return ViewerBase::run();
  }

And the TrackballManipulator centers itself on your scene's contents by 
default on the first frame. So the effect you're seeing is just that the 
camera is not pointing towards your objects in the viewer.frame() case.


You could add a TrackballManipulator (or some other subclass of 
osgGA::MatrixManipulator) to the viewer yourself to get the same 
behavior as using run(). Or you could set the camera's view matrix 
manually in your frame loop before viewer.frame() so that the camera is 
where you want it to be for your objects to be visible. It's your choice.


That's one of the nice things with OSG development... No black box. You 
can see what everything does and how it's done, and most of the time 
it's coded in a way that's understandable by mere mortals like us (as 
opposed to some other libraries like boost :-) ).


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with a program in osg qsg

2009-09-07 Thread Tim Allen
Hi,



Thank you very much for the reply.I also have an another question , in this code

while(!viewer.done())
{
viewer.advance();
viewer.eventTraversal();
viewer.updateTraversal();
viewer.renderingTraversals();
} 
if I remove viewer.updateTraversal(); and Is there a way to update  the scene 
without using viewer.updateTraversal??If so how can this be done??
Cheers,
Tim

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





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


Re: [osg-users] Problem with a program in osg qsg

2009-09-07 Thread Hansoo Kim

brett01 wrote:
> Hi,
> 
> I am actually trying the program of callback in osg quick start guide which 
> rotates the cow using a node callback.
> 
> when I change code viewer.run() to 
> while(!viewer.done())
> {
>   viewer.frame();
> } 
> 
> I am unable to see the models on the screen.What is the diffrence between the 
> two??
> 
> Thank you!
> 
> Cheers,
> Brett




Please check you've done viewer.realize(). 
viewer.run() includes realizing step.


VR Lab, Konkuk University, South Korea

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





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


Re: [osg-users] Updating a scene using OSG and VRJuggler

2009-09-07 Thread Tim Allen
Hi,

 I will explain what I didnt understand in the code.Does calling 
scene->accept(updateVisitor); everyframe will automatically call the 
updatecallbacks and update the scene.Because here no viewer.updateTraversal() 
or sceneview->update() methods are not called to update the scene.

Thank you!

Cheers,
Tim

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





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


Re: [osg-users] Quicktime and movie size

2009-09-07 Thread Stephan Huber
Hi Serge,

Serge Lages schrieb:
> Thanks for your reply, it seems to be an export problem instead of a problem
> on the plugin side. But it's still weird that the size on the QuickTime
> player and in the plugin is different. 

I think it has something to do with the codec. DVCPro is convenient for
editing movies/ capturing from video-cameras. I'd use Foto JPEG or MP4
for OSG.

Safari shows the same error: if you open the movie with it, it will
display at 1920x1080, so it's not isolated to the quicktime-plugin.

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


Re: [osg-users] Restarting a canceled thread

2009-09-07 Thread Michael Guerrero
Thanks for the reply Paul.  I was calling join because i wanted the main calling
thread to block until myThread was finished.  I know it doesn't make much sense
to do it that way in this contrived example but in my actual application it
would be nice to do this between scenario teardown and setup/restart.

Per your suggestion I modified my main to this:
void main()
{
   OpenThreadObject* myThread = new OpenThreadObject;
   myThread->start();
   myThread->cancel();
  
   // I assume the "!" in your example was an error?
   while (myThread ->isRunning())
   {
  OpenThreads::Thread::microSleep(100);
   }

   myThread->start();

   while (myThread->isRunning())
   {
  OpenThreads::Thread::microSleep(100);
   }
}

Unfortunately it dies the same as before.  One around this that I've found is
not use "cancel()" at all but to create my own cancel mechanise like this (from
my actual app):

void DatabaseThread::TerminateThread()
{   
   if (OpenThreads::Thread::CurrentThread() != this)
   {
  // Block until the thread is canceled
  if (isRunning())
  { 
 // mShouldTerminate is an atomic var that is checked
 // periodically inside run() to know when to bail out

 ++mShouldTerminate;
 join();
 --mShouldTerminate;

 // Cleaning up personal data
 mPublicActorList.clear();
 mPrivateActorList.clear();
  }  
   }
   else
   {
  LOG_ERROR("Trying to terminate self.");
   }
}

I would prefer to do this the "right" way whatever that may be.

Thanks,
Michael

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


Re: [osg-users] Restarting a canceled thread

2009-09-07 Thread Paul Martz

Hi Michael --

I believe that after you cancel it, you should test to see if it has 
actually been canceled, something like this:


myThread->start();
myThread->cancel();
while( !myThread->iSRunning() )
  OpenThreads::Thread::microSleep( 100 );
myThread->start();

Also, I'm not sure what you are trying to accomplish by calling join(). 
It doesn't seem necessary to accomplish your stated goal.


Note that you are incurring some significant overhead to cancel and then 
restart a thread. If all you need to do is temporarily pause the thread, 
you should consider using a Barrier for a more efficient solution.


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

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


[osg-users] Restarting a canceled thread

2009-09-07 Thread Michael Guerrero
Hi guys, I don't have that much experience writing threaded code so please
forgive my ignorance.  I've written a very simple test application using
OpenThreads which runs a thread, stops it, and then tries to run it again. 
Seems straightforward but I get an unhandled exception from the
OpenThreads::cooperativeWait function (Unhandled exception at 0x75fdfbae in
helloworld.exe: Microsoft C++ exception: Win32ThreadCanceled at memory location
0x01edfd4b..).  Here is my code:

#include 
#include 
#include 

#include 

class OpenThreadObject : public OpenThreads::Thread
{
public:  

   virtual void run()
   {
  for (int i = 0; i < 1000; ++i)
  {
 if (i > 100 && testCancel())
 {
break;
 }

 std::cout << getThreadId() << ": " << i << std::endl;
  }
   }   
};

void main()
{
   OpenThreadObject* myThread = new OpenThreadObject;
   myThread->start();
   myThread->cancel();   
   myThread->join();
   myThread->start();
   myThread->join();  
}

Are canceled threads allowed to be restarted?

Michael

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


[osg-users] crash if using osgDB::readNodeFile from a thread different of update

2009-09-07 Thread Cedric Pinson
Hi Robert,

I had a crash in my application because i use osgDB::readFile from
another thread than Viewer.
In fact there is a short window if the cache is cleared while another
thread reference the data.
osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExternalReferences(*getFrameStamp());
osgDB::Registry::instance()->removeExpiredObjectsInCache(*getFrameStamp());

Here the revision and the diff code on the link.
[svn r10520] Moved the updating and expiry of the Registry object cache
from DatabasePager into osgViewer::Viewer/CompositeViewer
http://hg.plopbyte.net/osg-trunk/diff/85a3231b7b00/src/osgViewer/Viewer.cpp


It's possible i had the problem before this commit, but i would just
want to put it on the mailing list if other people have similar problem.

For explanation this how i use it:
for each player (10)
I fetch the url http://a.com/node.osg -> the first time it will be
downloaded then for other i will use the value in the cache registry
(throw the readNodeFile).
I clone the data in cache because i have to setup specific stuff by
player so i can't modify the original data fetched in cache, i want to
keep the data in cache clean.


The reference count is 1 except when i get the pointer and clone it, so
the
osgDB::Registry::instance()->updateTimeStampOfObjectsInCacheWithExternalReferences(*getFrameStamp());
does not update the timestamp and finally will delete the value in
cache.

I changed the expiry time to a very big value, but i would prefer to
have a consistent fix. I guess i should keep the pointer on a kind of
registry in my application.


Cheers,
Cedric

-  
+33 659 598 614  Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net



signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Quicktime and movie size

2009-09-07 Thread Serge Lages
Hi Stephan,

Thanks for your reply, it seems to be an export problem instead of a problem
on the plugin side. But it's still weird that the size on the QuickTime
player and in the plugin is different. Here is the movie :
http://labs.tharsis-software.com/test.mov

On Mon, Sep 7, 2009 at 4:51 PM, Stephan Maximilian Huber <
ratzf...@digitalmind.de> wrote:

> Hi Serge,
>
> Serge Lages schrieb:
> > Hi all,
> >
> > I can post the movie if needed.
>
> that would be helpful.
>
> cheers,
> Stephan
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Quicktime and movie size

2009-09-07 Thread Stephan Maximilian Huber
Hi Serge,

Serge Lages schrieb:
> Hi all,
> 
> I can post the movie if needed.

that would be helpful.

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


Re: [osg-users] [osgPlugins] can't compile VRML plugin

2009-09-07 Thread Jean-Sébastien Guay

Hi Maurizio,


I was following the tutorial  here 
(http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio/VisualStudioPlugins)


I wrote that tutorial, but note that it's been a very long while since 
I've compiled the OpenVRML plugin (or OpenVRML itself, for that matter) 
so my recollections could be out of date / wrong. :-)



I compiled OpenVRML without any issue. but when it comes to using CMake on the VRML 
plugin I downloaded here 
(http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgPlugins/vrml?rev=8591)
 the tutorial stops making sense..I cannot find where I should be "specifying the 
...\OpenVRML\home-built\include directory in OPENVRML_INCLUDE_DIR and 
...\OpenVRML\home-built\lib\openvrml.lib library in OPENVRML_LIBRARY." . When I 
generate I end up with an VC++ solution that does not include any of the original source 
files, and as such when I compile it with VC++ (2005) the compilation is skipped (as 
there is nothing to compile). I apologise if these are stupid issues but I am new to OSG 
and to CMake as well.


It sounds like you're using the OpenVRML plugin's directory as the base 
path in CMake, which is not what you should be using. You need to start 
CMake and give the base directory where the OSG sources are in "Where is 
the source code". Not a sub-directory.


Then, among all the configuration variables like ACTUAL_3RDPARTY_DIR, 
BUILD_OSG_EXAMPLES etc., you should see the variables you're looking for 
 about 3/4 of the way down the list: OPENVRML_INCLUDE_DIR, 
OPENVRML_LIBRARY and OPENVRML_LIBRARY_DEBUG.


A way to see if you got it right is that when you open the resulting 
OpenSceneGraph.sln solution (after filling in the values, and doing 
Configure as needed and then Generate) you should see a project called 
"Plugins vrml" or something like that near the bottom of the list of 
projects.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLod - How to

2009-09-07 Thread Chris 'Xenon' Hanson
Björn Blissing wrote:
> I remember I wondered the same thing my self. The method I (and I guess 
> Vincent) wonders about is the:
> addChild (Node *child, float min, float max, const std::string &filename, 
> float priorityOffset=0.0f, float priorityScale=1.0f) 
> Here you have to supply both a Node* and a filename. I didn't quite get why, 
> so I skipped this and used the setFilename approach instead.

 I think this is used when creating a PagedLOD scenegraph that you will then 
write to disk
for later realtime use, the way VirtualPlanetBuilder/OSGDEM does.

> Related question:
> What do the values "priorityOffset" and "priorityScale" control? The 
> documentation is quite sparse when it comes to this...

  From memory, these are used to tweak the criteria used to determine when each 
node is
loaded form disk, but I can't recall the details.

> Best regards
> Björn

-- 
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] Quicktime and movie size

2009-09-07 Thread Serge Lages
Hi all,

I am currently facing a problem with the QuickTime plugin. When I play my
movie with the QuickTime player, it says that the size is 768x576, but if I
load it in OSG with the QuickTime plugin, it says1920x1080 as its size. Does
it ring a bell to someone ? I can post the movie if needed.

Looking to the code, I saw that the method to get the movie size is
GetMovieBox, is there any other method to get it ?

Thanks !

-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLod - How to

2009-09-07 Thread Björn Blissing
Hi Robert,

I remember I wondered the same thing my self. The method I (and I guess 
Vincent) wonders about is the:
addChild (Node *child, float min, float max, const std::string &filename, float 
priorityOffset=0.0f, float priorityScale=1.0f) 

Here you have to supply both a Node* and a filename. I didn't quite get why, so 
I skipped this and used the setFilename approach instead.

Related question:
What do the values "priorityOffset" and "priorityScale" control? The 
documentation is quite sparse when it comes to this...

Best regards

Björn

> -Ursprungligt meddelande-
> Från: osg-users-boun...@lists.openscenegraph.org 
> [mailto:osg-users-boun...@lists.openscenegraph.org] För Robert Osfield
> Skickat: den 7 september 2009 13:03
> Till: OpenSceneGraph Users
> Ämne: Re: [osg-users] PagedLod - How to
> 
> Hi Vincent,
> 
> You don't need to assign a node ptr, as you can set the 
> filename against a child number that isn't yet loaded. i.e.
> 
>   plod->setFileName(0, "firstlod.ive");
>   plod->setFileName(1, "secondlod.ive");
> 
> Typically I'd actually assign the first child as an straight 
> subgraph that is loaded along with the PageLOD itself, then 
> the second child (with index 1) is the one that is loaded on 
> demand when the next up level of detail is required.  This 
> external subgraph which is stored on disk will typically 
> contain a Group and four PageLOD, each of which will have 
> it's first child already assigned as part of this external 
> file, and then it's second child the external file reference. 
>  This is repeat until you have the desired level of detail 
> for the high rest data you have.  This approach creates a 
> balanced quad tree that is perfect for real-time rendering.
> 
> Robert.
> 
> 
> On Mon, Sep 7, 2009 at 11:33 AM, Vincent 
> Bourdier wrote:
> > Hi all,
> >
> > Currently trying to set a PagedLod system on my model, I'm facing 
> > something strange for me :
> > Adding a child on a PageLod node, I need to set a Node* AND 
> a filename ...
> >
> > Why do I need to set the node ptr ? if the pagedLod load 
> from disk the 
> > node, there is no need of the ptr, isn't it ?
> >
> > Thanks for the explanations.
> >
> > Regards,
> >    Vincent.
> >
> > ___
> > 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-opensce
negraph.org
> 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLod - How to

2009-09-07 Thread Robert Osfield
Hi Vincent,

You don't need to assign a node ptr, as you can set the filename
against a child number that isn't yet loaded. i.e.

  plod->setFileName(0, "firstlod.ive");
  plod->setFileName(1, "secondlod.ive");

Typically I'd actually assign the first child as an straight subgraph
that is loaded along with the PageLOD itself, then the second child
(with index 1) is the one that is loaded on demand when the next up
level of detail is required.  This external subgraph which is stored
on disk will typically contain a Group and four PageLOD, each of which
will have it's first child already assigned as part of this external
file, and then it's second child the external file reference.  This is
repeat until you have the desired level of detail for the high rest
data you have.  This approach creates a balanced quad tree that is
perfect for real-time rendering.

Robert.


On Mon, Sep 7, 2009 at 11:33 AM, Vincent
Bourdier wrote:
> Hi all,
>
> Currently trying to set a PagedLod system on my model, I'm facing something
> strange for me :
> Adding a child on a PageLod node, I need to set a Node* AND a filename ...
>
> Why do I need to set the node ptr ? if the pagedLod load from disk the node,
> there is no need of the ptr, isn't it ?
>
> Thanks for the explanations.
>
> Regards,
>    Vincent.
>
> ___
> 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] PagedLod - How to

2009-09-07 Thread Vincent Bourdier
Hi all,

Currently trying to set a PagedLod system on my model, I'm facing something
strange for me :
Adding a child on a PageLod node, I need to set a Node* AND a filename ...

Why do I need to set the node ptr ? if the pagedLod load from disk the node,
there is no need of the ptr, isn't it ?

Thanks for the explanations.

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


Re: [osg-users] Aligning Coordinate Systems

2009-09-07 Thread David Goering
Hey JP, 
sry I somehow missed your reply. Hope its not too late :-P
Anyway, I am still battling this problem but I think I have a better 
understanding of it. 
I opened a new thread with a better description (at least I hope so):
http://forum.openscenegraph.org/viewtopic.php?t=3577
So I'd say we move the discussion over there.
But just to update the problem here, I didnt mean changing the orientation of a 
coordinate system, rather then "scaling" it. 
e.g updating the translation part of a Matrix with a factor, so both objects in 
both systems are overlayed.
Hope you understand now, as I said before it would probably be easier to move 
the discussion to the new topic (except if its difficult through the mailing 
list, I will be checking back here just in case ;)  )
Thanks a lot,
David

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





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


[osg-users] Coordinate System Help

2009-09-07 Thread David Goering
Hey,
it's me... again...  :D 
Since the osgART community seems to be pretty dead and I have found great 
support here, I thought I'd ask here again, since it is 50% OSG question ;)

I have attached an image from the osgart documentation which shows how OSGART 
is connected to OSG.
What I am wondering now is if OSG and osgart (or rather Artoolkit) use 
different or the same coordinate system?
As you can see the virtual camera is updated by a projection matrix from the 
artoolkit setup, does this set OSG coordinate system?
basically what I want to do is find the factor I have to multiply the x,y and z 
values of the one coordinate system to equal the x,y and z values of the other 
coordinate system, so that the tracked object stays on the marker no matter 
what transformations I do to it. Currently the artoolkit tracking is "slower" 
so if I move the marker the model can't keep up and "slips off" if you know 
what I mean.

My idea was to do this: take the distance of the largest X value / smallest X 
value (without moving the camera).
Likewise for the arToolkit coordinates (so the camera values) the division of 
those values (calculated with Euclidean distance) should be the factor for one 
axis that I have to update the translation Matrix with. (repeat for other Axis)

Does that idea make any sense? Do I even have two different coordinate systems? 
Whats the easiest way to get the largest and smallest x,y,z onscreen 
coordinates ?

If you need the source code I use to create my osgART scene, ask and I can 
upload it.

Thanks a lot for your help,
David

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



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