Yonas Sahlemariam | 31 Jul 2012 22:10
Picon
Favicon

animation on HUD geomtries

Hi,

I was wondering if somebody made animation on HUD. 

basically, I am modifying osgpick example trying to animate the 5 geometries rendered as HUD. I am using
PositionAttitudeTransform, but all I got is the static geometries.  Is it impossible to animate 2D nodes
rendered as HUD, please hint me if I am missing something?

 Here is the code

osg::PositionAttitudeTransform *pat;

/* update function*/

void update(float dt) {
    pat->setPosition(osg::Vec3(dt, dt, 0));

}

/* main function */

int main()
{

....

    osg::ref_ptr<osgText::Text> updateText = new osgText::Text;

    // add the HUD subgraph.   
	osg::ref_ptr<osg::Node> hudCam = createHUD(updateText.get());
(Continue reading)

Stephan Huber | 1 Aug 2012 00:48
Picon

Re: animation on HUD geomtries

Hi,

I think you made a mistake when setting up the scenegraph. Add
updateText to your pat, and add the pat to your hud.

HTH,
Stephan

Am 31.07.12 22:10, schrieb Yonas Sahlemariam:
> Hi,
> 
> I was wondering if somebody made animation on HUD. 
> 
> basically, I am modifying osgpick example trying to animate the 5 geometries rendered as HUD. I am using
PositionAttitudeTransform, but all I got is the static geometries.  Is it impossible to animate 2D nodes
rendered as HUD, please hint me if I am missing something?
> 
>  Here is the code
> 
> 
> osg::PositionAttitudeTransform *pat;
> 
> /* update function*/
> 
> void update(float dt) {
>     pat->setPosition(osg::Vec3(dt, dt, 0));
> 
> }
> 
> 
(Continue reading)


Gmane