Re: [osg-users] Getting animations initial frame bones matrix

2012-02-24 Thread Sergey Polischuk
In skeleton there are bones hierarchy, for each bone which have 
osgAnimaion::UpdateBone callback, you can get StackedTransform from it
Now from StackedTransform you can get bone matrix, or StackedTransformElements 
(StackedTransform is a vector of those) which represent 
scale\translate\rotateAxis\quat\etc transforms of bone.

When your animation not playing, values mentioned above will contain default 
bone position in skeleton.

Cheers,
Sergey.

22.02.2012, 17:20, Aitor Ardanza aitoralt...@terra.es:
 Hi,

 I managed to see the information I need debugint the proyect in visual 
 studio, but I don't know how to reach it ..

 Code:

 for(int 
 i=0;i\_AnimationManager-getOSGManager()-getAnimationList().size();i++){
 osg::ref_ptrosgAnimation::Animation anim = 
 _AnimationManager-getOSGManager()-getAnimationList()[i];
 if(!anim-getName().compare(name)){
 osgAnimation::ChannelList channelList = anim-getChannels();
 for(int j=0;j\ channelList.size();j++)
 {
 osgAnimation::Channel* channel = channelList[j];
 osgAnimation::TemplateTarget osgAnimation::Target* target = 
 channelList[j]-getTarget();
 }
 }
 }

 - target
 - osgAnimation::Target
   + osg::Reference
  _Weight
  _priorityWeight
  _lastPriority
 - _Target
   - osgAnimation::TemplateTargetosg::Vec3f*
   + osgAnimation::Target
   - _target
    + _v
   + osg::Reference
  _Weight
  _priorityWeight
  _lastPriority

 I don't know how to reach _v!
 Any suggestion???!!!

 Thank you!

 Cheers,
 Aitor

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

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


Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)

2012-02-24 Thread Robert Osfield
Hi John,

On 24 February 2012 03:53, John Simpson john.simp...@mbda.co.uk wrote:
 I know it's possible if I dig into the windowing system for a specific 
 platform, but I was hoping to do it using an OSG cross-platfom method (see 
 first post).

 The app's developing and I'm now using a CompositeViewer for which I'm 
 explicitly creating a GraphicsContext so I have access to the supportsResize 
 trait and it still resizes (on both platforms).

 I'll stop pestering this thread now and do it the long way.

You should be able to do the cross platform route, but if there is a
bug on the OSG side on one particular platform we as a community just
need to fix it.  I just have access to Linux, and have very little
Windows experience so can't help out with debugging the Windows side,
so have to rely on Windows dev to get things working perfectly under
Windows - this normally works out pretty well.

To resolve the issue the best route would be to create a small example
that illustrates the problem so that others can reproduce, confirm the
problem and then work to fix it.  Modifying an existing osg example
would probably be a good place to start.

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


Re: [osg-users] Testing of OpenSceneGraph svn/trunk in prep for 3.1 dev release

2012-02-24 Thread Robert Osfield
Hi Jordi,

On 23 February 2012 08:56, Jordi Torres jtorresfa...@gmail.com wrote:
 I compiled OSG for iOS 5 and GLES2 from console, I'm preparing a submission
 with a couple of fixes necessary to do it. I hope I can finish it before 3.1
 release, but I need to do a bit of testing and clean the CMake code. I will
 post the changes here and maybe Stephan or others could check them.

I have just checked in some fixes for GLES2 in osgText so it would be
worth doing an update to latest svn/trunk for your own work.

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


Re: [osg-users] Getting animations initial frame bones matrix

2012-02-24 Thread Aitor Ardanza
[quote=hybr]
When your animation not playing, values mentioned above will contain default 
bone position in skeleton.
[quote]

Hi!
But how can I know the bones matrix position before sending the animation 
action to play???

Thanks!!!

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





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


Re: [osg-users] How to prevent resize of viewer window (Windows and Linux)

2012-02-24 Thread Jason Daly

On 02/23/2012 10:53 PM, John Simpson wrote:

Jason

I know it's possible if I dig into the windowing system for a specific 
platform, but I was hoping to do it using an OSG cross-platfom method (see 
first post).


I think you misunderstood me.  What I meant was that OSG should be able 
to provide the ability to disable resizing in a cross-platform way 
(because all of the underlying platforms support it).


If it's not doing that properly, then something needs fixing.  If you 
can create a simple example, like Robert suggested, I can try to help 
with the Linux and Windows implementations.


--J

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


[osg-users] Getting animations initial frame bones matrix

2012-02-24 Thread Sergey Polischuk
Sorry, for some reason i thought that u need base skeleton position.

For first frame bone positions you can get it from channels.
Each channel have name and target name, target name is the bone name which it 
modifies, channel name is StackedElement name inside of UpdateBone callback.

So you stop all animations,
then for each animation you do next steps:
1) for each bone you check what StackedElements it have in UpdateBone callback
2) for each StackedElement you look channel in current animation, which have 
target name same as bone name, and channel name same as StackedElement name
  if such channel exist you take first keypoint out of it
  if there are no such channel you take value from StackedElement
3) processed all StackedElements - make matrix from values you've got
4) get next bone and go from 2)
5) all bones processed - get next animation and go from 1)

May be there are easier way, but i dont know any.

Also idk in what reference frame you need bone matrices. But you can convert 
these to whatever reference frame if there are such need.

Cheers.

24.02.2012, 17:37, Aitor Ardanza aitoralt...@terra.es:

  [quote=hybr]
  When your animation not playing, values mentioned above will contain default 
 bone position in skeleton.
  [quote]

  Hi!
  But how can I know the bones matrix position before sending the animation 
 action to play???

  Thanks!!!

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

  ___
  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] Effect Durations

2012-02-24 Thread Tolga Yilmaz
that seems not work, even i set endless true but the animation soon ends. so 
does the duration is effectless, or i'm making a mistake on my implementation...

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





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


Re: [osg-users] How to prevent resize of viewer window (Windows andLinux)

2012-02-24 Thread Jason Daly

On 02/24/2012 04:13 AM, Robert Osfield wrote:

You should be able to do the cross platform route, but if there is a
bug on the OSG side on one particular platform we as a community just
need to fix it.  I just have access to Linux, and have very little
Windows experience so can't help out with debugging the Windows side,
so have to rely on Windows dev to get things working perfectly under
Windows - this normally works out pretty well.

To resolve the issue the best route would be to create a small example
that illustrates the problem so that others can reproduce, confirm the
problem and then work to fix it.  Modifying an existing osg example
would probably be a good place to start.


I found a little program I can test with.  It looks like the MWM 
property for resizing is being set correctly, just the window manager 
(Metacity, in my case) is ignoring it.  I'm putting together a 
submission that uses the ICCCM hints instead.


--J

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


[osg-users] request

2012-02-24 Thread
hello world___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org