How can I rotate a arrow on my object to show direction?

I need to be able to take a texture of a arrow that is over my object and want to rotate it to the current heading direction of the object...

What functions can I call in Box2d to get this done? From what I have seen these maybe all I need but not sure.

Code:
b2Vec2 position = body->GetPosition();
   float32 angle = body->GetAngle();

   b2Vec2 dir = body->GetWorldVector(b2Vec2(0,1));
   std::cout << "World Vector = " << atan2(dir.y, dir.x) << std::endl << std::endl;

   b2Vec2 velocity = body->GetLinearVelocity();
   std::cout << "Angle = " << atanf(velocity.y / velocity.x) + irr::core::HALF_PI;


I am not sure how to put them all together or if those are even what I need.

Thanks!!!
The third bit is the one you need:
Code:
   b2Vec2 velocity = body->GetLinearVelocity();
   std::cout << "Angle = " << atanf(velocity.y / velocity.x) + irr::core::HALF_PI;


You may or may not need the HALF_PI part, depending on how the texture is oriented. If the arrow is pointing up in the unrotated texture, then you might need that HALF_PI part (plus or minus). If the arrow is pointing to the right, then you might not need the HALF_PI part, or you might need to add PI. You can probably figure it out by trial and error.

Original thread: https://box2d.org/forum/viewtopic.php?t=9305