Re: [osg-users] SwitchNode Animation with a specific time interval

2011-06-08 Thread Vijay Kalivarapu
Thanks Ulrich. I didn't know about this earlier. Looks like this is what I 
might need. I will post my findings on this soon.

... 

Thank you!

Cheers,
Vijay

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





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


[osg-users] SwitchNode Animation with a specific time interval

2011-06-07 Thread Vijay Kalivarapu
Hi,

I have a bunch of timesteps of data that I need to animate between. I set up my 
code so that each timestep corresponds to a switch node and I attempted to 
animate between each switchnode.

Here is my switch node animation operator code:


Code:

void SwitchingCallback::operator() (osg::Node* node, osg::NodeVisitor* nv)
{
static int tstepNum = 0;
static int sign = -1;
int numtimesteps = 64;

osg::Switch* switchNode = static_castosg::Switch*(node);
if( !((++_count) % 30)  switchNode)
{
if(tstepNum = numtimesteps-1)
{
tstepNum = numtimesteps-1;
sign = -sign;
}
else if (tstepNum = 0)
{
tstepNum = 0;
sign = -sign;
}

tstepNum += sign;
switchNode-setSingleChildOn(tstepNum);
}
traverse(node, nv);
}




Currently, the speed at which the switch node is animating between timesteps is 
machine dependent. In other words, the animation speed is dependent on the 
machine that could count to 30 quick enough.

I would ideally like the animation to happen at a specific time interval 
instead and hoping to avoid the


Code:

!((++_count) % 30)




and be able to specify something like

Code:

if(timeElapsed  0.02 seconds)
then do_something;




I looked at osganimationmakepath example and attempted to use the following:


Code:


static int tstepNum = 0;
static int sign = -1;
int numtimesteps = 64;
static int flagForFirstTime = 0;

osg::Switch* switchNode = static_castosg::Switch*(node);
_currentTime = osg::Timer::instance()-tick();

if(flagForFirstTime == 0)
{
  _startTime = osg::Timer::instance()-tick();
  flagForFirstTime = 1;
}

float t = osg::Timer::instance()-delta_s(_startTime, _currentTime);

if( t  0.02f  switchNode)
{
  blah_blah_as_above;
  tstepNum += sign;
  switchNode-setSingleChildOn(tstepNum);
  flagForFirstTime = 0;
}
traverse(node, nv);





This worked, except that the animation was inconsistent. It was slow at times 
and then it suddenly picked up speed.

I am sure I am missing something, but I do not know what. Any suggestions?

Thank you!

Cheers,
Vijay.

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





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


Re: [osg-users] osgmovie and stereo

2011-01-18 Thread Vijay Kalivarapu
Hi,

Thanks Robert. I also saw a 'osgmovie' sample along with other examples built 
on OSG 2.9.10. When I hit a 'osgmovie --help', I found an option '--stereo'. 
Will this be any simpler than using 'osgstereoimage' ?

Thank you!

Cheers,
Vijay

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





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


[osg-users] osgmovie and stereo

2011-01-11 Thread Vijay Kalivarapu
Hi,

I have two live video streams that are set apart for left and right eye. Does 
anyone know if osgmovie can play them in active/passive stereo?

If not, what is the best way to play two video streams in stereo?

Thank you!

Cheers,
Vijay

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





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


[osg-users] OSG Build error on Mac OS X

2009-12-22 Thread Vijay Kalivarapu
Hi,

I am trying to build OSG on Mac OS X Snow leopard using Xcode. I ran into the 
following build errors and I have no idea where to start solving them. Can 
anyone help:


Code:

Ld 
build/OpenSceneGraph.build/Development/osgdb_bsp.build/Objects-normal/i386/osgdb_bsp.so
 normal i386
cd /Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph
setenv MACOSX_DEPLOYMENT_TARGET 10.4
/Developer/usr/bin/g++-4.2 -arch i386 -bundle -isysroot 
/Developer/SDKs/MacOSX10.5.sdk 
-L/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/Development
 
-F/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/Development
 -F/Users/vijay/Library/Frameworks 
-F/Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks -filelist 
/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/OpenSceneGraph.build/Development/osgdb_bsp.build/Objects-normal/i386/osgdb_bsp.LinkFileList
 -mmacosx-version-min=10.4 -framework OpenThreads -framework osg -framework 
osgDB -o 
/Users/vijay/Downloads/softwareDownloads/osgSvn2.8.2/Xcode/OpenSceneGraph/build/OpenSceneGraph.build/Development/osgdb_bsp.build/Objects-normal/i386/osgdb_bsp.so

Undefined symbols:
  osgUtil::TriStripVisitor::stripify(), referenced from:
  bsp::VBSPGeometry::createGeometry()  in osgdb_bsp.so-i386-master.o
  vtable for osgUtil::TriStripVisitor, referenced from:
  __ZTVN7osgUtil15TriStripVisitorE$non_lazy_ptr in 
osgdb_bsp.so-i386-master.o
  VTT for osgUtil::TriStripVisitor, referenced from:
  __ZTTN7osgUtil15TriStripVisitorE$non_lazy_ptr in 
osgdb_bsp.so-i386-master.o
ld: symbol(s) not found
collect2: ld returned 1 exit status








Thank you!

Cheers,
Vijay
[/code]

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





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


[osg-users] How to build osgdem

2009-03-20 Thread vijay kalivarapu
Hi,

I did successfully build OSG2.8, but neither the 'bin' directory or the 
'share/OpenSceneGraph/bin' directory has the executable 'osgdem'. I have been 
looking at various posts that talk about using osgdem to load .dem files, but I 
don't seem to find it.

I do have 'gdal' installed and built OSG with gdal support as well. Can anyone 
tell me what might I be missing?

Another sub question - Can osgdem load dted files (dt0, dt1, etc) ?


Thank you,
Vijay.

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





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