[osg-users] how matrixTransform works?

2009-07-20 Thread Lingyun Yu
Hi, everybody Could someone explain me how matrixTransform works? In the updatecallback, I set the matrixTransform like this static float c = 1.0; c = c + 0.01; mt-setMatrix(osg::Matrixf::translate(-bs.center()) * osg::Matrixf::scale(1.0, c, 1.0)

Re: [osg-users] how matrixTransform works?

2009-07-20 Thread Lingyun Yu
...@lists.openscenegraph.org] On Behalf Of Lingyun Yu Sent: Monday, July 20, 2009 4:36 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] how matrixTransform works? Hi, everybody Could someone explain me how matrixTransform works? In the updatecallback, I set the matrixTransform like this static

[osg-users] what's the value of RIGHT_MOUSE_BUTTON?

2009-05-25 Thread Lingyun Yu
Hi, everybody In the GUIEventAdapter.h, we can see enum MouseButtonMask { LEFT_MOUSE_BUTTON= 10, MIDDLE_MOUSE_BUTTON = 11, RIGHT_MOUSE_BUTTON = 12 }; so right key's value is 4. and we can easily get num = 4 from int num =

Re: [osg-users] what's the value of RIGHT_MOUSE_BUTTON?

2009-05-25 Thread Lingyun Yu
I see, thank you paul. So if I want to judge which botton is pressed, I should use ea-getButton(). But what's ea-getButtonMask() use for? On Mon, May 25, 2009 at 7:45 PM, Paul Martz pma...@skew-matrix.com wrote: You seem to be confusing the incoming button parameter, which is an unsigned int,

Re: [osg-users] Taking it easy for a couple of days

2009-05-13 Thread Lingyun Yu
Take care, Robert. Look forward for your back. On Wed, May 13, 2009 at 10:55 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi All, I've gone down with a bad cold, so am struggling to focus, read and think clearly today. So... please don't expect much support from me today, some active

Re: [osg-users] how can I turn a camera on and off? (UNCLASSIFIED)

2009-04-17 Thread Lingyun Yu
camera-setNodeMask(0) and camera-setNodeMask(0x) might work. On Fri, Apr 17, 2009 at 4:26 PM, Konkle, Daniel T AMRDEC/Dynetics daniel.kon...@us.army.mil wrote: Classification: UNCLASSIFIED Caveats: NONE I need to turn a camera on and off. Use it and not use it. I've look through

Re: [osg-users] Problem of points showing

2009-04-15 Thread Lingyun Yu
when its ref count reaches 0). HTH Ismail 2009/4/13 Paul Martz pma...@skew-matrix.com: Hi Lingyun Yu -- You don't have a variable named 'galaxy' defined, so the addDrawable(galaxy) is suspicious. I'd so a resize on the vertex and color arrays, rather than a push_back, for efficiency

Re: [osg-users] Problem of points showing

2009-04-15 Thread Lingyun Yu
/4/15 Lingyun Yu lingyun.yu...@gmail.com Hi, Ismail, I don't understand how the expanding happen? I read all dataset into an array of P, then when it expands? and why? and what's old array? On Tue, Apr 14, 2009 at 2:27 PM, Ismail Pazarbasi pazarb...@gmail.comwrote: Hi Lingyun, std

Re: [osg-users] Problem of points showing

2009-04-15 Thread Lingyun Yu
). After copy succeeds, vector destroys previous buffer (6 items), then you have a vector whose capacity is sizeof(int) * 9. Until 9th item, vector will not need to reallocate memory. 2009/4/15 Lingyun Yu lingyun.yu...@gmail.com: Hi, Ismail, I don't understand how the expanding happen? I

Re: [osg-users] Problem of points showing

2009-04-15 Thread Lingyun Yu
Thank you very much, Ismail and Martin, I have 3G memory installed. and 1.02G is avaible, I use windows vista. and I didn't use file page file/swap. I will read carefully about both of you suggested. If you have some source can be read for that, please tell me. Yun On Wed, Apr 15, 2009 at

Re: [osg-users] Problem of points showing

2009-04-15 Thread Lingyun Yu
no, 2G is avaible I mean On Wed, Apr 15, 2009 at 5:43 PM, Lingyun Yu lingyun.yu...@gmail.com wrote: Thank you very much, Ismail and Martin, I have 3G memory installed. and 1.02G is avaible, I use windows vista. and I didn't use file page file/swap. I will read carefully about both of you

Re: [osg-users] Problem of points showing

2009-04-14 Thread Lingyun Yu
Martz pma...@skew-matrix.com: Hi Lingyun Yu -- You don't have a variable named 'galaxy' defined, so the addDrawable(galaxy) is suspicious. I'd so a resize on the vertex and color arrays, rather than a push_back, for efficiency reasons. I don't think numParts100 should cause any

Re: [osg-users] Problem of points showing

2009-04-14 Thread Lingyun Yu
Thanks Martin, yes, this is also a solution. thank you very much. Yun On Tue, Apr 14, 2009 at 4:04 PM, Martin Beckett m...@mgbeckett.com wrote: The c++ standard also requires that the memory for vector is contiguous like a C array. You can try reserving the memory soon after program start

[osg-users] Problem of points showing

2009-04-13 Thread Lingyun Yu
Hi, everybody, I met a problem when I want to show huge amount of points, as you can see the code below, if my NumPart is 100, no problem, it shows points properly. But if the NumPart is 200, then it shows a lot of lines. If NumPart is even bigger, the program complained like

Re: [osg-users] osgmovie problem

2009-04-02 Thread Lingyun Yu
I also updated my driver to the newest. it is still the same. my quicktime version is 7.3. Is it too old? On Thu, Apr 2, 2009 at 1:57 AM, Ulrich Hertlein u.hertl...@sandbox.dewrote: On 2/4/09 5:32 AM, Lingyun Yu wrote: another warning TextureRectangle::apply(..) failed, texture rectangle

[osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
Hi, while I am running osgmovie, I met the warning like warning: GraphicsWindowWin32::grabFocus failed grabbing the focus then only a white window on the screen. what's wrong with this? Thank you. -- Read this topic online here:

Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
Now I use osg2.9 to run it. it doesn't have warning anymore, but still just a white window On Wed, Apr 1, 2009 at 6:50 PM, Lingyun Yu lingyun.yu...@gmail.com wrote: Hi, while I am running osgmovie, I met the warning like warning: GraphicsWindowWin32::grabFocus failed grabbing the focus

Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
.  Also do other examples run fine?  Have you compiled with the ffmpeg or quicktime plugins?  What exactly command line options are you using? Robert. 2009/4/1 Lingyun Yu () Now I use osg2.9 to run it. it doesn't have warning anymore, but still just a white window On Wed, Apr

Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9562#9562 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgmovie problem

2009-04-01 Thread Lingyun Yu
another warning TextureRectangle::apply(..) failed, texture rectangle is not support by your OpenGL drivers. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9563#9563 ___ osg-users mailing list

[osg-users] Manipulator or Mouse Event

2009-03-30 Thread Lingyun Yu
Hi, Robert and every friend, I want to implement some interaction gestures like IPod or IPhone. I don't know if I need to design another manipulator or just design a mouse event. So my question is, when do I need to make another manipulator like Driver or so, when do I need to make a mouse

Re: [osg-users] How to remove the blue background color

2009-03-25 Thread Lingyun Yu
Hi dat, I think viewer-getCamera()-setClearColor() can make it. Yun 2009/3/25 tien dat tienda...@gmail.com Dear all, I need to remove the blue background color so that I can do augmented display (you can run the cow.osg example to see the blue color). Do any of you know how to do that?

[osg-users] Trackball Manipulator in OpenGL + OSG

2009-03-24 Thread Lingyun Yu
Hi, everybody, I used viewer-setUpViewerAsEmbeddedInWindow way as Robert suggested to embed an OSG window in OpenGL context. Then I tried to setup Manipulator like Trackball, I did some code like this: osg::observer_ptrosgViewer::GraphicsWindow gw = viewer-setUpViewerAsEmbeddedInWindow(...)

Re: [osg-users] Trackball Manipulator in OpenGL + OSG

2009-03-24 Thread Lingyun Yu
please ignore my question. I just made something stupid. [Laughing] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9100#9100 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] OSG in an existing OpenGL context

2009-03-22 Thread Lingyun Yu
Robert Osfield wrote: Hi Uli, Perhaps another solution would be to render the OSG scene to a a pbuffer and then use the pbuffer as a texture source for the original graphics context. This would isolate the OSG and your own OpenGL context completely from each other. Robert. On Fri,

Re: [osg-users] switch between two camera

2009-03-20 Thread Lingyun Yu
Hi, Ben, I use something like camera0-setNodeMask(0X); camera1-setNodeMask(0); to enable camera0 but disable camera1. I hope it helps. Yun On Fri, Mar 20, 2009 at 10:48 AM, Ben ben.poul...@gmail.com wrote: Hi, if I have understood , I must design my

[osg-users] GraphicsContext problem

2009-03-20 Thread Lingyun Yu
Hi guys, I want to use OpenGL to render the interface, but use OSG to render in a region. And in this region I use OSG manipulator, but in the rest of the interface I use others. I don't know if it is possible, if it is, how to do? Thanks in advance. -- Cheers, Yun

Re: [osg-users] switch between two camera

2009-03-20 Thread Lingyun Yu
Hi ben, where did you put your code? I put them in the updatecallback function, that's why mine will change every frame. Yun 2009/3/20 Ben ben.poul...@gmail.com benbao wrote: I try to use nodemask but doesn't work. Id do this : Code: osgViewer::CompositeViewer viewer;

Re: [osg-users] GraphicsContext problem

2009-03-20 Thread Lingyun Yu
nobody had the same thing? On Fri, Mar 20, 2009 at 12:20 PM, Lingyun Yu lingyun.yu...@gmail.comwrote: Hi guys, I want to use OpenGL to render the interface, but use OSG to render in a region. And in this region I use OSG manipulator, but in the rest of the interface I use others. I don't

[osg-users] Intergration with OSG

2009-03-17 Thread Lingyun Yu
Hi all, Does anybody know if I can render one part of window in OSG, and use another framework to render the rest? Thanks. -- Cheers, Yun ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] switch between two camera

2009-03-16 Thread Lingyun Yu
Hi Robert, I also meet the same problem, I have 128 snapshots of particles, and I want to use those 128 shapshots to make an real time animation. First thing I tried, was using a update callback function and bind it on my geode, everytime I just updated all positions of particles. But obviously